go_away

Author Topic: servo speed problem on 50$robot  (Read 548 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: 187
  • 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.

 

Related Topics

  Subject / Started by Replies Last post
7 Replies
2417 Views
Last post March 05, 2008, 12:31:49 AM
by Mcrich113
0 Replies
4261 Views
Last post April 01, 2010, 08:00:18 AM
by Antonb
3 Replies
457 Views
Last post March 16, 2011, 08:46:28 AM
by Conscripted
Uart speed problem

Started by Dothos « 1 2 » Software

32 Replies
1937 Views
Last post April 15, 2011, 04:35:47 AM
by Dothos


Get Your Ad Here

data_list