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
Pin assignments
Pins and power.
Firmware names are the constants at the top of DIYUGVV1.4.1.ino.
ESP32 pins
| ESP32 pin | Connects to | Firmware name | Function |
|---|---|---|---|
| GPIO19 | Driver IN1 | Motor1_InA | M1 forward (PWM) |
| GPIO18 | Driver IN2 | Motor1_InB | M1 reverse (PWM) |
| GPIO16 | Driver IN3 | Motor2_InA | M2 forward (PWM) |
| GPIO17 | Driver IN4 | Motor2_InB | M2 reverse (PWM) |
| GPIO36 (VP) | Encoder M1, C1 (yellow) | Motor1_EncA | Pulse input, interrupt |
| GPIO39 (VN) | Encoder M1, C2 (green) | Motor1_EncB | Direction input |
| GPIO34 | Encoder M2, C1 (yellow) | Motor2_EncA | Pulse input, interrupt |
| GPIO35 | Encoder M2, C2 (green) | Motor2_EncB | Direction input |
| VIN / 5V | LM2596 OUT+ | 5 V supply | |
| 3V3 | Encoder VCC (both) | Encoder supply | |
| GND | Common ground |
Power wiring
- Battery + (XT60) → inline switch → VBAT rail.
- VBAT → motor driver +12V and LM2596 IN+.
- Before connecting the ESP32, power the LM2596 and turn its trimmer until the output reads 5.0 V on a multimeter.
- LM2596 OUT+ → ESP32 VIN/5V.
- 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 pin | Board for M1 | Board for M2 |
|---|---|---|
| RPWM | GPIO19 | GPIO16 |
| LPWM | GPIO18 | GPIO17 |
| R_EN, L_EN, VCC | 5 V (LM2596 OUT+) | |
| GND | Common ground | |
| B+ / B− | VBAT / battery − | |
| M+ / M− | Motor M1 | Motor 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 sent | Action |
|---|---|
| F + speed A + speed B | Forward |
| B + speed A + speed B | Backward |
| L + speed A + speed B | Turn left |
| R + speed A + speed B | Turn right |
| S | Stop |
Each speed is one raw byte from 1 to 255, not ASCII text. A value of 0 is rejected.