Go Down

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

retrolefty

Quote
I still need to test a lumpy dull surface. Ill try it on my brothers wife


This is either a great insiders joke or a completely WTF comment.  ;D

Lefty

kas

#166
Dec 28, 2010, 12:42 pm Last Edit: Dec 28, 2010, 01:28 pm by kas Reason: 1
Quote
Kas, Jon-D, theres a good few links there i need to look up, thanks. as for fuzzy i have not tried it but there is a pic app note i will try to post the link for.
RE ADNS-7550 laser optical mouse encoder as a velocity encoder:
so far i have placed the encoder over a flat belt which is connected to a motor which has a heds slotted disk encoder fitted  therefore i get quadrature encoder data to compare with the optical .
1. at constant velocity the two encoders give an average velocity which is comparable within roughly 10%.
2. the optical encoder gives an erratic reading , over and under the heds encoder.
3. for zero velocity both read zero
4. for very low velocity, 1mm/sec the optical reads zero !
5. for absolute position , ie step changes, the optical very quickily has a large error. this can be tested with a pc mouse, just try to move it repeatedly back to a fixed position and see where the arrow ends up!

I emailed AVAGO with these findings and asked if the sensor has a high pass filter, they said they dont spec low speed, also the absolute accuracy is only 20-30% ! shock. also (area of image is < 2mmsq)
despite this im not giving up hope.
it is possible to read the pixel image data, if a pattern is used where the absolute dimensions are known then surely a more accurate calculation can be done. and don't call me shirley.
I asked if the ADNS-9500 super gaming sensor was any better but no mention was made in their reply, and you cant get one for love or money, same family anyway but it does need a firmware download so theres hope for a special version ?
It may be that my 7550  just didnt have the right surface but one register reports surface quality , i never got better than 75%, i tried
black htd M3 belt- raw - 0%
lightly sprayed with gold xmas metallic - 75%
any colored card 50%
aluminium foil - rubbish
embossed plastic metallized sheet - 30 %
white card with very fine black fibers - 30 %  
I still need to test a lumpy dull surface. Ill try it on my brothers wife .

RE motor drivers, check that acceleration control is turned off, current limit, all the saftey features!, im just building with a new one, vn??
merry xmas everyone,  

Hi beautifulsmall, I am impressed  :o
I suspect you may end up working for AVAGO  :)


I am preparing "Balancing robot for dummies part seven" (wireless Xbee control +  KasBot V 3.0) and expect to be ready within a week

Villa

#167
Dec 29, 2010, 03:35 pm Last Edit: Dec 29, 2010, 03:37 pm by Villa Reason: 1
Hi everybody,

This is my first post at Arduino forum and I'd like to say thank you for creating such a great topic.

Just like you, I am interested in two wheel balancing robots. I have built my own one. My robot's construction is similar to this one:
http://www.youtube.com/watch?v=_TXfXoKyMzc&feature=player_embedded
but mine is bigger. I am sorry I cannot provide you with a photo of it right now. I will do so as soon as I can.

When trying to balance the robot, I have a couple of questions as follow:

1. Since the two motors are not perfectly identical, there should be two more PID control loops (apart from the main balance PID loop), one for each motor, to guarantee that the real motor's velocity will strictly follow the set one. In my case, this is actually a problem because when I apply an equal voltage to the two motors, they rotate with different speeds. Especially when one wheel hits an obstacle, say a crack on the ground, and cannot cross it, the robot will rotate around the wheel (in stead of stopping or moving forward). But I didn't see such a problem mentioned before at this thread.

2. Currently I am using the cascaded PID control approach to balance the robot. This approach has been used successfully by Brian Kuschak with his bk-bot:
http://www.bkinnovation.com/bkbot/
My robot can barely balance, in the sense that it doesn't fall, but it oscillates around the equilibrium point with a frequency of 1 to 2 Hz and the oscillation's amplitude is pretty large (the wheel moves back and forth with a travel distance of ~3 inches). I have spent days tuning the PID parameters to reduce this oscillation but so far I have had no improvements. When being pushed, the robot can keep its balance, but it oscillates even more wildly. Please look at this picture to see how my robot responds to a push:


How do you guys think about this? Is this resulted from an improper set of control parameters? If you know a correct procedure for tuning the PID parameters, please show me the way ^^!

3. The third question is about the wheel size. From my observation, it seems that with bigger wheels it is easier to balance, am I correct? Currently my wheels are made from plastic. They are hard and small (their diameter is about 3 inches, which is quite small because my robot is 1.2 metres in height). Will rubber wheels with bigger diameter be better?

Thank you for reading my questions. Any answer would be very appreciated.

I wish you a happy new year ^^

Villa

kas

Hi Villa, welcome aboard

Please post a photo of the beast as soon as you can

Quote
1. Since the two motors are not perfectly identical, there should be two more PID control loops (apart from the main balance PID loop), one for each motor, to guarantee that the real motor's velocity will strictly follow the set one. In my case, this is actually a problem because when I apply an equal voltage to the two motors, they rotate with different speeds. Especially when one wheel hits an obstacle, say a crack on the ground, and cannot cross it, the robot will rotate around the wheel (in stead of stopping or moving forward). But I didn't see such a problem mentioned before at this thread.
Each motor has a different PWM/speed response. I trim left PWM motor within the code and make adjustments while driving the bot using the RC controller' joystick.
You are right, we need more sophistiated control, a single PID loop doesn't cope with the job.
Also those DC motors don't run well at low speed, below PWM < 20 (no torque)
see DC motor with PID

I am impressed by this control scheme shown on the above link

I will contact Brian and ask him to stop by

Quote
2. Currently I am using the cascaded PID control approach to balance the robot. This approach has been used successfully by Brian Kuschak with his bk-bot:
http://www.bkinnovation.com/bkbot/
My robot can barely balance, in the sense that it doesn't fall, but it oscillates around the equilibrium point with a frequency of 1 to 2 Hz and the oscillation's amplitude is pretty large (the wheel moves back and forth with a travel distance of ~3 inches). I have spent days tuning the PID parameters to reduce this oscillation but so far I have had no improvements. When being pushed, the robot can keep its balance, but it oscillates even more wildly. Please look at this picture to see how my robot responds to a push:
How do you guys think about this? Is this resulted from an improper set of control parameters? If you know a correct procedure for tuning the PID parameters, please show me the way ^^!
Looking at the above diagram, my first idea would be to increase abs(Kd). You need more damping (see post #32). Others will jump with additional ideas.
Also try changing the sign of Kd (mine is negative)

Quote
3. The third question is about the wheel size. From my observation, it seems that with bigger wheels it is easier to balance, am I correct? Currently my wheels are made from plastic. They are hard and small (their diameter is about 3 inches, which is quite small because my robot is 1.2 metres in height). Will rubber wheels with bigger diameter be better?
I went from 80mm to 90mm wheels, I definitly noticed an improvement due to higher speed and larger contact surface with the ground.
Motors should be strong enough to cope with the additional torque.


kas

#169
Dec 31, 2010, 07:28 pm Last Edit: Jan 01, 2011, 08:07 am by kas Reason: 1
Quote
From post #148
Quote
How about you. It seems you are interested about control as well. Any other interesting projects or something?

...
I started a new exciting project also based on control/balance.
I wont talk about it now to avoid polluting this thread

Here is the new project  :)


@Ro-Bot-X you know this one don't you ??  ;)

The objective is to free henpecked husbands from boring domestic duties  ;D ;D ;D
I fact I may also develop a balancing vacuum cleaner  ::)


             [size=18]**  Happy New Year to everybody  **[/size]



Go Up