Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: R9Ko on June 02, 2013, 12:02:22 AM
-
I have an application in which i 've to move a Futaba S3003 RC servomotor in the following 3 positions:
0 degrees(0.3 ms)
CW 45 degrees(0.75ms)
CCW 45 degrees --- ?
My great doubt is, how to move the servo in CCW 45 degrees? Because the minimum pulse width is 0.3 ms, so CCW 45 degres is less than 0.3 ms. How can i get the pulse width for CCW 45 degrees?
I would really appreciate so much, any suggestion, help, advice
-
I you have to find the Servo pulse width experimentally.
What is the pulse width range to move the servo output 90°?
Find these pulse times then use the mid-value as your 0° reference position.
The pulse width times you state are out of spec for common RC servos. Most are 1 to 2msec with some variation between servos and servo brands. Are you sure of these pulse times?
-
The Futaba S3003 RC servo has these pulses to control it:
PWmax = 2.1 ms (180 °)
PWcentre = 1.2 ms( 90°)
PWmin = 0.3 ms (0 °)
The pulse width to move the servo output 90° is 1.2 ms, but i don't need that position. I know how to find any position but the problem is that, if i need to move the servo to CCW 45°, the pulse width for that position is less that the minimum pulse width (0.3ms) and it's negative.
This is how i find every position of the servo, knowing that the Servo position has a linear proportion to the pulse width used, i can use the equation of the straight line.
For example, if i want to move the servo CW 45°:
t = m*theta + pwmin
where m = pwmax - pwmin /180° = 2.1ms - 0.3 ms / 180° = 0.01ms/°
substituting :
t = 0.01 ms/ ° *45° + 0.3 ms = 0.75 ms
But my doubt is for CCW 45°, because
t = 0.01 ms/ ° *(- 45°) + 0.3 ms = - 0.15 ms
it's negative and it's less than the minimun pulse width (0.3ms), so how can i get the pulse width for CCW 45°?
-
You need to offset the positions. When the servo is at 90 degrees, you should call that "center" and count that as 0 degrees. Just mount your device such that it's at 0 degree position when the servo is at the center 90 degree position.
Now, -45 degrees for your application is 45 degrees for the servo, and +45 degrees for the servo is 135 degrees for the servo. Problem solved!