Shop OBEX P1 Docs P2 Docs Learn Events
Ramping question — Parallax Forums

Ramping question

RiphRaphRiphRaph Posts: 5
edited 2010-07-07 21:39 in Robotics
I am in the process of tuning my new Boe-Bot.· I read in the manual that ramping saves wear and tear on the servos and is easier on the batteries.· My question is whether it is·best practice·to build ramping into all of the Boe-Bot movements or are there situations where it is undesireable.

If the answer is that I should use ramping, I have a problem that I need to solve.· While I have tuned the servos for straight forward and backward movement, during ramping up and down the Boe-Bot skews slightly to the left.· How do I compensate for this movement?· I've tried tweaking the duration, but I can't seem to smooth out the ramping process.

Thanks in advance!

I've never had so much fun working out problems.· I'm sorry that I didn't do this long ago!!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-07 18:26
    It's not so much the ramping itself as it is a matter of starting slowly and making big changes in speed or direction slowly. If any motor suddenly goes from full stop to full speed, there will be a sudden high current drain that will last until the motor is near final speed and any gears will experience increased wear because of the mechanical loading. From a guidance standpoint, some kind of ramping helps minimize wheel slippage which complicates "dead reckoning".

    Smoothing out ramping and keeping movement balanced depends on how you've done the ramping. Could you attach your code to your next message (don't just cut and paste) using the Attachment Manager you get with the Post Reply button?
  • ercoerco Posts: 20,256
    edited 2010-07-07 20:20
    I had the same issues working with the Scribbler when I had encoders. There's no guarantee that two identical motors or servos will ramp up or down·in sync. There are mechanical and electrical variances that make it quite difficult. Even stopping can be problematic. If you're driving straight under power and shut both motors/servos off to stop, one may coast longer than the other and turn your robot.· My best results were obtained from using just two forward speeds, in addition to 'off'. I experimentally determined the two pulse values that made it go straight at low speed and two more values for high speed. I 'ramped' to low speed briefly before hitting full speed.

    As I mentioned, I had wheel encoders for synchronizing the wheels and measuring distance. My best calibrated turns came from simply stopping one wheel briefly while the other wheel stayed on full for x units.

    http://www.youtube.com/watch?v=5r2En4hLUBI

    http://forums.parallax.com/showthread.php?p=772850

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • RiphRaphRiphRaph Posts: 5
    edited 2010-07-07 21:05
    Mike,

    This is the code I was using.· Thanks for your help.
  • RiphRaphRiphRaph Posts: 5
    edited 2010-07-07 21:06
    Erco,

    That's a great suggestion for a workaround!· I'll try that!· Thanks!
  • ercoerco Posts: 20,256
    edited 2010-07-07 21:39
    Your ramping program looks pretty good at a first glance. You could also experiment with different ramp rates for left & right, obviously. Trouble is, all motor speeds are somewhat dependent on your battery voltage, which varies with usage. You might want to use five 1.2V rechargeable batteries (instead of four 1.5V alkalines) to keep your voltage more constant for more consistent results. You can get the BoeBoost module, or wire in your own extra AA cell holder.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
Sign In or Register to comment.