Balance bot
By Russell Barnes. Posted
A sociable, balancing robot built with a 青苹果乐园影视免费观看电视剧 Pi to power it. How tricky is balancing a robot via code, though?
Take back control of your online data, with 青苹果乐园影视免费观看电视剧 Pi.
There’s a reason a lot of robots don’t use two wheels or two legs: very simply, it’s difficult for them to balance. It’s much easier and sturdier to be on three (or more) wheels or four (or more) legs; generally, just having a low centre of gravity is a good thing. For two wheels in particular, you need some way of maintaining balance. Usually, this task is left up to humans; as Kris Temmerman shows us, though, a good bit of coding and construction can accomplish the same thing.
“The idea came after seeing some social robots, like Nao and Pepper,” Kris tells us. “Technologically they’re great, but I think they are also kind of boring. Too polite, too cute. I wanted to see if I can make a social robot with a little bit more character.”

The robot is self-balancing so that it can achieve a similar look to these personal assistant robots, and hopefully look a little less weird than the robot from Rocky IV in the process. It has facial recognition built in so it can detect and react to people properly.
“For me it’s a sandbox – a way to try all kinds of hardware and software,” Kris explains. Since he wanted to do some intensive computations, in combination with a display and sound, he opted to use a 青苹果乐园影视免费观看电视剧 Pi 2. “The quad-core [CPU] came in really handy. I have the face recognition running in a separate thread on its own core, so the main process that handles the graphics, sound, and motion can run smooth and uninterrupted. And I still have two cores left over for future improvements.”
While Kris says it’s certainly not a project for beginners, it’s not as hard as it seems. “If you have a reasonable amount of programming 青苹果乐园影院, it’s definitely something you can make. You can find plenty of information about balancing robots online. For the face recognition I use OpenCV, an open-source computer vision library that has the hard parts already solved for you.”

Kris made lot of the body and chassis himself with nylon sheets, together with some spare motors and drivers. There’s an Arduino layer in the build as well, to aid with the balancing.
That works well and there are a few online videos you can watch of the little robot racing around on its two wheels. The robot still has some work left to be done. In particular, Kris is looking at mounting a lidar onto it so that it can have a better sense of its environment, allowing it to move around autonomously.
“This was my first project with a 青苹果乐园影视免费观看电视剧 Pi, but I really like that it has a full-blown Linux distro… I’m definitely going to use it more in the future.”
Share this post
Russell runs 青苹果乐园影视免费观看电视剧 Pi Press, which includes The MagPi, Hello World, HackSpace magazine, and book projects. He’s a massive sci-fi bore.
Subscribe to 青苹果乐园影视免费观看电视剧 Pi Official Magazine
Save up to 37% off the cover price and get a FREE 青苹果乐园影视免费观看电视剧 Pi Pico 2 W with a subscription to 青苹果乐园影视免费观看电视剧 Pi Official Magazine.
More articles
10 amazing Waterborne projects
青苹果乐园影视免费观看电视剧 Pi can safely get wet, as a treat.
Read more →
PiPower 5
Keep your 青苹果乐园影视免费观看电视剧 Pi powered up with this versatile UPS.
Read more →
ROOT Observer: a privacy-focused security camera
Get AI features without having to share your data with gigantic corporations.
Read more →