go_away

Author Topic: servo speed problem on 50$robot  (Read 703 times)

0 Members and 1 Guest are viewing this topic.

Offline junkmanTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
servo speed problem on 50$robot
« on: February 25, 2011, 04:14:09 AM »
Hi,
1 of my servos rotates faster then the other. I interchanged the servo between ports DO and D1 (pin 2 and 3) but the same servo goes faster. Because of this my 50$ robot don't go in straight line.
Can I modify the program to make them same speed? Do i change this command (servo_left(speed); and servo_right(speed);) ?
For eg. change servo_left(44) to servo_left(60) will make it go faster.
Also do i randomly have to guess the speed will come or is there a method to calculate it.
I was going to do this but not understand much of programing so asking for help.
Thanks.

Offline klims

  • Robot Overlord
  • ****
  • Posts: 188
  • Helpful? 2
Re: servo speed problem on 50$robot
« Reply #1 on: February 25, 2011, 07:08:44 AM »
Did you modify the servos for continuous rotation yourself? In my experience I get this problem because when I was putting the pot back in it wasn't exactly the same on both servos. Pretty hard to do if you ask me.

In order to get the same speed I would find the center point (where the servo is completely stopped) for both servos and then use some math to make them spin at the same speed. For example if centerLeft = 30 and centerRight = 40, then you could define a variable like slow = 40 and use the command servo_left(centerLeft+slow) and servo_right(centerRight+slow) or whatever. Make sense?

I've never made the $50 robot so I could be completely off on this one  :)

As far as I know you need to just test the speeds to work out how fast your bot will drive. It's easy to define some new variable like slow, med, and fast once you work out what speeds you like.

 


Get Your Ad Here