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

DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Monday
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Saturday
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Thursday
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23
DIY Robocars via Twitter
RT @DAVGtech: Another incident: https://t.co/G1pTxQug6B
Oct 23
More…