Skip to content

self-balancing robot

So, about a week or two ago, I came across this post on hackaday, which led me to this site with instructions for building a self-balancing robot. I’ve been wanting to make one of these for a while, so I figured I would give it a shot.

I mostly copied the same design from Joop Brokking, so if you are building one, I’d suggest following his youtube video series on the design and construction of the robot.

I used the parts that I had on hand, so my stepper drivers are different and I used an IR remote and receiver instead of the RF that Joop used.

I began by building the circuit on a breadboard to make sure Joop’s code would work with my stepper drivers.

Everything looked good, so I moved the circuit to protoboard.

I built the frame for the robot out of some scrap pieces of wood and mdf. The wheels were parts of a meccano set that I just forced onto the stepper axle.




I modified the code from the original for this machine to work. It is pasted below.

To get the accelerometer calibration value, you will also need to run this sketch.



  1. Sebastian Sebastian

    I use parts :
    Arduino UNO
    NEMA17 SX17-1005LQCEF – 1,8° (200 Steps on full rotation)

    The code you posted does not work. Maybe you know how to modify it to work under these engines?

  2. Sebastian Sebastian

    Hello, What engines did you use in your project?

  3. An An

    Nice balancing Robot.
    Please send all code + libraries?
    My email:

Comments are closed, but trackbacks and pingbacks are open.