Electrical – What can be the cause for the servo to jitter continuously while powered

jittermbednoiseservo

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?


Update:

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.

Best Answer

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.