← Home
Docs/Hardware/Pinout & Headers

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

FunctionESP32-S3 PinNet NameDetails
Motor A (Left) STEPGPIO5STEP_AStep pulse for Driver A (U3)
Motor A (Left) DIRGPIO4DIR_ADirection control for Driver A
Motor A (Left) ENGPIO6EN_AEnable / Disable Driver A (Active LOW)
Motor B (Right) STEPGPIO9STEP_BStep pulse for Driver B (U4)
Motor B (Right) DIRGPIO46DIR_BDirection control for Driver B
Motor B (Right) ENGPIO14EN_BEnable / Disable Driver B (Active LOW)
I2C Bus 1 SDAGPIO1SDAPrimary I2C bus (MPU-6050 & Encoder A)
I2C Bus 1 SCLGPIO2SCLPrimary I2C bus (MPU-6050 & Encoder A)
I2C Bus 2 SDAGPIO41SDA_BSecondary I2C bus (Encoder B)
I2C Bus 2 SCLGPIO42SCL_BSecondary I2C bus (Encoder B)
Battery Voltage SenseGPIO13VOLTAnalog input via 100k / 10k voltage divider (11:1)
Start ButtonGPIO7START_BTNTactile push button (Active LOW, pulled to GND)
Reset ButtonCHIP_PURESETHardware reset line for ESP32
Wireless / RF SwitchGPIO15WL_SWSPDT toggle switch (connected to GND)
Wireless LEDGPIO16WL_LEDLED D1 (indicates wireless state)
User Status LEDGPIO40LEDLED 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 (Wire on 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).
  • Bus 2 (Wire1 on GPIO 41 / GPIO 42):
    • Connects to Encoder B header J2 (0x36).
    • Hardware 4.7kΩ pullups on board (R12, R13).

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 (R4R_4): 100 kΩ connected to +12V
  • Bottom Resistor (R5R_5): 10 kΩ connected to GND
  • Divider Ratio:

Vbattery=VGPIO13×(100 kΩ+10 kΩ10 kΩ)=VGPIO13×11.0V_{\text{battery}} = V_{\text{GPIO13}} \times \left(\frac{100\,\text{k}\Omega + 10\,\text{k}\Omega}{10\,\text{k}\Omega}\right) = V_{\text{GPIO13}} \times 11.0

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:

  1. +3V3
  2. GND
  3. SCL (J1 uses GPIO 2, J2 uses GPIO 42)
  4. 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 (Q1 AO4407A) for reverse-polarity protection.
  • J5 (5V IN): Logic power rail input (5V). Protected by 2A fuse (F2) and P-channel MOSFET (Q2 AO4407A).
  • 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:

PinFunctionNotes
1GNDCommon ground
2+3V33.3V logic supply
3GPIO21GPIO_7
4GPIO47GPIO_6
5GPIO48GPIO_5
6GPIO45GPIO_4
7GPIO35GPIO_3
8GPIO36GPIO_2
9GPIO37GPIO_1
10GPIO38GPIO_0

Status LEDs

LEDNameDriven ByPurpose
D1WirelessGPIO16 (via 330Ω)Software-controlled RF indicator
D212V Power+12V rail (via 1kΩ)Lights when motor power rail is active
D33.3V Power+3V3 rail (via 330Ω)Lights when 3.3V LDO regulator is active
D45V Power+5V rail (via 330Ω)Lights when 5V logic power is active
D5User LEDGPIO40 (via 330Ω)User-programmable indicator LED