5

In all specs of this servo that I can find there is a range of 1000-2000ms of duty cycle, for 50 Hz frequency, for the full range of motion. For example:

This should give us a range of 5-10% when sending pulse with:

dc = 5 #[5 - 10]
pwm = GPIO.PWM(pin, 50)
pwm.start(dc)

Why? Because:

dc duration = second in microseconds/frequency*dc percentage

So for example:

1000000/50*0.1 = 2000
1000000/50*0.05 = 1000

Which defines our range. However in practice it's not true. The real dc range is 2.5 - 12.5 and that would translate to:

1000000/50*0.125 = 2500
1000000/50*0.025 = 500

Which can be tested and is even quoted in many places like here:

https://www.raspberrypi.org/forums/viewtopic.php?t=240558#p1468558

So the question is - where am I wrong in my calculations? Why is there a difference?

Łukasz Zaroda
  • 197
  • 1
  • 7

1 Answers1

2

The servo angle is determined by the pulse width in a 50 Hz PWM signal.

Most servos move to 0 when they receive a pulse 1500 µs long. Generally it is safe to send a servo a pulse in the range 1000 µs to 2000 µs. Generally a 10 µs change in pulse width results in a 1 degree change in angle.

At some point you will reach the limit of rotation. That limit varies between different makes and models of servos. If you try to force a servo beyond its limits it will get very hot (possibly to destruction) and may strip its gears.

The small 9g servos generally have an extended angle range, 180 degrees or more. Typically they accept pulse widths in the range 500 µs to 2500 µs.

Determine a servos limits carefully by experiment.

joan
  • 71,852
  • 5
  • 76
  • 108