Self-Balancing Robot


GyroAccel2       This is WobbleBot, my first attempt at a self-balancing robot. With the frame designed in Sketchup and built on my 3D printer, I’m using Pololus’ Baby Orangutan-B 328 to control the robot. It takes the Kalman filtered data from the accelerometer(ADXL345) and gyroscope(L3GD20) and feeds it into a PID control function. For now the Ultrasonic sensor is not functional, but will be implemented when it is on a stable platform. The code is working properly (aside from some parameter tweaking) and I have replaced the previous motors (120RPM) with some much needed 290RPM gear-motors. I also have some larger wheels for back-up if the motors still aren’t fast enough.

GearMotors       WobbleBot is based on an inverted pendulum design, where the mass of the batteries mounted in it’s head, actually help it to balance better. Think of balancing a broom in your hand. The mass of the head and bristles at the top are affected by inertia and are slow to change direction on their own, this makes it easier for you to quickly move your hand under its center of gravity (CoG) to maintain balance. To control the motors the robot uses data from an accelerometer and a gyro mixed in what is called a Kalman filter, (an excellent example code written for an 8-bit microcontroller can be found HERE) which basically measures a noisy signal over a specific amount of time and estimates what the signal actually should be, to feed a clean signal into a PID algorithm to tell the motors how fast they need to go to make everything balance out.


Baby-OView3I’m using Pololus’ Baby Orangutan-B 328 as a controller because it is small, has an onboard motor driver, and I already had one laying around waiting for a project with two DC motors 😀 The Baby-Os’ 20MHz clock speed is a little funky with the standard Arduino library and I hope to work around that in the future, but I think as long as all of the equations are using the same time reference it shouldn’t be a problem.

Updates to this post will occur sporadically, watch this space.

I’m new to blogging projects online so any comments and suggestions about content or what you would like to see here are welcome.


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