ESP32 电池切换控制

针脚映射和元件布局已完成,模块排母按15.24mm中心距放置并保留USB/天线空间。当前唯一阻塞是4层叠层没有成功保存,我会再做一次针对性修复并读回确认,然后停在布局确认点。
4层叠层已成功修复为Top信号、内层地、内层电源、Bottom信号;模块与逻辑区的局部拥塞也已拉开。正在做布局确认点的最终读回。
布局阶段已经完成并通过基础检查;我将停在走线前确认点,等待你确认模块排距与整体布局后再布线。
已按图片完成针脚映射和PCB布局:
  • PCB:180×140mm、4层。
  • ESP32排母:2×1×9、2.54mm针距、15.24mm排距。
  • USB朝左侧板边,天线朝右并保留无铜区域。
  • GPIO、I²C、移位寄存器和采样选择信号已固定。
  • 继电器、32A端子、模拟采样及控制区已分区布局。
  • 尚未走线。
**待确认:**15.24mm排距依据兼容模块常见封装推定,首板前请用卡尺测量你手中模块两排针的中心距离。确认排距及当前布局后,我再开始15A功率铜皮和控制信号走线。
确认布局并走线
先检查DRC
优化板子尺寸
生成装配预览
U3
U5
U7
C13
Capacitance
470uF
U1
C1
Capacitance
100nF
C7
Capacitance
100nF
C2
Capacitance
100nF
C6
Capacitance
100nF
C12
Capacitance
100nF
C16
Capacitance
10uF
C19
Capacitance
1uF
C18
Capacitance
1uF
C10
Capacitance
100nF
C11
Capacitance
100nF
C3
Capacitance
100nF
C4
Capacitance
100nF
C8
Capacitance
100nF
C5
Capacitance
100nF
C9
Capacitance
100nF
R17
Resistance
100kΩ
R19
Resistance
12kΩ
R1
Resistance
100kΩ
R15
Resistance
100kΩ
R21
Resistance
12kΩ
R14
Resistance
100kΩ
R20
Resistance
22kΩ
R13
Resistance
100kΩ
R16
Resistance
100kΩ
R8
Resistance
19.1kΩ
R25
Resistance
4.7kΩ
R22
Resistance
22kΩ
R18
Resistance
100kΩ
R24
Resistance
10kΩ
R9
Resistance
19.1kΩ
R4
Resistance
100kΩ
R6
Resistance
100kΩ
R2
Resistance
100kΩ
R7
Resistance
19.1kΩ
R3
Resistance
100kΩ
R5
Resistance
100kΩ
R26
Resistance
4.7kΩ
R11
Resistance
19.1kΩ
R12
Resistance
19.1kΩ
R10
Resistance
19.1kΩ
R23
Resistance
10kΩ
F1
J13
J4
J12
J3
J2
J8
J7
J1
J5
J6
K1
K2
K5
K3
K4
K6
D7
U4
U2
J9
J10

Refine this doc
Ask about this doc
Firmware Getting Started
Fixed Super Mini orientation and GPIO map
Datum is the front/component view with USB-C at left and PCB antenna at right. User drawing overrides conflicting clone/vendor pages.
  • GPIO1 = I2C_SDA
  • GPIO2 = I2C_SCL
  • GPIO4 = SR_SER
  • GPIO5 = SR_CLK
  • GPIO6 = SR_LATCH
  • GPIO7 = SR_OE_N
  • GPIO8/9/10 = MUX_S0/S1/S2
  • GPIO11 = MUX_EN_N
  • GPIO3 is strapping/JTAG-related and remains NC. GPIO12, GPIO13, TX and RX remain unloaded spares.
  • SR_CLR_N is hardware-controlled by its pull-down and is not assigned to a module GPIO.
  • Module 3V3 is test/output only and is not tied to the TLV75533 3V3 rail.
Compileable Arduino starter

Cpp


#include <Arduino.h> #include <Wire.h> #define PIN_I2C_SDA 1 #define PIN_I2C_SCL 2 #define PIN_SR_SER 4 #define PIN_SR_CLK 5 #define PIN_SR_LATCH 6 #define PIN_SR_OE_N 7 #define PIN_MUX_S0 8 #define PIN_MUX_S1 9 #define PIN_MUX_S2 10 #define PIN_MUX_EN_N 11 static bool oneHotOrZero(uint8_t m) { return m == 0 || (m & (m - 1)) == 0; } static void latch(uint8_t m) { shiftOut(PIN_SR_SER, PIN_SR_CLK, MSBFIRST, m); digitalWrite(PIN_SR_LATCH, HIGH); digitalWrite(PIN_SR_LATCH, LOW); } static void safeInit() { pinMode(PIN_SR_OE_N, OUTPUT); digitalWrite(PIN_SR_OE_N, HIGH); pinMode(PIN_SR_SER, OUTPUT); digitalWrite(PIN_SR_SER, LOW); pinMode(PIN_SR_CLK, OUTPUT); digitalWrite(PIN_SR_CLK, LOW); pinMode(PIN_SR_LATCH, OUTPUT); digitalWrite(PIN_SR_LATCH, LOW); pinMode(PIN_MUX_EN_N, OUTPUT); digitalWrite(PIN_MUX_EN_N, HIGH); pinMode(PIN_MUX_S0, OUTPUT); pinMode(PIN_MUX_S1, OUTPUT); pinMode(PIN_MUX_S2, OUTPUT); digitalWrite(PIN_MUX_S0, LOW); digitalWrite(PIN_MUX_S1, LOW); digitalWrite(PIN_MUX_S2, LOW); latch(0x00); Wire.begin(PIN_I2C_SDA, PIN_I2C_SCL); } static bool writeRelayMask(uint8_t mask, bool safetyOK) { if (!safetyOK || !oneHotOrZero(mask) || (mask & 0xC0)) return false; digitalWrite(PIN_SR_OE_N, HIGH); latch(0x00); delay(250); // verify/tune against relay release time latch(mask); digitalWrite(PIN_SR_OE_N, LOW); return true; } void setup() { safeInit(); } void loop() { delay(1000); }
Build
Use an ESP32-S3-capable Espressif Arduino core and the board profile matching the actual Super Mini revision. This starter uses only Arduino core headers and compiles without third-party libraries.
  • Fixed Super Mini orientation and GPIO map

  • Compileable Arduino starter

  • Build

ESP32 六路电池切换器

ESP32 六路电池切换器 thumbnail
6组共负极12V锂电池的15A自动切换控制器,单一BAT_BUS连接太阳能控制器并记录母线电压、电流、功率、Ah与Wh;采用硬件默认断开和break-before-make互锁。

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$39.15–$51.71

Digi-Key

$4.89

HQonline

$0.69–$2.33

LCSC

$26.55–$28.34

Mouser

$34.12

TME

$2.75

Verical

$42.40–$59.53

Controls