BuildRobotzRobotsTeeter
Teeter.
BuildRobotz robot · Part 1 · Build

Part 1: build the robot

From a parts list to a wired robot whose motor turns both ways. Print, snap together, wire, power up, motor test.

On this page
  1. 1. Buy the parts
  2. 2. Print the cheek and try it on the motor
  3. 3. Print the spine, rungs and shelf
  4. 4. Fit the motor plug
  5. 5. Snap the body together
  6. 6. Build the junction board
  7. 7. Fix the boards on
  8. 8. Wire it
  9. 9. Power it up and set the buck
  10. 10. Connect the ESP32
  11. 11. Install the Arduino tools
  12. 12. Run the motor test

You need a 3D printer (any bed, PLA), a soldering iron, a multimeter and a computer with a USB port. The parts cost about $31.

Each step has one thing to do and one check. Do not start the next step until the check passes.

1Buy the parts

Order everything on this list. The prices are pack prices, so check them. The cells must be a matched pair of genuine high-drain 18650s. Add a 8.4 V 1 A Li-ion charger if you have none: about $10.

Part Qty About
Dual-shaft TT gearmotor 1:48 1 $3.00
65 mm TT wheel 2 $4.00
ESP32 DevKit (classic WROOM-32) 1 $7.00
GY-521 MPU-6050 1 $2.60
MX1508 motor driver 1 $1.60
Mini360 buck (set to 5.0 V) 1 $0.90
2S BMS with balancing 1 $1.60
2 x 18650 holder, series 1 $1.75
18650 cells 2 on hand
PTC fuse 3 A, power switch 1 each $1.30
470 uF 16 V, 100 nF (2), 100k (3), 33k $0.95
JST-XH 2-pin pair 2 $1.60
DC 5.5 x 2.1 mm jack on a pigtail 1 $0.70
Perfboard scrap, header pins, Dupont jumpers $1.35
Zip ties, a hook-and-loop strap, wire $2.00
A second hook-and-loop strap (both up to 12 mm wide), double-sided foam tape not priced
PLA 24 g $0.39
Total about $31
CheckMeasure each cell with a meter: 3.0-4.2 V each, within 0.05 V of each other.

If it does not work: do not use that cell. See battery safety.

2Print the cheek and try it on the motor

The three prints on the bed: spine, cheek (pegs up), two rungs and the shelf
The three prints on the bed: spine, cheek (pegs up), two rungs and the shelf

Print cheek.stl first: PLA, 0.2 mm layers, 4 walls, 30 % infill, no supports, no brim. It takes about 9 minutes. Push it onto each face of the gearbox in turn, then push a wheel onto the shaft.

cheek.stl

CheckThe two pegs go into the motor's holes with light pressure, and the wheel turns without rubbing the 2.4 mm plate.

If it does not work: measure your motor and change the MEASURE block in snap.py, as in try the cheek.

3Print the spine, rungs and shelf

Print the other two files with the same settings. Each lies flat as it comes out of the file.

spine.stl rungs_shelf.stl

CheckPush a rung into one of the spine's tall slots. Its latch clicks, and squeezing the latch arm lets it out again.

If it does not work: see what you print.

4Fit the motor plug

Solder a red and a black lead and the 100 nF capacitor C3 to the two motor tabs. Crimp the motor half of the K1 plug onto the leads.

CheckThe meter on ohms across the K1 plug reads a few ohms: the motor winding.

If it does not work: see the wire list, wires W22 and W23.

5Snap the body together

Exploded: cheek, motor with the rungs and shelf, spine, boards
Exploded: cheek, motor with the rungs and shelf, spine, boards

Push both rungs into the spine and slide in the shelf. Lay the motor on the spine, then push the cheek on from the other side until the rungs click through it. Push a wheel onto each end of the shaft. The full order is in put it together.

CheckSpin each wheel by hand. Nothing touches.

If it does not work: see put it together.

6Build the junction board

Build the small board JB that carries the battery-sense divider and the power plug, on scrap perfboard: build the junction board.

CheckBefore it goes on the robot, measure it on ohms: VB to GND about 133 kΩ; VS to GND about 33 kΩ (it rises for a moment while C2 charges); VB to VS about 100 kΩ.

If it does not work: look for a solder bridge between rows.

7Fix the boards on

The ESP32 and IMU side of the spine
The ESP32 and IMU side of the spine

Tie the ESP32 to its four pads with two zip ties, USB pointing forward. Push the IMU onto its two pegs and put one tie across it. Strap the battery case to the other face of the spine. Stick the BMS, fuse, switch, JB, MX1508 and Mini360 to the front of the battery case with foam tape. No cells yet.

CheckHold the robot upright and turn the wheels by hand: no board or wire touches a wheel.

If it does not work: see where the boards go.

8Wire it

Print the one-page wiring sheet and wire one connection at a time, ticking each off. Leave K1 (motor) and K2 (power) unplugged, and leave the jumpers off the ESP32 for now.

Wiring sheet (PDF)

Every connection on one page
EVERY CONNECTION ON ONE PAGE · open the drawing for full size, or download wiring_page.svg
CheckMeter on ohms across the robot side of K2: the reading climbs and settles in the kΩ range or higher. Under 100 Ω is a short: find it.

If it does not work: see the full wire list and the schematic.

9Power it up and set the buck

Read battery safety first. Fit the cells, wire the BMS B-, then BM, then B+. Plug K2 and switch on, with the Mini360 output still off the ESP32: it ships set to a random voltage that can kill one. Turn its pot until the output is right.

CheckThe Mini360 output reads 5.00 ± 0.05 V, and the MX1508 MOTOR-A pads read 0 V.

If it does not work: follow the power-up checklist, which has a reading for each connection.

10Connect the ESP32

Switch off. Push the Mini360 output (W15, W16), the battery-sense jumper (W17), the two motor-driver jumpers (W18, W19) and the four IMU jumpers (W24-W27) onto the ESP32. Leave USB unplugged and the motor unplugged at K1. Switch on.

CheckThe ESP32's 5V pin reads 5.0 V and its 3V3 pin reads 3.30 ± 0.1 V.

If it does not work: switch off at once and check W15 and W16 against the power-up checklist, step 6.

11Install the Arduino tools

Install arduino-cli, then the ESP32 board package:

arduino-cli core update-index --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json
arduino-cli core install esp32:esp32 --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json

The Arduino IDE works too: board "ESP32 Dev Module".

Checkarduino-cli core list shows esp32:esp32.

If it does not work: see the arduino-cli documentation.

12Run the motor test

Switch off and plug in K1. Hold the robot with its wheels off the ground, and switch on. Plug in USB with the battery on only if your board passed the diode check. From the top of the repository:

arduino-cli compile -b esp32:esp32:esp32 firmware/teeter_motor_test
arduino-cli upload  -b esp32:esp32:esp32 -p /dev/cu.usbserial-XXXX firmware/teeter_motor_test
arduino-cli monitor -p /dev/cu.usbserial-XXXX -c baudrate=115200

teeter_motor_test.ino on GitHub Raw file

It starts 3 s after reset. Press EN on the ESP32 to run it again.

CheckThe wheels turn one way for 5000 ms, stop, then turn the other way for 5000 ms, with no reset messages on the serial monitor. Note which way they turned first: forward means the top of the tyre moves towards the robot's front.

If it does not work: nothing turns: check the switch, MX1508 power, IN1 on GPIO 25, IN2 on GPIO 26 and the motor on MOTOR-A. See troubleshooting.