Pinout & Headers
All traces, driver sockets, and headers are routed directly on the EVDrive PCB.
Here are the exact schematic pin definitions, dual I2C buses, and connector layouts to use in your code.
ESP32-S3 Pin Mapping
| Function | ESP32-S3 Pin | Net Name | Details |
|---|---|---|---|
| Motor A (Left) STEP | GPIO5 | STEP_A | Step pulse for Driver A (U3) |
| Motor A (Left) DIR | GPIO4 | DIR_A | Direction control for Driver A |
| Motor A (Left) EN | GPIO6 | EN_A | Enable / Disable Driver A (Active LOW) |
| Motor B (Right) STEP | GPIO9 | STEP_B | Step pulse for Driver B (U4) |
| Motor B (Right) DIR | GPIO46 | DIR_B | Direction control for Driver B |
| Motor B (Right) EN | GPIO14 | EN_B | Enable / Disable Driver B (Active LOW) |
| I2C Bus 1 SDA | GPIO1 | SDA | Primary I2C bus (MPU-6050 & Encoder A) |
| I2C Bus 1 SCL | GPIO2 | SCL | Primary I2C bus (MPU-6050 & Encoder A) |
| I2C Bus 2 SDA | GPIO41 | SDA_B | Secondary I2C bus (Encoder B) |
| I2C Bus 2 SCL | GPIO42 | SCL_B | Secondary I2C bus (Encoder B) |
| Battery Voltage Sense | GPIO13 | VOLT | Analog input via 100k / 10k voltage divider (11:1) |
| Start Button | GPIO7 | START_BTN | Tactile push button (Active LOW, pulled to GND) |
| Reset Button | CHIP_PU | RESET | Hardware reset line for ESP32 |
| Wireless / RF Switch | GPIO15 | WL_SW | SPDT toggle switch (connected to GND) |
| Wireless LED | GPIO16 | WL_LED | LED D1 (indicates wireless state) |
| User Status LED | GPIO40 | LED | LED D5 (general-purpose programmable LED) |
Dual Independent I2C Buses
Standard AS5600 magnetic encoders have a fixed, non-configurable I2C address (0x36).
Instead of requiring an external I2C multiplexer chip, the EVDrive PCB routes two separate physical I2C buses directly to the ESP32-S3:
- Bus 1 (
Wireon GPIO 1 / GPIO 2):- Connects to the MPU-6050 gyro module (
0x68). - Connects to Encoder A header
J1(0x36). - Hardware 4.7kΩ pullups on board (
R10,R11).
- Connects to the MPU-6050 gyro module (
- Bus 2 (
Wire1on GPIO 41 / GPIO 42):- Connects to Encoder B header
J2(0x36). - Hardware 4.7kΩ pullups on board (
R12,R13).
- Connects to Encoder B header
Both encoders can be queried simultaneously in code without any address collisions.
Onboard Battery Voltage Monitoring
The board includes an onboard precision voltage divider wired to GPIO13:
- Top Resistor (): 100 kΩ connected to
+12V - Bottom Resistor (): 10 kΩ connected to
GND - Divider Ratio:
A 12.0V battery outputs approximately 1.09V on GPIO 13, which sits safely inside the ESP32 ADC range.
Headers & Connectors
Encoder Connectors (J1 & J2)
Vertical 4-pin keyed JST-XH connectors (B4B-XH-A, 2.50mm pitch) designed for custom RH Circuits AS5600 breakout boards. Keyed shrouds prevent reverse insertion and provide positive retention under vibration:
- Pin 1:
+3V3(Regulated 3.3V logic supply) - Pin 2:
GND(Ground) - Pin 3:
SCL(I2C Clock:J1routes toGPIO 2,J2routes toGPIO 42) - Pin 4:
SDA(I2C Data:J1routes toGPIO 1,J2routes toGPIO 41)
Motor Screw Terminals (J11 & J12)
Dedicated 4-pin 2.54mm pitch screw terminal blocks (J11 for Motor A / Left, J12 for Motor B / Right) wired directly to TMC2209 driver outputs (U3 and U4). Stripped motor lead wires clamp directly under screws to prevent disconnection during runs or handling:
- Pin 1:
M1B(Coil 1, Phase B) - Pin 2:
M1A(Coil 1, Phase A) - Pin 3:
M2A(Coil 2, Phase A) - Pin 4:
M2B(Coil 2, Phase B)
Power Input Terminals (KF301 5.0mm Pitch Screw Terminals)
J4&J9(12V Motor Power IN): Dual parallel 2-pin screw terminals for motor power input (12V–24V).- Pin 1:
GND(-) - Pin 2:
+12V IN(+) - Protected by 5A fuse
F1and reverse-polarity P-channel MOSFETQ1(AO4407A).
- Pin 1:
J5(5V Logic Power IN): 2-pin screw terminal for 5.0V regulated logic input.- Pin 1:
GND(-) - Pin 2:
+5V IN(+) - Protected by 2A fuse
F2and reverse-polarity P-channel MOSFETQ2(AO4407A).
- Pin 1:
Auxiliary Ground Header (J10)
A dedicated 3-pin 2.54mm vertical header where all pins are tied directly to board GND. Provides convenient ground tie points for auxiliary sensors, scopes, or test probes without crowding terminal blocks.
Expansion GPIO Header (J6)
A 10-pin 2.54mm header for extra sensors, bumper switches, or custom add-ons:
| Pin | Function | Schematic Net | Notes |
|---|---|---|---|
| 1 | GND | GND | Common ground reference |
| 2 | +3V3 | +3V3 | 3.3V regulated logic supply |
| 3 | GPIO21 | GPIO_7 | General Purpose I/O |
| 4 | GPIO47 | GPIO_6 | General Purpose I/O |
| 5 | GPIO48 | GPIO_5 | General Purpose I/O |
| 6 | GPIO45 | GPIO_4 | General Purpose I/O |
| 7 | GPIO35 | GPIO_3 | General Purpose I/O |
| 8 | GPIO36 | GPIO_2 | General Purpose I/O |
| 9 | GPIO37 | GPIO_1 | General Purpose I/O |
| 10 | GPIO38 | GPIO_0 | General Purpose I/O |
Status LEDs
| LED | Name | Driven By | Purpose |
|---|---|---|---|
| D1 | Wireless | GPIO16 (via 330Ω) | Software-controlled RF indicator |
| D2 | 12V Power | +12V rail (via 1kΩ) | Lights when motor power rail is active |
| D3 | 3.3V Power | +3V3 rail (via 330Ω) | Lights when 3.3V LDO regulator is active |
| D4 | 5V Power | +5V rail (via 330Ω) | Lights when 5V logic power is active |
| D5 | User LED | GPIO40 (via 330Ω) | User-programmable indicator LED |