Let's Make Robots!

Willoduino: self balancing robot

Self Balancing

Hello I am Brecht Willockx.
I am 17 years old and come from Belgium. In the past 8! months I have been working on a Self Balancing Robot.
The name Willoduino is from my last name WILLOckx and the brain arDUINO.

It's my end of year project. I study in high school for industrial engineering.
The brain of my robot is the Arduino Uno. The robot is finished!! The hardest part was finding the PID-values.
As always it was a lot harder than assumed by me. The last part is to obtain basic motion control (Forward/Backward, Stop Right/Left) with a cheap bluetooth module (+Android).
I've made a Android App in App Inventor:

I use a IMU 5 DOF (IDG500/ADXL335) for reading the angle of the robot. The sensor is placed on the bottom of the robot.
As we are interested only in gravity measurement, we want dynamic acceleration as low as possible.
The best place for reducing rotational acceleration is near the the motor axis.
Accelerometer hasn't the noise from the dynamic acceleration (v=w*r) with r=0 (bottom).
Gyros sense rotation only, not acceleration. Rotation is a "system wide" variable for a rigid system.
They can be placed anywhere you want, even at the very top of the botom.
With a complementary filter, the correct angle is calculated!

I use also encoders from the motor. he encoders are tracked using interrupts and direct port manipulation.
The robot knows his position now. I use a PID controller to calculate the best PWM-value.
The 37D metal gear motors are controlled by two independent motorcontrollers.

The wheels are school made from erthalon for good grip.

I also made a 3D-model in Inventor. It's my first design -the place of the components are changed-.
At the moment, I am drawing the actual robot.


The correct version: You can see the assembly: http://www.youtube.com/watch?v=bkWXbv9CG84

If you want more information about how a balancing bot works check out x-firm.com which has a great tutorial section for balancing robots. Oh yeah and it is a lot harder to build one than you would think (I found out the hard way!).

When the robot is ready, I will also make a video!!

Greetz from Belgium

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Hi you'r robot is looking good! In my experience pid tuning is hard but to get the robot to balance you can focus on the P and the I gain. After that you van fine tune all the settings. I have no formula for you, it is possible to calculate it but it's very hard I'm learning that at the moment in second year of university. But check if everything else works so you know for sure it's a problem with the PID. And don't expect perfection.

Great project. 

I am sure you have learned a lot from this.  I look forward to seeing what you come up with. 




Thank you,

I learned a lot! I hope I find the correct PID-settings :/