Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: airman00 on February 22, 2008, 04:07:05 PM

Title: Making servos go faster
Post by: airman00 on February 22, 2008, 04:07:05 PM
How can I make the servos go faster on my robot besides increasing the voltage to 7.2 volts from 6V ( which would lessen the life of the servo slightly)

My goforward routine in my program is this

Code: [Select]
low servo1                  ' Make the servo pin low
pulsout servo1,Forward1    ' Give Servo1 the pulse to go forward

low servo2                 ' Make the servo pin low
Pulsout servo2,forward2   ' Give Servo2 the pulse to go forward

The pulses are at their maximum (100 and 200) , but still when the robot drives I dont get smooth motion, watch the video below and listen to the motors.

[youtube]

_9BTbekK9a8[/youtube]
Title: Re: Making servos go faster
Post by: HDL_CinC_Dragon on February 22, 2008, 11:29:15 PM
How much time are you waiting between each pulse and how long does each pulse last?
Experiment between these two times and you should be able to overcome the problem.
Title: Re: Making servos go faster
Post by: paulstreats on February 23, 2008, 07:17:20 AM
Is it a case where other parts of the program are making the low pulse last different lengths of time?
If so, you can combat this by putting your servo code into a timer interrupt routine
Title: Re: Making servos go faster
Post by: airman00 on February 23, 2008, 08:02:24 PM
How much time are you waiting between each pulse and how long does each pulse last?
Experiment between these two times and you should be able to overcome the problem.

I'm waiting 18ms afterwards , Im not sure how long each pulse lasts, how long should it last
Title: Re: Making servos go faster
Post by: gamefreak on February 23, 2008, 08:53:25 PM
the frequency should be 30 times a second, the on time should range from 1 ms, to 2, 1.5 being not moving.

Now does pulseout go high then low, or low then high? It would make a difference. What is Foward1 and forward2?

It sounds liek the servos sare clicking on and off rapidly



Hey Admin, what would happen if the servo were pulsed every 2mS, instead of every 33.333 milliseconds?
Title: Re: Making servos go faster
Post by: Admin on February 23, 2008, 10:07:01 PM
Quote
Hey Admin, what would happen if the servo were pulsed every 2mS, instead of every 33.333 milliseconds?
Depends a lot on the servo . . .

I found that my analog futaba s3110 would heat up and jitter if I pulsed more than once every 10ms or so. Others in the forum have reported problems with more than one pulse every 20ms on other servos.

Plus, you are just wasting clock cycles if you pulse too much.