Building A Self-Balancing Robot Made Easy

Self balancing robot

Not only has [Joop Brokking] built an easy to make balancing robot but he’s produced an excellent set of plans and software for anyone else who wants to make one too. Self-balancers are a milestone in your robot building life. They stand on two-wheels, using a PID control loop to actuate the two motors using data from some type of Inertial Measurement Unit (IMU). It sounds simple, but when starting from scratch there’s a lot of choices to be made and a lot of traps to fall into. [Joop’s] video explains the basic principles and covers the reasons he’s done things the way he has — all the advice you’d be looking for when building one of your own.

He chose steppers over cheaper DC motors because this delivers precision and avoids issues when the battery voltage drops. His software includes a program for getting a calibration value for the IMU. He also shows how to set the drive current for the stepper controllers. And he does all this clearly, and at a pace that’s neither too fast, nor too slow. His video is definitely worth checking out below.

There are many different flavors of balancing robots abound here on Hackaday. [Joop]’s uses Arduinos and steppers, but [Renee]’s EddiePlus uses an Intel Edison and Pololu DC motors. Or why not try balancing on a ball instead of on wheels? And to get around DC motor issues with balancing robots, have a look at this open-source ATmega32U4 based controller.

14 thoughts on “Building A Self-Balancing Robot Made Easy

  1. I’ve been following his blog for a while, and have built a couple quadcopters based on his outstanding work. I’d recommend looking through all his projects/blogs.

  2. With all the tuts on balancing robots available, some things I have not seen:
    1. How to determine the wheel size, or the height limitation, based on the torque rating of the motors
    2. How to determine the max speed, as limited by the torque rating
    If you could explain these to me, I’d appreciate it.
    I do appreciate this tutorial, though. Very thorough.

  3. Question: are the stepper motors responsible for the “squeal” we hear whenever the robot moves? Are there quieter options or ways to deal with this to have a quieter device?

    1. Yes, and maybe, respectively. :)

      There are drivers that make more or less noise driving steppers, but they all whine a bit. Steppers also just make a bit of noise due to the mechanical detent. Turn one in your hand, and you’ll get a feel for how quiet it can be.

      If you want to get smooth motion out of DC motors, you end up using PWM. If the PWM frequency is lower than 20 kHz, you’ll hear that whine as the motor speeds up or slows down. If you can run the PWM fast enough, only your dog will be bothered by the whine.

      Totally silent is probably out of the question.

      1. There are drivers for high precision and electrically sensitive things that use voltage output instead of PWM. The rotating magnetic field should be stronger than the detent and make the resulting motor completely quiet except some tiny vibration if it sticks when it is completely stopped.

  4. I am building the y a b r balancing robot, but I am having a lot of difficulty finding the 2.4 gigahertz serial data transceivers. The retailer listed on the y a b r web page no longer carries them and the ones I did order and paid for I have not received, after a month and a half.

  5. Hello, does anyone have a code to control the robot from the android application? I built this robot and I would like to control it with an android app. I use HC-05. Thanks for the help.

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.