Go Down

Topic: Balancing robot for dummies (Read 145 times) previous topic - next topic

tecabe

Quote
Hi Nahua, welcome
Thanks for your PM and the nice words
your bot is balancing pretty well, congratulation  

P(i)D tuning seems optimal
The forward/backward drift is typical and normal, it will disappear with your encoder implementation

Are you still using EMG30 motors?? can you quantify backlash ??

Oh... one last comment. Don't be shy, make it taller  


Hey Kas...

Yes, Im using the EMG30 motors andbacklash is quite low, just a couple of millimeters with the 10 cm wheels. I can make a video if you need so see it with your own eyes.

Will try to add more deckers and make it taller soon :)

Im starting to implement encoders and then make:
torque = P1 + D1 + P2 + D2
(1 = error from sensor --> complementary filter)
(2 = error from encoders)

I'm going crazy now adjusting PIDs so I started graphing things in Processing, still couldn't get anything as I wanted... maybe a PID expansion tutorial needed?

thanks god you are making more tutorials about RC and encoders, cant wait for them!

thanks for the recommendations!

osmaneralp

Many thanks to everyone, especially kas, for this awesome thread. I'm building my own balancing robot, and I've learned a lot here. I think I've read every post, but I might have missed something. Can someone please give me some guidance on these points:
1. Is a 10ms loop sufficient, or should I try to go faster if my peripherals allow it?
2. I can't access the A2D on my CPU. I need to purchase a separate A2D chip to read the gyro. Is a 10 bit A2D sufficient, or should I go 12 bits?
3. Can anyone suggest a good standalone A2D for a balancing robot?

TIA. I hope I can post a movie of my robot balancing soon!

--Osman

Patrik

#112
Nov 22, 2010, 06:40 am Last Edit: Nov 22, 2010, 06:49 am by X-firm Reason: 1
@kas

I have now bean test running the robot with the battery you showed me on ebay.. I have just bean playing with the PID parameters for a hour or so but I'm not getting the robot to stand "still".

It was to long a go I worked with PID so I need to read up a little..

The robot Is starting to get heavy, 2.359 kg  :o, don't know if that can give me some troubles..

I will try some more and post a video of my success or failure..
The balancing robot for dummies guide
http://www.x-firm.com/?page_id=145

kas

#113
Nov 23, 2010, 08:06 am Last Edit: Nov 23, 2010, 03:45 pm by kas Reason: 1
@tecabe
Quote
Im starting to implement encoders and then make:
torque = P1 + D1 + P2 + D2
(1 = error from sensor --> complementary filter)
(2 = error from encoders)
You are on the right track  ;)
More info later this week



Hi Osman, welcome, thanks for your comments
Quote
1. Is a 10ms loop sufficient, or should I try to go faster if my peripherals allow it?
100hz is plenty. I adjusted loop time up to 200Hz without any significant change in attitude.
Try for yourself and make sure that your processor can cope with the situation (STD_LOOP_TIME - lastLoopUsefulTime should be >o), especially if you send wired or wireless debug info to your PC

Quote
2. I can't access the A2D on my CPU. I need to purchase a separate A2D chip to read the gyro. Is a 10 bit A2D sufficient, or should I go 12 bits?
Go for a 12 bit ADC

Quote
3. Can anyone suggest a good standalone A2D for a balancing robot?
I strongly suggest MCP3204 or 3208. I am currently testing this chip, source code available on request





@Patrik
Quote
The robot Is starting to get heavy, 2.359 kg  , don't know if that can give me some troubles..
You built a balancing sumo  :) :)
Keep us aware

osmaneralp

@kas
Quote
I strongly suggest MCP3204 or 3208. I am currently testing this chip, source code available on request

That's good to hear. I have a 10 bit MCP3008 that I wan going to use on another project. I start with that and swap it out when I can get the 3208.

How did you read the SPI bus? Does your processor support SPI, or did you implement a bit banged solution?

Many thanks!
--Osman

Go Up