I threw this together as a demo for a few bits of technology.

It’s nothing fancy, but came out well enough – just a Pi Pico receiving control via UDP, and itself controlling a differential drive via H-bridge. It’s all powered by a single lithium cell, which is stepped up to provide 5V and 12V lines (via JST headers for future expansion). This system used to be in Lua on the ESP8266, but I migrated to code to micropython.

I also pushed out an Android app in Godot in 20 mins to control it. Godot is pretty great!

Unfortunately, the motors are far too powerful. Even tapping the controls sends it flying! So I’m going to have to add PWM to control the motor power – which I’d have to do anyway because no two motors will ever be perfectly balanced. I could also have added a feedback loop with rotary encoders on the motors, but “dumb” manual balancing of the motors is accurate enough for such a simple system.

The control protocol is bidirectional, literally just strings converted to bytes, sent via UDP, converted back into strings and split. The robot acts as a Wi-Fi hotspot and so has a known IP (although using UDP broadcast works OK too).

I used brass for the construction because I had spare plates lying around. It’s easy to cut and drill, durable, reasonably rigid, looks neat, and easily available in Asia (because shrines and placards).

One lesson when building any type of robot: separate your design and construction. Never make design decisions on the fly while building! This was always the biggest contributing factor to weird problems in earlier builds. The other lesson is to leave space on your main power and control boards for future expansion – some JST header sockets on each power line and place to add something similar to the GPIO lines is fine!