Skip to content

A self-balancing robot on 2 wheels, using Arduino & PID controller

Notifications You must be signed in to change notification settings

zweedao/Self-balancing-Robot

Repository files navigation

A self-balancing robot

Click here to watch the video of my Self-balancing Robot

1. Motivation

Self-driving car is up & coming in US. But in developing countries in Asia, with smaller road & crowded cities, a self-driving motorbike will fit much better.

I wanted to find out how to build a self-balancing motorbike (and thus a self-driving motorbike eventually!), but that would take too long for 1 semester. Instead, I decided to build something simpler: a self-balancing robot, which has more open sourced materials. I want to see how PID controller works, and also I just like robots in general. It's fun :)

2. Paper prototype

Paper prototype

3. 3d-printed prototype & electronics

3d-printed prototype & electronics

4. How it's done

The robot is auto-balanced using an algorithm called PID controller. This basically sets motors' speed based on the deviation of the robot from the balanced position. The higher the deviation, the faster the motors run to counter the fall.

PID controller for self-balancing

References

I refered to several open sources and put the pieces together as below. The main work was to assemble these pieces together and lots of tuning for PID parameters to make the robot balanced & smooth.

About

A self-balancing robot on 2 wheels, using Arduino & PID controller

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages