Maker Pro
Maker Pro

Servo info wanted

bigone5500

Apr 9, 2014
712
Joined
Apr 9, 2014
Messages
712
I'm looking for information on a Futaba servo, (yes I have searched Google). The model is FP-S48. I have connected 6v to the pins in every arrangement but it does not work. Do these need to be connected in some other fashion?

tmp_17611-20141012_104252-11233591454.jpg
 
Last edited:

bigone5500

Apr 9, 2014
712
Joined
Apr 9, 2014
Messages
712
Thanks. I'll try that. I assume the pot controls the position of the servo?
 

KMoffett

Jan 21, 2009
723
Joined
Jan 21, 2009
Messages
723
There are a lot of good tutorials on servos out there. Google: how servos work

Ken
 

bigone5500

Apr 9, 2014
712
Joined
Apr 9, 2014
Messages
712
I got this servo to work on my uno. 2 of them I think have issues.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Here is pseudo code to do 2 servos:

int servo_1_pulse; // number of microseconds of servo 1 pulse
int servo_2_pulse; // number of microseconds of servo 2 pulse
int remainder; // number of microseconds left in 2 milliseconds after the last servo pulse goes off
while (1)
{
turn_servo_1_on();
turn_servo_2_on();
if (servo_1_pulse < servo_2 pulse)
{
delay_microseconds(servo_1_pulse);
turn_servo_1_off();
delay_microseconds(servo_2_pulse - servo_1_pulse);
turn_servo_2_off();
remainder = 2000 - servo_2_pulse;
}
else
{
delay_microseconds(servo_2_pulse);
turn_servo_2(off);
delay_microseconds(servo_1_pulse - servo_2_pulse);
turn_servo_1_off();
remainder = 2000 - servo_1_pulse;
}
delay_microseconds(50000 - remainder);
}

This has the disadvantage of not doing anything else except controlling the 2 servos (which might be all right if that is all you are doing.)

In order to do other things, you could, instead of the last delay(), capture a running clock, call a function that does other stuff that will take less then 48mSec, then capture the clock again to see how much time has elapsed and wait for 48mSec - the time already elapsed.

If you wanted to do more than two, there are better ways to do that.

Bob
 
Top