What is it? A 3D printed body, Raspberry Pi Zero, motors & motor controllers, sensors, power boards, and a camera.
What does it run? Python, PID loops, OpenCV, TensorFlow, Keras, and Betabot OS running on Raspbian.
Why? To help you simulate and then quickly test out deep learning and computer vision techniques in the real world.
Read more and buy the kit here.
Check out the main file: bot.py
Check out the installer: install
Check out the startup help: welcome
To get started, write the disk image using sd_restore and pop it into a Raspberry Pi Zero.
As you can see, the gimbals, encoders, and speed controllers are the main cost. I may replace these with large servos for the first version to keep costs down.
Part | US$ |
---|---|
Raspberry Pi 3 | $40 |
12V Power SupplyAdapter | $25 |
Wireless Keyboard and Mouse | $20 |
You'll also need an HDMI cable and a monitor. And a soldering iron and tools.
Controlled by motor outputs 1 and 2. The hips keep the bot balanced forward/backward (pitch). We read our IMU pitch value, and our PID movement controller updates the speeds of the motor outputs 1 and 2 to bring us level.
Controlled by motor outputs 3 and 4. Run by servos, these work with hips and feet when raising and lowering.
Controlled by motor outputs 5 and 6. Run by servos, these angle the feet so they don't catch when walking.
The Pi Zero runs the bot. It runs the main bot.py file automatically on startup (via /etc/rc.local). No heavy HDMI cables go into the bot, keeping it mobile and untethered.
The Pi Zero is listening for SSH connections via the wifi network it's on.
I use the Pi 3 on my desktop plugged into a big monitor to SSH into the Pi Zero and update code and restart scripts.
Next up: Mount the Pi Zero filesystem over the network so I can edit files directly in text editor on the desktop Pi 3.
And after that: The Pi Zero listens to any write of the bot.py file, and every time it is written, it restarts python bot.py
. So you can just hit save on your desktop editor, and the bot starts reacting with the new code instantly.
See parts list above.
Take the 3D printed body, two motors, and six screws. Glue the small magnets onto the back of the motor axles. Place one motor on the side of the body. Rotate until screw holes line up, and screw three screws in half way.
Take one motor sensor board, and slide it into position under the three screws, with chip facing towards and sitting directly under the motor magnet. Screw three screws fully in to hold the motor and board in place. Repeat with the other motor.
Solder the power lead, via the on switch, 5v lead, and speed controllers onto the power board. Take the power board and and place it into the mounting square on the body, and screw it down with four spacing screws
Solder the 8 motor output header pins onto the controller board. Place the controller board on top of the power board, and screw it down.
Take the two speed controller boards and plug the motors into them. Place them down into the body.
Write the Betabot disk image to the SD memory card using sd_restore, and pop it into the Raspberry Pi. Take the Raspberry Pi and place it on the body, with memory card at the outer edge. Screw down with four screws. Plug in the HDMI adapter, and OTG adapter.
Screw the legs onto the motors, and place the servos into the legs and feet, and screw together. Run the leads through the legs and into the controller.
Switch Betabot on. He should wake up after a minute and come to life!