servo question

beny1949

Senior Member
on my micro mouse i have two servo's, one for each wheel, in the configuration i have them at the moment i have them when giving both of them a 100 ms pulse, one will got foward, and one will go back.

this is all fine, but i need to be able to have a proportional speed control when getting going or the darn thing tips over even with quite alot of weight on the front.

does anyboy know how i would invert one timing to work on the other side so that it will go in a straight line?

for example: when one servo has a pulse of 100ms the other needs a 200ms pulse.

but when the pulse = 150, both should equal 150. so this is the center of inversion.

i really am a bit lost!

Ben


*update*
after some further experimenting i have worked out that i need to reverse the bits. this can be done on the x1s easily, but how do i do it with a 40X?

so far the equasion is this:

y = 200
x = ((y/1.6) bit reversed)*1.6 this works well with the tests i have done! its accurate to 1 digit. just i can only do it on paper!


 

Edited by - beny1949 on 23/04/2007 22:02:02
 

BeanieBots

Moderator
If 150 is neutral, then right = neutral plus an amount and left = neutral minus an amount.
eg to go forwards.
speed = 5
servospeedleft=150-speed
servospeedright=150+speed

servo left,servospeedleft
servo right,servospeedright

I may have it the wrong way around in which case your robot will go backwards but it should at least do it in a straight line.
 

Wrenow

Senior Member
Beny,

Even easier, if you can find a couple of Radio Shack Vex Robotics servo style motors (can often be found for $10 each). They look just like the Vex servos, but have an ESC instead of servo amplifier and pot, thus you have really nice variable speed control for each wheel.

Wreno
 
Top