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
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.
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.
cad/minibot_fusion.py. Electronics and battery are reference models for checking fit.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.
| Part | Qty | AliExpress | Amazon | 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.
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.
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.
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.
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.
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.
| Net | From | To | Notes |
|---|---|---|---|
| BAT+ | Holder + | TP4056 B+ | Unswitched cell positive |
| BAT− | Holder − | TP4056 B− | Only the cell connects here |
| OUT+ | TP4056 OUT+ | Switch, middle pin | |
| VBAT | Switch, outer pin | DRV VCC · 470 µF + · R1 · diode anode | 3.0–4.2 V |
| GND | TP4056 OUT− | ESP G · DRV GND · 470 µF − · R2 | never B− |
| 5V | Diode cathode (stripe) | ESP 5V | ≈ VBAT − 0.25 V |
| VSENSE | R1 / R2 midpoint | ESP GPIO3 | VBAT ÷ 2 |
| IN1 | ESP GPIO5 | DRV IN1 / AIN1 | PWM, left motor |
| IN2 | ESP GPIO6 | DRV IN2 / AIN2 | PWM, left motor |
| IN3 | ESP GPIO7 | DRV IN3 / BIN1 | PWM, right motor |
| IN4 | ESP GPIO10 | DRV IN4 / BIN2 | PWM, right motor |
| MOT L | DRV OUT1, OUT2 | Left N20 terminals | 100 nF across; polarity set in firmware |
| MOT R | DRV OUT3, OUT4 | Right N20 terminals | 100 nF across; polarity set in firmware |
Chosen so nothing interferes with boot or Wi-Fi.
| GPIO | Goes to | Why this pin |
|---|---|---|
| 5 · 6 | DRV IN1 · IN2 | Plain I/O on the same header row |
| 7 · 10 | DRV IN3 · IN4 | Skips 8 and 9, which are boot pins |
| 3 | Divider midpoint | ADC1 channel. ADC2 doesn't work while Wi-Fi is on. |
| 8 | Onboard blue LED | Status. Active low. |
| 9 | BOOT button | Left alone |
| 20 · 21 | — | UART pins, kept free |
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.
About an hour once the parts are printed. The motors go in from underneath with their wheels already on.
Chassis, clamp, two wheels in PLA or PETG. Two tires in TPU 95A. No supports.
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.
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.
From underneath, push the SS12D00 into the slot near the front edge so the lever pokes up through the deck. Glue it.
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.
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.
Foam tape underneath, laid across the rear deck, two zip ties through the four slots.
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.
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.
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.
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.
What the DRV8833 does for each input pair.
| IN1 | IN2 | Bridge | Used for |
|---|---|---|---|
| 0 | 0 | Coast | Stopped (duty 0) |
| 1 | 0 | Forward | Drive phase, forward |
| 0 | 1 | Reverse | Drive phase, reverse |
| 1 | 1 | Brake | Off phase of each PWM period |
| Route | Query | Reply | Sent |
|---|---|---|---|
| GET / | — | Joystick page | On connect |
| GET /d | x, y ∈ −1…1 | 204 | Every 60 ms while touching |
| GET /s | — | {"mv","low"} | Every 2 s |
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.
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.
Handles GET /d?x=&y=. Clamps both to −1…1, stores them in cmdX/cmdY, stamps lastCmd, replies 204.
Handles GET /s. Replies with the smoothed battery millivolts and the low flag as JSON.
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.
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.
−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.
Attaches both of the motor's inputs to PWM and writes 0.
Compatibility shim. Core 3.x uses ledcAttach/ledcWrite by pin; core 2.x uses ledcSetup, ledcAttachPin and channel numbers.
Pointer position to x, y in −1…1, clipped to the circle, and moves the knob.
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.
On finger lift or cancel: zeroes x and y and sends at once.
WASD and arrow keys to x and y. Diagonals scale by 0.7.
At the top of the sketch. Change, re-upload, done.
| Constant | Default | Change it when |
|---|---|---|
| INVERT_LEFT / _RIGHT | false | A wheel drives backwards |
| TRIM_LEFT / _RIGHT | 1.0 | The robot veers on a straight line. Lower the faster side, e.g. 0.95. |
| TURN_GAIN | 0.6 | Steering feels twitchy (lower) or lazy (raise) |
| MIN_DUTY | 60 | Wheels hum without turning (raise) or creep at the dead band (lower) |
| RAMP_PER_MS | 1.0 | The ESP resets or the robot noses over when stopping (lower) |
| FAILSAFE_MS | 500 | Weak Wi-Fi makes it stutter (raise a little) |
| LOW_MV | 3300 | Rarely. Lower costs ESP headroom; see Fig 5.2. |
| AP_PASS | minibot123 | Always, before you take it anywhere. 8+ characters. |
| Function | Builds |
|---|---|
| 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 |
Start at the top and follow the first “no”.
| Symptom | Likely cause | Fix |
|---|---|---|
| ESP resets when the motors start | Voltage dip on VBAT | Fit 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 stops | Deceleration too sharp for the short wheelbase | Lower RAMP_PER_MS to 0.6 |
| Wheel slips on the shaft | Bore printed oversize | Drop of CA on the flat, or reduce bore_d in the CAD script and reprint |
| Skid drags on carpet | It's a hard-floor design | A felt pad or PTFE tape on the tip |
| Charger LED never turns full | Robot switched on while charging | Switch off; the load confuses the charge termination |
| Upload fails | Board not in download mode | Hold BOOT, tap RESET, release BOOT, upload again |