Self Balancing Robot – V4

It’s been almost 4 years since I started playing with self balancing robots posting about the very first version, then the 2nd really unsuccessful one and finally a really jittery / impossible to control 3rd version

Now it’s finally time to show you something that actually works !

And even people at the PUB enjoy playing with it πŸ™‚



Go to my Github page to find the relevant code and try to run it yourself.

Also here areΒ  a couple of additional videos


Give me more details…

18 months ago, I started once more from scratch, replacing the DC motors with steppers and the controller with a Espruino Pico board as well as using a 3D printed frame:

Then did some preliminary testing:

Test electronics and motor on breadboard

After which I worked hard to install everything nicely on a protoboard, including the Espruino Pico, the MPU6050, the DRV8825 stepper drivers and the ESP8266 for an eventual future Wifi enablement:

All looking pretty good:

All set up

And here’s the schematic for reference:

Schematic done in Fritzing

And you can obviously see the Javascript code for the Espruino, on my Github account.

The only problem was that, again, it wasn’t balancing properly…

So I thought “it must be the Espruino” and its interpreted Javascript, and I wanted to play with the new ESP32 anyhow, so once again I updated the robot, and even added a wireless serial module so that I can control it remotely.

Actually I simply took the remote control system from this post.

As usual do let me know in the comments below if you found this project interesting…


5 Responses to Self Balancing Robot – V4

  1. Pingback: A Robot That Can Still Keep Its Balance After A Night In The Pub

  2. Pingback: A Robot That Can Still Keep Its Balance After A Night In The Pub – High Tech Newz

  3. Pingback: A Robot That Can Still Keep Its Balance After A Night In The Pub | Hackaday

  4. MinnJohn says:

    Nice clean build! It seems more stable than most. Do you feel that the stepper motors made a big difference for stability?

    • trandi says:

      Re the steppers, it’s hard to measure, but yes I feel they do make a difference.
      Mainly to do with the slight backlash due to having to use gearing with normal brushed DC motors.
      That backlash is around the “0” position, exactly where all of the action happens on a self balancer.
      Also, the steppers allow you to ensure the same speed/distance in both wheels and hence keep the balancing straight.
      But I’ve of course seen many working self balancers using DC motors.
      Also the steppers, or at least those that I’ve used, have their own inconvenient: big / heavy and using more current….

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: