I'm using an HS-785HB servo (https://www.robotshop.com/media/files/pdf/hs-785hb.pdf) for my project.

I'm working on the Mbed platform and it uses C++.

The servo library I use is Servo.h and I'm programming an STM32 microcontroller.

The issue I'm facing is that the servo keeps jittering while it is been powered. I'm supplying 6V to the servo from a relay and my application requires to not turn off the relay until the process is complete, i.e. I need to continuously power my servo so it can hold onto its position.

The command I use is Servo.Enable(position, speed) and Servo.SetPosition(position, speed).

There are a total of 3 servos in my project and all the 3 servos have shown jittering. I have also tried to connect a capacitor across its power lines if that could rectify the noise AC signals from the DC supply, however, this method didn't prove effective.

What can I do to resolve this issue?


I just discovered that due to a stepper motor, I was having those jitters in the servo. To confirm this, I disconnected the Stepper power line to the driver and ran the machine, the servos worked without any jitter. But I still don't understand how or why would this happen? The stepper runs from a separate 24V SMPS and the servos run from a different 12V SMPS w/ DC-DC Converter.

  • \$\begingroup\$ There isn't really enough information here to make this answerable. You would really need to measure the servo signals and verify that they are in range and stable; you would also want to see if the servos jitter when controlled from a more conventional source. Finally, worth noting that jitter is not nearly as large a problem in the intended application of hobby servos, and inexpensive ones in particular may simply not be up to your need - they are not what gets used for things like camera pan/tilt, for example. \$\endgroup\$ Apr 6, 2019 at 6:31
  • \$\begingroup\$ Does the power supply have enough capacity and provide a stable output under load? \$\endgroup\$
    – Solar Mike
    Apr 6, 2019 at 7:02
  • \$\begingroup\$ What are you doing with the servos? Are they mechanically coupled so that one moving could cause another to move? \$\endgroup\$
    – JRE
    Apr 6, 2019 at 7:31
  • \$\begingroup\$ I can assure that there is enough power supply to the servos. They are powered from a 12V SMPS which is further connected via a DC to DC converter. Two of the Servos used are placed in a kind of a point load cantilever setup. Something like in a 3D printer. One moves in the +/- X direction and another servo (+/- Z direction) which is supported by the X motor. I have measured the power and servo signals from a multimeter and found nothing wrong in it. No foul signals were sent from the board. They aren't mechanically coupled. \$\endgroup\$ Apr 6, 2019 at 7:53
  • 1
    \$\begingroup\$ If the servo signal is sent via a non-PWM pin it could have jitter. Please show us your code! Also a photo of your setup so we can check your wiring. \$\endgroup\$ Apr 6, 2019 at 9:16

1 Answer 1


Do you have a servo tester? It's a small cheap device with a knob, like this one https://www.amazon.com/RCmall-Digital-Consistency-Controler-Checker/dp/B01BY5LOZE

It could be that you send such pulses from STM32, and that it's not a jitter rather your command pulse train. Keep in mind that servos accept voltage from 4V to 6V, while your STM32 works on 3.3V. It has 5V tolerant pins, but not all of them are 5V tolerant.

Show the schematics and link the program.

  • \$\begingroup\$ Signal is only an input to the servo so supply voltage should not matter. Most modern servos work fine with 3.3V logic. \$\endgroup\$ Apr 6, 2019 at 9:09
  • \$\begingroup\$ @BruceAbbott I'm not an expert of RC servos, but I do think that a controller doesn't send 3.3V pulses, rather it has an open drain output and the I/O voltage comes from servo through a pull-up resistor. Hobby servos have rarely published datasheets with that detail, so I can only guess. But many flight controllers use 5V tolerant pins. \$\endgroup\$ Apr 6, 2019 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.