Society of Robots - Robot Forum

General Misc => Misc => Topic started by: Ro-Bot-X on August 13, 2008, 07:58:08 PM

Title: Build a (simple) balancing robot
Post by: Ro-Bot-X on August 13, 2008, 07:58:08 PM
Hi guys, I have finaly got some time to play with my robots and I started a long delayed project: to build a balancing robot. Looking around the web I have found a few samples, some simple, some complicated, but no complete tutorial about building one. So, looking at some saples, I decided to start simple and then add on, step by step, writing a tutorial, so others can buid their own balancing robot without too much trouble.

Here are some pictures of my robot, and if you want to know more about it, check out my tutorial in the member pages: http://www.societyofrobots.com/member_tutorials/node/185 (http://www.societyofrobots.com/member_tutorials/node/185)


Title: Re: Build a (simple) balancing robot
Post by: airman00 on August 13, 2008, 10:30:46 PM
Very nice!!!!

I would be interested in having an accelerometer and kalman filters actually..... Perhaps that can be your next step?
Title: Re: Build a (simple) balancing robot
Post by: pomprocker on August 13, 2008, 10:38:58 PM
niice, i got all that stuff, i wanna do this
Title: Re: Build a (simple) balancing robot
Post by: Ro-Bot-X on August 14, 2008, 05:24:18 AM
Very nice!!!!

I would be interested in having an accelerometer and kalman filters actually..... Perhaps that can be your next step?

I have an accelerometer and a gyro. All I need is a couple of 6V DC motors. And yes, this will be the next step.
Title: Re: Build a (simple) balancing robot
Post by: Ro-Bot-X on August 16, 2008, 06:33:56 PM
In the tutorial I could not embed the video from Youtube. I wanted to see if here it works...
[youtube]ayUUsihFFXc[/youtube]
Title: Re: Build a (simple) balancing robot
Post by: MarkBrown on August 16, 2008, 08:24:08 PM
That is very impressive.  If you where to add weight to one side or the other, can the robot still keep its balance?
Title: Re: Build a (simple) balancing robot
Post by: Ro-Bot-X on August 16, 2008, 09:46:40 PM
That is very impressive.

Thanks!

Quote
If you where to add weight to one side or the other, can the robot still keep its balance?

No.

I have added a potentiometer to adjust the perfect balance point easier, so I don't have to reprogram the microcontroller every time I put it to a surface with a slightly different inclination than the previous one. If I add weight, I have to re-adjust the balance point.

Again, I will have to use a gyro (so the robot knows where UP is) and an accelerometer (to measure the speed of the fall) to have the robot balance on inclines and recover from a hard fall. Also I will have to use DC motors with a RPM greater than 200, so the robot can recover from a greater angle deviation from vertical. Curently I have those sensors, but not the motors (actually I can try it with Lego motors - 300 RPM at 9V). Now that I've got the bootloader for Arduino working, I will use that environment to develop the code further. I would really like to make a balancing motor controller that will accept commands via serial (UART or I2C). For bigger motors I will just swap the 1 amp H-bridge with a Sabertooth or something similar. The Big Brain can be an Axon or even a motherboard runing Linux. I believe that a robot arhitecture is better to be modular, not all in one. If something fails, at least part of the robot will still work (if it doesn't walk it can crawl...).
Title: Re: Build a (simple) balancing robot
Post by: Ro-Bot-X on December 21, 2008, 06:33:24 PM
So here is the robot using the new Roboduino. Plug and play!

- uses 2 continuous rotation servos connected to PWM pins, but PWM not used at the moment in the code
- uses a Ping)) ultrasonic sensor to measure the distance to the surface, connected to a digital pin
- uses a potentiometer to adjust the perfect balance point, connected to an analog pin
- uses a serial LCD to display distance to surface and calculated PID value, connected to Tx pin

Check my blog for more info (see signature).

I'll put the video first, then the pictures:
[youtube]x32MEHTSFNg[/youtube]