Monthly Archives: February 2019

Rebuild of my “original” balancing robot.

This is the first self-balancing robot that I built that actually worked well. More info about it here. My absolute first self-balancing robot was the “Equaipose bot”, link the page about it here.

This video has gained some attention on youtube, and I think that is why I get at least one email every other week from people asking about the code and schematics for this robot. I have not shared the code of any details about this robot since it is very poorly made and coded. The robot uses multiple Arduinos just to keep the balance and drive the motors, later I also added another Arduino to manage the Ultrasonic sensors and some other stuff. There was also a Raspberry Pi that I planned to use for computer vision experiments, I never came around to doing that using this robot.

Now when I know a lot more about self-balancing robots, and Arduino programming and DIY robots in general, I decided to make a new version of this robot. I new complete rebuild of it. My intention is to make the robot less complicated and also better. I stripped down almost everything in the robot and started over. Still using the same old wooden chassis. The new version is based on a single Arduino MEGA R3 controlling everything in the robot. It reads the MPU6050 IMU, makes all the filtering and balancing calculations, and drives the motors using hardware timers for maximum precision. The new code for this robot is heavily based on the code for my “mini balancing robot”, with some improvements, more info about that robot here. I still use the same old stepper motors, model airplane wheels, and “Big Easy Driver” -stepper motor driver boards. The Arduino MEGA also controls and reads four HC-SR04 ultrasonic sensors using Interrupts. Those sensors are used for obstacle avoidance.

The new version of the robot works now. It balances and drives around avoiding obstacles, but I still have a few things to fix with the code. I want to add a pushbutton for control and a buzzer for feedback, I should also add battery measuring and implement a low voltage cut off to prevent damage to the battery.

I hope to release I video of the robot together with the code and schematic in a couple of weeks.

The servo seen in the pictures is not and will not be implemented in the first version of the code, but the intention is that the servo should be used to make it possible for the robot to raise itself up and start balancing on its own. Maybe I will also ad some sort of remote control since it is a frequently requested feature, But that will be in a later version.