Ramping mismatched servos
Hi,
I am trying to ramp my servos to start from a dead stop and slowly bring it up to speed. the code I am using is
For pulsecount = 1 to 100
·PULSOUT 12,750 - pulsecount
·PULSOUT 13,750 + pulsecount
·PAUSE 20
Next
PAUSE 100
Return
the program ramps the servos nicely, but they are mismatched and do not ramp evenly sending the BOE BOT off of its course. The PULSOUT 12 needs to stop at a count of 681 to keep it in a straight line, where PULSOUT 13 is just fine to run to full speed. Also it would be nice if I could ramp the servos at an even speed, giving it a really straight run.
At this point I feel lost on what to do
Any suggestions?
Thanks
-Rob
·
I am trying to ramp my servos to start from a dead stop and slowly bring it up to speed. the code I am using is
For pulsecount = 1 to 100
·PULSOUT 12,750 - pulsecount
·PULSOUT 13,750 + pulsecount
·PAUSE 20
Next
PAUSE 100
Return
the program ramps the servos nicely, but they are mismatched and do not ramp evenly sending the BOE BOT off of its course. The PULSOUT 12 needs to stop at a count of 681 to keep it in a straight line, where PULSOUT 13 is just fine to run to full speed. Also it would be nice if I could ramp the servos at an even speed, giving it a really straight run.
At this point I feel lost on what to do
Any suggestions?
Thanks
-Rob
·
Comments
Have you tried calibrating the servos? If not I would try that. If these aren’t our continuous rotation servos with the adjustment screw your alternative is to make left and right constants for the center pulse value and add/subtract your offsets from that. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
If that's the case, then your problem of advancing both servos the same amount of distance will have to be adjusted dynamically throughout the loop (i.e., pulseout12 and pulseout13 would take on individual values and be pulsed at their respective individual times). Just which servo to adjust, and by how much, at each loop step would depend on the relative linearity and range of travel in going from stopped to full-speed.· You'd have to find out these characteristics of each servo (relative to the other) by trial and error testing and measuring. It might be quicker to find two servos that show the same behavior than to be able to characterize the ideosyncratic behavior of each individual servo. Or, it may be easier to build a sensor system of ongoing feedback to detect by how much you are off-track, and to correct the travel accordingly. It really depends on just what your requirements (tolerances for wayward travel)·are and how (badly/well)·your base system behaves in that context.
And even after getting the servos to rotate/ramp at the same rate of travel, you still will have the problem of differential traction (e.g., slipping of one wheel)·and torque(?) (e.g., due to uneven load on the two wheels, and/or uneven ground under them)·to deal with.
PAR
Post Edited (PAR) : 4/21/2007 6:36:24 PM GMT
To go in a straight line at full speed I need to PULSOUT 12,681 and PULSOUT 13, 850, so there is a big difference in the servos.
I have had some success at using an IF/THEN/ELSE statement and limiting the counter on pin 12 to a certain count.
I am doing this for a school project, I dont have to have perfection..
Thanks again
-Rob
Now, even if the amount and rate of turning per given pulse width were "matched", the user would still have to sense and program for wheel slippage, wheel alignments, surface irregularies, etc.
So, understanding various strategies for sensing and correcting for mis-matched wheel travel would still be needed. Because Parallax is offering a learning opportunity, their servos are perfectly matched with that objective.
PAR
Matching a pair of servos is·generally not done by any manufacturer or vendor. The R/C servos depend on trim in the remote control to have a center position. The servo is designed for a certain tolerance of linear change.
The simple fact is the manufacturers never really anticipated that servos could become a huge demand in small robotics; so they never have really addressed the problem. Other than Parallax full rotation servos, the majority are modified directly from R/C limited rotation servos. Parallax went to Futaba and had a special production run. These are probably as close to matched as one will ever get without paying a lot extra for sorting and testing.
For truly in sync control without feedback, stepper motors are often used as there is little doubt that both motors move the exact same amount. But stepper motors may require more power. You still have variance due to wheels and ground flaws.
Alternatively, there are several feedback systems that can keep rotation the same. One is a optical sensor and disk that attach to full rotation servos.
As you can see, tracking 'perfectly straight' become an engineering problem with several alternative solutions.
The best way is to have the bot fix on a distant target and work its way toward it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Problems are the "roads" of life,
solutions are only "onramps" to the next problem
············································· "Brad Smith"
·
PULSOUT 12, 750 - ((69/100) * pulsecount)
PULSOUT 13, 750 + pulsecount
(After the first set of parentheses do you use brackets in PBASIC?)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
D Faust