Build book · Rev A · 2 Oct 2026

C3 MiniBot

A palm-sized two-wheel tail-dragger. An ESP32-C3 Super Mini drives two N20 gear motors through a DRV8833, one 18650 cell charges over USB-C, and you steer it from a joystick page on your phone.

Dwg no.
C3MB-001
Units · scale
mm · 1:1
Envelope
82 × 75 × 50 W × L × H, mm
Mass
≈ 135 g with the cell
Top speed
≈ 0.4 m/s 6 V 300 RPM N20 on 3.7 V
Run time
≈ 5 h driving, 3 Ah cell (estimate)
Parts
4 printed + 15 bought lines
Cost
—
Sheet01

Overview

Two drive wheels up front, a ball-tipped skid at the back, and everything else on one printed deck. The battery sits behind the axle, so the robot always rests on its skid.

Rendered C3 MiniBot from the front right: orange printed deck, two white wheels with black tires, green 18650 cell in a black holder at the back, three small blue and purple circuit boards on the deck.
FIG 1.1Generated in Fusion from cad/minibot_fusion.py. Electronics and battery are reference models for checking fit.
  1. 118650 cell in a 1-cell holder, zip-tied across the rear deck
  2. 2DRV8833 dual H-bridge, drives both motors
  3. 3ESP32-C3 Super Mini, Wi-Fi and control
  4. 4USB-C for programming, faces the front edge
  5. 5TP4056 charger with cell protection
  6. 6USB-C for charging, also on the front edge
  7. 7Power switch, pressed up through a slot in the deck
  8. 8Motor cradle and clamp, both N20s hang underneath
  9. 9TPU tire stretched onto a lipped rim
  10. 10Wheel hub with a D-bore for the 3 mm shaft
USB-C · charge 5 V in 18650 cell 3.0–4.2 V · ≈ 3 Ah B± TP4056 1 A charger + DW01A protection OUT+ Switch SS12D00 VBAT · 3.0–4.2 V VM DRV8833 dual H-bridge · 1.5 A 1N5817 ESP32-C3 Super Mini LDO → 3.3 V ÷2 divider · 2 × 100 kΩ GPIO3 · ADC GPIO 5·6·7·10 · PWM 20 kHz Left N20 Right N20 Phone browser Wi-Fi USB-C · prog Ground is shared by every block and is not drawn. Red = battery power, amber = ESP supply, blue = control.
FIG 1.2Power and signal flow. The motors take battery voltage straight from the rail; the ESP32 gets it through a Schottky diode so a USB cable can never push 5 V back into the cell.
Sheet02

Parts & cost

Prices checked 2 Oct 2026 for a US buyer. Pick a vendor per row to build your own cart, or compare the four ready-made plans below. Prices move, especially on AliExpress and Amazon around sales.

Your cart
—
Other view
—

FIG 2.1Cost per sourcing plan, split by part group. Hover a segment for its amount.
PartQtyAliExpressAmazonSpecialist

Buy the cell from a battery specialist

Real 18650s top out around 3,500 mAh. "9,900 mAh" cells on AliExpress and Amazon are relabeled cells that often test below 2,000 mAh, so those rows are disabled. Battery shipping is ground only.

Check the TP4056 photo

You want the 6-pad board (B+, B−, OUT+, OUT−) with two extra chips: the DW01A and FS8205A. The 4-pad version has no protection.

Small parts cost the most per order

Switch the view to Out of pocket. Resistors, screws and filament come in packs, so a first build costs several times the per-robot figure. A second robot is nearly free.

Sheet03

Printed parts

Four STLs, already oriented for the bed, none need supports. Masses come from the CAD volumes at about 80 % fill; times assume a 0.4 mm nozzle at 0.2 mm layers.

Chassis seen from below: flat deck with the motor cradle box and the cone-shaped tail skid.

Chassis × 1

File
stl/chassis.stl
Material
PLA or PETG
Mass
≈ 24 g
Time
≈ 1 h 40 min
On bed
Deck face down
Settings
3 walls · 25 % gyroid
Motor clamp: a flat orange plate with four screw holes.

Motor clamp × 1

File
stl/motor_clamp.stl
Material
PLA or PETG
Mass
≈ 4 g
Time
≈ 15 min
On bed
Either face
Settings
3 walls · 40 %
Wheel with black tire: six round lightening holes and a D-shaped center bore.

Wheel × 2

File
stl/wheel_x2.stl
Material
PLA or PETG
Mass
≈ 4.5 g each
Time
≈ 25 min each
On bed
Outer face down
Settings
3 walls · 30 %
Ø44 / Ø37.65.8 wide

Tire × 2

File
stl/tire_x2_TPU.stl
Material
TPU 95A
Mass
≈ 3 g each
Time
≈ 20 min each
On bed
Flat
Settings
100 % · 20 mm/s
SECTION A–A · through the motor can · 12 px = 1 mm 12.3 channel Deck · 3.0 Side wall · 5.0 N20 can · 12 × 10 0.3 squeeze Clamp · 3.0 M2 × 8 self-tapper
FIG 3.1How the motors are held. The cradle walls stop 0.3 mm short of the motor's height, so tightening the clamp pinches each motor. Stop at snug: the screws are threading into plastic.
Sheet04

Dimensions

Drawn to scale from the CAD model. The skid is sized so the deck sits level: its ball tip reaches the floor at exactly the wheel radius below the axle.

75 22 30 50 42 axle → skid Ø44 SIDE · from the right · front →
FIG 4.1Side elevation. Dashed lines are the cradle, motor and clamp behind the wheel. Ground clearance under the clamp is 14.3 mm.
ESP32 TP4056 DRV8833 switch 18650 · across the deck 81 track ▲ FRONT 82 rear deck 75
FIG 4.2Plan and board placement. Both USB-C ports overhang the front edge. Dashed: motors and skid under the deck, the wire pass-through in the middle.
Sheet05

Wiring

Thirteen nets. Hover a net name, or a row in the table, to trace it through the diagram. Pad positions are simplified: wire by the labels printed on your boards.

VBAT · switched · 3.0–4.2 V GND 18650 holder + − USB-C · charge TP4056 + DW01A protection B+ B− OUT− OUT+ SS12D00 USB-C · program ESP32-C3 Super Mini 5VG3V343210 5678 · LED9 · BOOT102021 1N5817 stripe ↓ R1100k R2100k DRV8833 HW-627 IN1IN2IN3IN4EEPULT VCCOUT1OUT2OUT3OUT4GND n/cn/c LEFT N20 RIGHT N20 100 nF across each motor 470 µF + on top
FIG 5.1Complete wiring. The hop on the GPIO3 wire marks a crossing, not a connection. Dots are joints. Hollow pads are unused.
NetFromToNotes
BAT+Holder +TP4056 B+Unswitched cell positive
BAT−Holder −TP4056 B−Only the cell connects here
OUT+TP4056 OUT+Switch, middle pin
VBATSwitch, outer pinDRV VCC · 470 µF + · R1 · diode anode3.0–4.2 V
GNDTP4056 OUT−ESP G · DRV GND · 470 µF − · R2never B−
5VDiode cathode (stripe)ESP 5V≈ VBAT − 0.25 V
VSENSER1 / R2 midpointESP GPIO3VBAT ÷ 2
IN1ESP GPIO5DRV IN1 / AIN1PWM, left motor
IN2ESP GPIO6DRV IN2 / AIN2PWM, left motor
IN3ESP GPIO7DRV IN3 / BIN1PWM, right motor
IN4ESP GPIO10DRV IN4 / BIN2PWM, right motor
MOT LDRV OUT1, OUT2Left N20 terminals100 nF across; polarity set in firmware
MOT RDRV OUT3, OUT4Right N20 terminals100 nF across; polarity set in firmware
2.53.03.54.0 Cell (VBAT) ESP 3.3 V rail − 0.25 V diode, LDO caps at 3.3 4.20 full · charger stops 3.70 nominal 3.30 firmware cuts motors 2.40 DW01A disconnects motorslocked 3.30 regulated ≈ 3.0 at cutoff GPIO3 sees half of VBAT: 1.65–2.10 V, inside the ADC's range.
FIG 5.2Why the cutoff is 3.30 V. Below that, the diode and regulator drop pull the ESP's supply toward its 3.0 V minimum.

Pin map

Chosen so nothing interferes with boot or Wi-Fi.

GPIOGoes toWhy this pin
5 · 6DRV IN1 · IN2Plain I/O on the same header row
7 · 10DRV IN3 · IN4Skips 8 and 9, which are boot pins
3Divider midpointADC1 channel. ADC2 doesn't work while Wi-Fi is on.
8Onboard blue LEDStatus. Active low.
9BOOT buttonLeft alone
20 · 21—UART pins, kept free

Three rules that protect the cell

Loads go on OUT−, never B−. The diode's stripe faces the ESP. Leave the HW-627's EEP pin unconnected, because its J2 bridge already ties it to VCC.

Sheet06

Assembly

About an hour once the parts are printed. The motors go in from underneath with their wheels already on.

Exploded view: battery and boards lifted above the deck, motors with wheels and tires dropped below it, the clamp plate at the bottom.
FIG 6.1Exploded view. Wheels and tires slide off the shafts; the clamp closes the cradle from below.
  1. Print the parts

    Chassis, clamp, two wheels in PLA or PETG. Two tires in TPU 95A. No supports.

  2. Prepare the motors

    Solder a 100 nF capacitor across each motor's terminals, then about 8 cm of wire to each. Bend the wires back along the motor and twist each pair.

  3. Fit wheels and tires

    Line up the D-flat and press each wheel on, hub boss toward the motor. Support the gearbox, not the can. Too tight: turn a 3 mm drill through the bore by hand. Loose: a drop of CA on the flat. Stretch the tires on.

  4. Fit the switch

    From underneath, push the SS12D00 into the slot near the front edge so the lever pokes up through the deck. Glue it.

  5. Seat the motors

    Turn the chassis over. Drop each motor into the cradle: gearbox face against the outer wall, shaft down the U-slot, end caps toward the middle. Feed the wires up through the center hole.

  6. Close the clamp

    Four M2 × 8 self-tapping screws. Stop at snug. Optional M1.6 × 3 screws through the end walls into the gearbox faces lock the motors in place.

  7. Mount the battery holder

    Foam tape underneath, laid across the rear deck, two zip ties through the four slots.

  8. Mount the boards

    Foam tape. ESP32 front-left and TP4056 front-right, both with USB-C facing forward. DRV8833 behind the ESP32. The diode, capacitor and divider go in the open middle.

  9. Wire and check

    Follow Sheet 05. Before the cell goes in, measure VBAT to GND with a multimeter: there must be no short. Flash the firmware, insert the cell, switch on.

Underside view: the motor clamp plate with four screws, the cone-shaped tail skid, zip-tie slots, and both wheels.
FIG 6.2Finished underside. The clamp plate covers both motors; the skid is printed as part of the chassis.
Sheet07

Firmware

firmware/minibot/minibot.ino. The ESP32 runs its own Wi-Fi network and a tiny web server, so the phone needs no app. Arduino IDE, board ESP32C3 Dev Module, USB CDC On Boot: Enabled, no extra libraries.

setup() Attach PWM to GPIO 5, 6, 7, 1020 kHz · 8-bit · motors coast LED pin · Serial at 115200LED is GPIO8, active low Start the Wi-Fi access pointMiniBot-XXXX · WPA2 Lower TX power to 8.5 dBmworks around the weak antenna Register HTTP routes/ /d /s server.begin()prints the address on Serial loop() ↻
FIG 7.1Boot, run once.
loop() server.handleClient() handleDrive() → cmdhandleStatus() → JSON ≥ 100 ms sincelast battery read? yes readBattery()smooth · set low flag no No command for 500 msor battery low? yes Targets → 0failsafe stop no Arcade mixL = y + 0.6x · R = y − 0.6x · ÷ max(1,|L|,|R|) Motor.update() for each wheelduty = 60 + 195·|v| · ramp ≤ 1 per ms Motor.write() → slow-decay PWM LED: fast = low · solid = driving · slow = idle repeat, every few ms
FIG 7.2The main loop never blocks, so a lost phone or a flat cell stops the wheels within half a second.
Phone browser ESP32 web server Motor control join Wi-Fi “MiniBot-XXXX” · WPA2 GET / 200 · joystick page every 60 ms while touching GET /d?x=0.35&y=0.80 204 No Content cmdX, cmdY · lastCmd = now wheels ramp toward the new targets every 2 s GET /s {"mv":3912,"low":false} finger lifts → GET /d?x=0&y=0 ramp to 0 no request for 500 ms → failsafe sets targets to 0
FIG 7.3Phone ↔ robot traffic. Plain HTTP GETs keep the firmware library-free; the 60 ms resend doubles as a heartbeat.

Drive simulator

This runs the firmware's own math. Drag the knob, or focus it and use the arrow keys. The sliders change the same constants as the sketch.

fwdrevLR
70 % 0.60 60
Left wheel—
duty0
GPIO5 IN10
GPIO6 IN20
Right wheel—
duty0
GPIO7 IN30
GPIO10 IN40
FIG 7.4Slow decay: one input stays high while the other switches. Each 50 µs period alternates between driving and braking, so the motor sees a smooth average.
FIG 7.5Ramp and failsafe, simulated from the sketch: full-ish forward at 100 ms, last command at 580 ms, phone silent after that.

Bridge states

What the DRV8833 does for each input pair.

IN1IN2BridgeUsed for
00CoastStopped (duty 0)
10ForwardDrive phase, forward
01ReverseDrive phase, reverse
11BrakeOff phase of each PWM period

HTTP API

RouteQueryReplySent
GET /—Joystick pageOn connect
GET /dx, y ∈ −1…1204Every 60 ms while touching
GET /s—{"mv","low"}Every 2 s
Functions · minibot.ino
void setup()

Runs once. Attaches PWM to the four motor pins, starts the Wi-Fi network named after the chip's MAC, lowers TX power, registers /, /d and /s, starts the server.

once at bootFig 7.1
void loop()

Serves HTTP, reads the battery every 100 ms, applies the failsafe and low-battery stop, mixes joystick into wheel targets, ramps both motors and sets the LED.

continuousFig 7.2
void handleDrive()

Handles GET /d?x=&y=. Clamps both to −1…1, stores them in cmdX/cmdY, stamps lastCmd, replies 204.

per request≈ 16 / s
void handleStatus()

Handles GET /s. Replies with the smoothed battery millivolts and the low flag as JSON.

per requestevery 2 s
void readBattery()

Reads GPIO3 in millivolts and doubles it for the divider. Smooths with a 0.1 weight. Sets lowBat under 3,300 mV, clears it over 3,450 mV. Under 1,000 mV it assumes USB power.

every 100 mshysteresis 150 mV
void Motor::update(float target, float maxStep)

Turns a −1…1 target into a duty: dead band under 0.04, otherwise MIN_DUTY + (255 − MIN_DUTY)·|v|·trim. Moves the current duty toward it by at most maxStep, then writes.

per loop, per wheel
void Motor::write(int duty)

−255…255 to slow-decay PWM. Forward holds IN1 at 255 and sets IN2 to 255 − duty. Reverse mirrors that. Zero sets both low, so the motor coasts. Applies invert.

Fig 7.4
void Motor::begin()

Attaches both of the motor's inputs to PWM and writes 0.

from setup()
void pwmAttach(int pin, int ch) · pwmWrite(pin, ch, duty)

Compatibility shim. Core 3.x uses ledcAttach/ledcWrite by pin; core 2.x uses ledcSetup, ledcAttachPin and channel numbers.

compile-time switch
Functions · phone page (JavaScript)
move(e)

Pointer position to x, y in −1…1, clipped to the circle, and moves the knob.

send(force)

Sends /d with x and y scaled by the speed slider. Skips if a request is still in flight unless forced, so slow Wi-Fi never queues up stale commands.

stop()

On finger lift or cancel: zeroes x and y and sends at once.

kb()

WASD and arrow keys to x and y. Diagonals scale by 0.7.

Tuning constants

At the top of the sketch. Change, re-upload, done.

ConstantDefaultChange it when
INVERT_LEFT / _RIGHTfalseA wheel drives backwards
TRIM_LEFT / _RIGHT1.0The robot veers on a straight line. Lower the faster side, e.g. 0.95.
TURN_GAIN0.6Steering feels twitchy (lower) or lazy (raise)
MIN_DUTY60Wheels hum without turning (raise) or creep at the dead band (lower)
RAMP_PER_MS1.0The ESP resets or the robot noses over when stopping (lower)
FAILSAFE_MS500Weak Wi-Fi makes it stutter (raise a little)
LOW_MV3300Rarely. Lower costs ESP headroom; see Fig 5.2.
AP_PASSminibot123Always, before you take it anywhere. 8+ characters.
Functions · CAD generator (minibot_fusion.py)
FunctionBuilds
build_chassis()Deck outline and holes, motor cradle, U-slots, clamp pilots, tail skid (revolved), corner fillets
build_clamp()Clamp plate with four M2 clearance holes
build_wheel() · build_tire()Revolved rim with lips, lightening holes, D-bore; TPU tire ring. Two occurrences each.
build_motor() · build_reference()Non-printed N20, holder, cell and boards for clearance checks
write_stl() · export_all()Bed-oriented binary STLs, STEP and F3D into OUT_DIR
Sheet08

Troubleshooting

Start at the top and follow the first “no”.

LED blinks after switch-on? MiniBot-XXXX network visible? Page opens at 192.168.4.1? Battery shows 3.3 V or more? Both wheels turn? yesyesyesyesyes nonononono No power reaching the ESP32.Check the switch, diode stripe, TP4056 OUT±. Move closer and power-cycle.Serial Monitor at 115200 shows the boot line. The phone fell back to mobile data.Tap “stay connected” or turn data off. Low-battery lockout is on.Charge through the TP4056 USB-C, switch off. Hum only: raise MIN_DUTY.Silent: DRV VCC/GND, EEP high (J2), IN1–IN4. Driving. Tune INVERT_* and TRIM_*.
FIG 8.1Most first-power-on problems fall into one of these five.
SymptomLikely causeFix
ESP resets when the motors startVoltage dip on VBATFit the 470 µF close to the DRV8833, use thicker or shorter power wires, lower RAMP_PER_MS. A worn cell sags more.
Robot noses over when it stopsDeceleration too sharp for the short wheelbaseLower RAMP_PER_MS to 0.6
Wheel slips on the shaftBore printed oversizeDrop of CA on the flat, or reduce bore_d in the CAD script and reprint
Skid drags on carpetIt's a hard-floor designA felt pad or PTFE tape on the tip
Charger LED never turns fullRobot switched on while chargingSwitch off; the load confuses the charge termination
Upload failsBoard not in download modeHold BOOT, tap RESET, release BOOT, upload again