Robot Builds / DART / Wiring schematic
DART · WIRING SCHEMATIC

DART wiring schematic.

Battery, power switch, buck converter, ESP32, motor driver and encoders. Pin numbers match the DIYUGVV v1.4.1 firmware.

ESP32-WROOM-323S LiPo 11.1 VLM2596 → 5 VL298N / IBT-2Bluetooth
Wiring diagram

How it all connects.

Every ground symbol joins one common ground. On a phone, scroll the diagram sideways.

Battery 11.1 V 5 V 3.3 V GND Motor PWM Motor power Encoder
DART wiring schematic 3S LiPo through a switch feeds the motor driver and an LM2596 buck converter. The buck converter's 5 V output powers the ESP32. ESP32 GPIO 19 and 18 drive motor 1, GPIO 16 and 17 drive motor 2. Encoder 1 connects to GPIO 36 and 39, encoder 2 to GPIO 34 and 35. 3S LiPo 11.1 V 3000 mAh 30C + − Switch XT60 inline VBAT 11.1 V LM2596 set to 5.0 V out IN+ IN− OUT− OUT+ 5 V ESP32 DevKit WROOM-32 VIN 3V3 GND 3V3 GPIO19 GPIO18 GPIO16 GPIO17 GPIO36 (VP) GPIO39 (VN) GPIO34 GPIO35 Motor driver L298N (or 2× IBT-2) +12V GND IN1 IN2 IN3 IN4 OUT1 OUT2 OUT3 OUT4 ENA / ENB jumpers fitted M1 right track M2 left track Encoder M1 (optional) VCC GND C1 (yellow) C2 (green) 3V3 Encoder M2 (optional) VCC GND C1 (yellow) C2 (green) 3V3 DigInto · DART wiring schematic · firmware DIYUGVV v1.4.1
Pin assignments

Pins and power.

Firmware names are the constants at the top of DIYUGVV1.4.1.ino.

ESP32 pins

ESP32 pinConnects toFirmware nameFunction
GPIO19Driver IN1Motor1_InAM1 forward (PWM)
GPIO18Driver IN2Motor1_InBM1 reverse (PWM)
GPIO16Driver IN3Motor2_InAM2 forward (PWM)
GPIO17Driver IN4Motor2_InBM2 reverse (PWM)
GPIO36 (VP)Encoder M1, C1 (yellow)Motor1_EncAPulse input, interrupt
GPIO39 (VN)Encoder M1, C2 (green)Motor1_EncBDirection input
GPIO34Encoder M2, C1 (yellow)Motor2_EncAPulse input, interrupt
GPIO35Encoder M2, C2 (green)Motor2_EncBDirection input
VIN / 5VLM2596 OUT+5 V supply
3V3Encoder VCC (both)Encoder supply
GNDCommon ground

Power wiring

  1. Battery + (XT60) → inline switch → VBAT rail.
  2. VBAT → motor driver +12V and LM2596 IN+.
  3. Before connecting the ESP32, power the LM2596 and turn its trimmer until the output reads 5.0 V on a multimeter.
  4. LM2596 OUT+ → ESP32 VIN/5V.
  5. Battery −, driver GND, LM2596 IN−/OUT−, ESP32 GND and encoder GND all join to one common ground.
Motor driver

Pick your driver.

The firmware drives both motors with PWM on two pins each, so it works with either board.

L298N, one board for both motors

  • IN1–IN4 wired as in the diagram.
  • Keep the ENA and ENB jumpers fitted. Speed comes from PWM on the IN pins.
  • OUT1/OUT2 → M1, OUT3/OUT4 → M2.
  • The L298N is rated about 2 A per channel. 775 motors can draw much more under load or stall, so use the IBT-2 for full-power builds.

IBT-2 / BTS7960, one board per motor

IBT-2 pinBoard for M1Board for M2
RPWMGPIO19GPIO16
LPWMGPIO18GPIO17
R_EN, L_EN, VCC5 V (LM2596 OUT+)
GNDCommon ground
B+ / B−VBAT / battery −
M+ / M−Motor M1Motor M2
Before you power up

Notes and control.

Build notes

  • Encoders are optional. The firmware counts encoder pulses but does not need them to drive. If your motors have no Hall encoder, leave GPIO 34–39 unconnected.
  • GPIO 34, 35, 36 and 39 are input-only and have no internal pull-ups. Use encoders with on-board pull-ups, or add 10 kΩ resistors from each signal to 3V3.
  • Power the encoders from 3V3, not 5 V, so their outputs stay safe for the ESP32.
  • If the robot turns the wrong way, swap that motor's two wires at the driver outputs. If left and right are swapped, swap M1 and M2.
  • Unplug the battery while the ESP32 is connected to your computer over USB.

Bluetooth control protocol

The ESP32 shows up as a classic Bluetooth serial device named PixRover1. Any Bluetooth serial terminal app can drive it with these commands:

Bytes sentAction
F + speed A + speed BForward
B + speed A + speed BBackward
L + speed A + speed BTurn left
R + speed A + speed BTurn right
SStop

Each speed is one raw byte from 1 to 255, not ASCII text. A value of 0 is rejected.