- Soldering iron
- Multimeter
- USB cable (for flashing the ESP32)
- PlatformIO (VS Code)
- Bluepad32 library
The Brookstone Rover was a Wi-Fi-controlled tracked "spy tank" that streamed video to an old iOS app. The app is long dead, but the chassis is fantastic donor hardware: rugged rubber tank treads, two geared DC motors, and a roomy shell with a battery compartment. This project rips out the original control board and replaces the brains with an ESP32 DevKit V1, driving the original motors through a DRV8833 dual H-bridge and steering it all from an Xbox/PS4/PS5 BLE gamepad via the Bluepad32 library.
The end result: arcade-style driving, one stick for throttle and one for steering, with smooth ramped acceleration and a disconnect failsafe.
The 6xAA NiMH pack supplies about 7.2V. That splits two ways:
- Straight to the DRV8833's VCC pin. On this chip the motor supply and logic supply are the same rail (rated 2.7 to 10.8V), so the battery voltage feeds the H-bridges directly.
- Through the MP1584 buck converter, stepped down to 5V, into the ESP32's VIN pin.
A single toggle switch on the battery positive line kills everything at once. The ESP32 takes its ground from the buck converter's output (OUT-), not from the battery directly. Because the buck is non-isolated, that output ground is the same node as the battery negative and the DRV8833 ground, so everything ends up on a common ground, which the logic signals need to mean anything.
Gotcha worth a mention: the DRV8833 has a sleep/enable pin. On many breakout boards an onboard jumper holds it enabled automatically, but on the board used here that pin sat low (asleep) and the H-bridges ignored every command until it was tied to the ESP32's 3.3V output. If your motors stay dead while your code looks perfect, check the enable pin before anything else.
How It Works: Control SignalsFour ESP32 GPIO pins drive the DRV8833 inputs:
- GPIO 14 to IN1 (left motor A)
- GPIO 27 to IN2 (left motor B)
- GPIO 26 to IN3 (right motor A)
- GPIO 25 to IN4 (right motor B)
All four are PWM-capable. One harmless quirk: GPIO 14 emits a brief PWM pulse during ESP32 boot, so the left track twitches once on power-up before the firmware takes over. If it bothers you, move IN1 to a boot-clean pin (such as GPIO 13) or add a pulldown resistor. The motor outputs (OUT1 to OUT4) wire straight to the two motors; if a track runs backwards, just swap that motor's two output wires.
How It Works: FirmwareThe firmware uses Bluepad32, which handles BLE gamepad pairing and gives a clean API for reading stick axes. The control scheme is arcade-style mixing:
- Left stick (Y axis) to throttle (forward/reverse)
- Right stick (X axis) to steering (turn left/right)
These mix into per-track speeds: left = throttle + steer, right = throttle - steer. Push only the throttle and it drives straight; push only steering and it spins in place.
A few touches that make it drive nicely:
- PWM speed control via the ESP32's hardware LEDC peripheral at 20 kHz (above the audible range, so no motor whine).
- A ~10% stick deadzone so a resting stick produces zero output, no jitter or creep.
- A ramp limiter that caps how fast the motor command can change, smoothing acceleration and sparing the gearbox.
- A disconnect failsafe: if the gamepad drops its BLE connection, both motors stop immediately.
The driver uses slow-decay ("drive/brake") PWM, which delivers more torque per duty cycle than fast decay. That means a bit more pep and top speed, at the cost of the motors running slightly warmer and braking when you release the stick.
Build Steps- Gut the original board. Remove the old control PCB, keeping the motors and battery compartment.
- Set the buck converter to 5.0V first. Power the MP1584 from the battery and adjust its trimpot until the output reads 5.0V on a multimeter. Do this before connecting the ESP32, or you can over-volt it.
- Wire power. Battery+ through the switch, then split to the DRV8833 VCC and the buck input. Buck OUT+ (5V) to ESP32 VIN, and buck OUT- (GND) to ESP32 GND. Tie the battery negative, buck input ground, and DRV8833 GND together so everything shares a common ground.
- Wire signals. ESP32 GPIO 14/27/26/25 to DRV8833 IN1 to IN4. Motor terminals to OUT1 to OUT4.
- Flash the firmware (PlatformIO, Arduino framework, with Bluepad32 as a dependency).
- Pair your gamepad. On Xbox One, hold the Pair button until the light flashes fast; Bluepad32 picks it up automatically.
- Test and tune. If a track runs backwards, swap its output wires. Adjust the deadzone and ramp values to taste.
- The original camera streamed over the dead board's Wi-Fi stack, so it isn't easily reusable on its own. A self-contained ESP32-CAM is the cleaner route for FPV.
- Possible upgrades: a battery voltage monitor, headlight LEDs on a spare GPIO, or a small OLED status display.




Comments