Need help ramping servo speed on boe-bot bs2
William Holmes
Posts: 4
Hello everyone, This is my first robotics project so please be patient [noparse]:)[/noparse]
So far things are going well, I have the boe-bot built and most of the basic tuning done e.g. Straight, Right/Left 45,90,180.
The problem I have run into is with ramping the speed of the servos for gentle start/stops. Getting my bot to go straight took a bit of tweaking with the servo speed.
I ended up with numbers around 850 / 683 (the 683 is different depending on maneuver) so when I go to ramp them up i'm not sure how to go about it as the 750 +/- 100 in the loop will not work because the max speeds are not the same.
On a side not is that must difference between servos "normal" ?
Any help or suggestions would be greatly appreciated.
Thanks
~Bill
So far things are going well, I have the boe-bot built and most of the basic tuning done e.g. Straight, Right/Left 45,90,180.
The problem I have run into is with ramping the speed of the servos for gentle start/stops. Getting my bot to go straight took a bit of tweaking with the servo speed.
I ended up with numbers around 850 / 683 (the 683 is different depending on maneuver) so when I go to ramp them up i'm not sure how to go about it as the 750 +/- 100 in the loop will not work because the max speeds are not the same.
On a side not is that must difference between servos "normal" ?
Any help or suggestions would be greatly appreciated.
Thanks
~Bill
Comments
There's not much you can do other than what you're doing (tweek the PULSOUT numbers). You can write your routines so the step size for the PULSOUT values is different on the left than the right while ramping.
Post Edited (Mike Green) : 10/9/2008 2:15:58 PM GMT
I have achieved acceptable (to me) accuracy in regards to going straight / turning to a specific angle. The part I am struggling with is I have no ramping of the speed because of the difference in the max servo speeds.
I guess a different approach to the question would be, is ramping absolutely necessary for servo longevity or will I outgrow this platform before the 0 - Max / Max - 0 start stops kill the servos?
Thanks again.
I am having a blast teaching my little bot new tricks [noparse]:)[/noparse]
~Bill
One option would be to normally run things at slower speeds and reserving maximum speed for the straightaway dash, slowing down if there's to be some maneuvering. Rather than having a smooth ramping of speed, you just have a stepwise shift from moderate to fast and back again.
This method produced a very smooth motion on my BOE BOT, and it was completely adjustable in terms of ramping speed. Just change one of the variables a little bit higher, and it takes a little longer. It worked even with differing speeds in the servo mechinisms. One other thing that's useful it LOOKUP tables to correspond those different servo rates.
I was considering the stepped method, but I was looking for a more programmatic solution so I could avoid the trial and error. SRLM I am following your solution in concept. Do you happen to have a code snippet lying around so I could see the implementation. I will be looking into a hybrid approach short term using a look up with stepped values until I can get my mind fully around your real/ideal solution as I think that is where I ultimately want to be.
Thanks again
~Bill
~Bill