T3

Maximum safe servo PWM pulse rate

This is old news for most of you, but not everyone received the memo.There is a maximum safe pulse repetition rate of approximately 40 pulses per second for the most common PWM servos. The uppper limit arises because of the pulse stretcher circuitry in the servo. Pulse width is between 1 and 2 milliseconds, and the time between pulses is on the order of 20 milliseconds. The designers of the servos improve the performance of the servo by using a pulse stretcher circuit to energize the servo motor for a major portion of the available time. To try to squeeze all of the response of the servo into 1-2 milliseconds would put the motor, the power electronics, and the power supply at an electrical disadvantage, so a pulse stretcher circuit is used to spread the response out over the available time between pulses.The servo motor is driven by 4 electronic switches in what is called an H-bridge configuration. Only two of the switches should be turned on at the same time. Depending on which pair of the 4 switches is turned on, the servo electronics can drive the motor forward or backward. The pulse stretcher stretches the 1-2 millisecond pulse into a power pulse applied to the motor of up to approximately 20 milliseconds.To simplify the electronics, the designer assumed a maximum pulse rate of around 40 to 50 pulses per second. Very bad things happen if you exceed this rate. The source of the problem is the pulse stretcher. If the servo electronics receives a new pulse before the pulse stretcher completes its response to the previous pulse, it will try to apply both pulses at once. If the two pulses represent motion in opposite directions, there is big trouble: all 4 electronic switches will be turned on at the same time, creating a direct short circuit on the power supply. Besides drawing massive amounts of current through the power electronics in the servo, this will also collapse the voltage of the power supply and will reboot the CPU.I learned about pulse stretchers the hard way. When I was starting out with my first board, I knew that the servo PWM pulse rate was around 50 pulses per second. I reasoned that if 50 pulses per second was good, 100 pulses was better. Not so. I almost fried my first board.Since then I limit my servo PWM pulse rate to around 40 pulses per second. I never have any problems with interference from servo pulses with any of my firmware, on either of my two boards. Servo operation is smooth as silk, and analog to digital conversion is noise free.best regards,Bill Premerlani

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Spartan-rc explained about servos frame rate and pulse width very well at faq
    Digital servos have frame rate ut to 333Hz (or around it) with 1520uSec mid-point, some servor - up to 560Hz with 760uSec mid-point!!!
    Spartan RC
    Innovators in model aircraft avionics technology.
  • That pulse stretcher exists in a PWM driven H-bridge, but in a servo the PWM just determines a target angle & another circuit drives the H-bridge at full power. They want the fastest speed rating.

    The big problem is if you generate a command that stalls the servo. An out of range PWM frequency or duty cycle can get interpreted as a 360' movement. Hitech HS-56's burn out instantly if you do that. Haven't had any problem with Futaba S3102's at 200Hz.
  • It is true both for analogue, and for digital servos?
  • Have you ever test servo with more then 50 Hz rate ?
  • Bill - I have used 50 Hz with fine results from the beginning. It seems 100% A OK. My question for you is do you know of a lower limit? For example, Is 10 Hz update rate doable for servos? I don't plan to ever go that slow but would like to know if you have any insight. Thanks, Dean G
This reply was deleted.

Activity

Joseph Udofia liked Joseph Udofia's profile
14 hours ago
DIY Robocars via Twitter
Jan 28
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ : A Home-brew computer club* for Connected Autonomous Driving. talk at #piandmore ⁦@PiAndMore⁩ on Jan 23rd h…
Jan 23
DIY Robocars via Twitter
RT @a1k0n: New blog post! Deep dive into my ceiling light based localization algorithm which runs in 1ms on a Raspberry Pi 3: https://t.co/…
Jan 23
DIY Robocars via Twitter
Great new guide to using @donkey_car https://custom-build-robots.com/donkey-car-e-book-en
Jan 23
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars virtual AI race is tomorrow morn at 9:00am PT. You can watch live on Twitch https://www.meetup.com/DIYRobocars/events/275268196/
Jan 22
DIY Robocars via Twitter
New version of Intel OpenBot! This resolves many of the issues with the first version, including a much smoother tr… https://twitter.com/i/web/status/1352395636369313798
Jan 21
DIY Drones via Twitter
Using ArduRover with an RTK GPS https://ift.tt/2N9I3RO
Jan 18
DIY Drones via Twitter
Jan 18
DIY Robocars via Twitter
Jan 18
DIY Robocars via Twitter
Jan 15
DIY Robocars via Twitter
Jan 15
DIY Drones via Twitter
Jan 14
DIY Robocars via Twitter
RT @Heavy02011: @diyrobocars : A Home-brew computer club* for Connected Autonomous Driving on Jan 23rd, 2021 https://www.meetup.com/Connected-Autonomous-Driving/events/275728684/ #Meetu…
Jan 14
DIY Robocars via Twitter
Jan 14
DIY Robocars via Twitter
RT @Heavy02011: ⁦@diyrobocars⁩ Autonomous Driving Assembly at #rC3. join us at https://rc3.world/rc3/assembly/diyrobocars-f1tenth/ ⁦@f1tenth⁩ ⁦@DAVGtech⁩ ⁦@DWalmroth⁩…
Jan 11
More…