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 Headers (J1 & J2)
Standard 4-pin 2.54mm headers for AS5600 breakout boards:
+3V3GNDSCL(J1 uses GPIO 2, J2 uses GPIO 42)SDA(J1 uses GPIO 1, J2 uses GPIO 41)
Motor Headers (J7 & J8)
Standard 4-pin stepper motor headers directly connected to driver outputs:
- Pin 1:
M1B - Pin 2:
M1A - Pin 3:
M2A - Pin 4:
M2B
Power Input Terminals (KF301 Screw Terminals)
J4/J9(12V IN): Motor power rail input (12V–24V). Protected by 5A fuse (F1) and P-channel MOSFET (Q1AO4407A) for reverse-polarity protection.J5(5V IN): Logic power rail input (5V). Protected by 2A fuse (F2) and P-channel MOSFET (Q2AO4407A).JP1,JP2,JP3: Solder/jumper pads to bypass the fuses if necessary.
Expansion GPIO Header (J6)
A 10-pin 2.54mm header for extra sensors, bumper switches, or custom add-ons:
| Pin | Function | Notes |
|---|---|---|
| 1 | GND | Common ground |
| 2 | +3V3 | 3.3V logic supply |
| 3 | GPIO21 | GPIO_7 |
| 4 | GPIO47 | GPIO_6 |
| 5 | GPIO48 | GPIO_5 |
| 6 | GPIO45 | GPIO_4 |
| 7 | GPIO35 | GPIO_3 |
| 8 | GPIO36 | GPIO_2 |
| 9 | GPIO37 | GPIO_1 |
| 10 | GPIO38 | GPIO_0 |
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 |