Building A Ball-Balancing Robot

robotBallBalance

If you want a different kind of feedback systems challenge, ditch the Segway-style robots and build one that can balance on a ball. UFactory is a startup in Shenzhen, and this impressive little guy is a way of showing their skills applied to the classic inverted pendulum. At nearly 18 inches tall and weighing just over six pounds, the robot boasts a number of features beyond an accelerometer and gyroscope: it has both a WiFi module and a camera, and can be controlled via a homemade remote control or a Kinect.

The build uses plastic omni-directional wheels attached to 3 brushed dc motors, which attach to the base of the robot with custom-made aluminum brackets. The UFactory gang constructed the robot’s body out of three acrylic discs, which hold the electronics directly above the wheels. The brain seems to be an STM32 microcontroller that connects up to the motors and to the sensors.

You won’t find the code on their Instructable yet, but according to the comments they have plans to make the entire project open source. If you’re desperate for more details, the UFactory team seems willing to provide source code and other information via email. Make sure you see the video after the break, particularly the end where they demonstrate interference and carrying loads. This isn’t the first ball pendulum we’ve seen; take a trip down memory lane with the BallP ball balancing robot from 2010.

16 thoughts on “Building A Ball-Balancing Robot

  1. FINALLY! I drool every time I see a self balancing robot on a ball, but intil this day it was only a thing universities did. I’m so glad that its now available in a tutorial version. Well… I better start buying the items!

    1. This is true. But as I posted above: This is now available for hobbyists like me and not behind walls of some university. I need this thing in my apartment, not in the hands of some students. This was always a problem until today.
      Reading the comments over at Instructables, it looks like they try to Kickstart this Robot. I never read about a university doing this. For me its a win!

    1. You’re right that there’s no code, but when I commented they did offer to email it to me.

      it’s good to see a more accessible ball balancer. I was hoping it would be mine though – started over s year ago but stalled due to lack of time and parenthood.

  2. Good job, just needs some fine tuning of the pid and couple changes to the control scheme to make it a bit less jittery.

    It looks like the controls are fighting the pid instead of changing the setpoint

    1. Anyone can help with how the control law with derived ? Especially in XY_speed_calculate() : Shoudn’t we use the error from the setpoint for the control instead of the actual value. In case of the position : K_position * position is used. Where position is updated with poistion += position_Needed (position_Needed is from the Wireless Controller). So we are not using the error from the setpoint, rather the setpoint itsself ?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.