Servo Jitter - PWM train's affect on the servo?

Thread Starter

MrJojo

Joined Jan 23, 2013
45
Hello all,

Long story short, I'm using 2 digital servos as a pan and tilt system for a project. I've noticed that my tilt servo (which holds the pan servo and lens) jitters under stress. I noticed that I can fix this mechanically by tightening everything down. However, I'm assuming things will get loose eventually and the problem will start occurring again. I want to see if I can fix the problem electrically.

I am using the Hitec HS-M7990TH servos, which are more than powerful enough to hold whatever I throw at it. I can program the servo with the HPP-21. When I use that, the tilt servo doesn't jitter. However, when I wire the servo to an Arduino I'm using, the servo jitters every now and then. I wanted to look at the signal and attached are two images taken from the oscop I have. One is the rise of the HPP-21 and the other is the rise of the Arduino.

I noticed that the rise of the HPP-21 is 3.65 us while the rise time of the arduino is 24 ns. The HPP-21 doen't overshoot while the Arduino overshoots to 5.3V and then settles at 5V. I know the pictures don't show several pulses, but they are all 1500 (which is what I set both at).

My question is, will the rise time and overshoot make a big difference in the functionality of the servos? I thought the servos only really cared about the pulse width which is 1500 micro seconds on both cases.

Thanks,
Matt
 

Attachments

Markd77

Joined Sep 7, 2009
2,806
I suspect the code, you could maybe run a test using a comparator with both sources so the servo would see the same rise and fall with both to rule the rise time out.
With servos it's usually not just the pulse width, if the repetition rate varies that will cause movement as well.
 

Thread Starter

MrJojo

Joined Jan 23, 2013
45
I know that the arduino is outputting at 50Hz and I noticed that the HPP-21 is outputting at 49.9Hz. However, the official statement is 50Hz from Hitec.

Matt
 

djsfantasi

Joined Apr 11, 2010
9,163
Is there any particular position of the Hitec HS-M7990TH where jitter is more apparent? Such as at the end of its travel in one or both directions? The leverage of the load may cause slight variations in the feedback loop, causing jittering. In that case, adding a spring to balance the structure may assist.

If loosening is a problem, have you considered using something like Lok-Tite to prevent any attaching screws and/or bolts?

Something else with the Arduino. What else are you driving with it? Do you have separate power for the Arduino and the servos? Is anything else on the power for the servos? The signal looks a little "dirty" and what may be causing that?
 

John P

Joined Oct 14, 2008
2,026
I don't have a huge amount of experience with servos, but I've found that the ones that are sold as "digital" will definitely stop all motion if the incoming pulse train stops. So if you want to eliminate jitter when you use that kind of servo, just get the pulse width to what you want, hold it for a short period and then stop the pulses. I don't think this necessarily works with the more traditional kind of servo.
 

Thread Starter

MrJojo

Joined Jan 23, 2013
45
@djsfantasi,

I am powering the servos from a separate power supply which can properly power them under max stress. This power supply is also attached to the Arduino which is in the acceptable Arduino input range. I have noticed a few specific spots where the jitter is more than others when the pulses are controlled by the Arduino, but when I hook up the HPP-21 (Servo's pulses) there is no jitter in those areas.

As for Lok-Tite, I'd prefer not to because say something fails inside my structure, I wouldn't really be able to open it to fix.

I haven't looked at the power to the Arduino, but I'm under the assumption it is clean, should I check with an Oscope or use a multimeter and monitor AC voltage on the line? Reason I say AC is because I figure a dirty signal will vary voltage over time which sounds like AC to me...

@John P
I programmed in a spot in case of loss of signal. It is meant to keep the servos in safe postion where nothing will get damaged.

Matt
 

Thread Starter

MrJojo

Joined Jan 23, 2013
45
So I finally took my system apart and took my oscope to the actual servo being stressed and I found these attached pictures. One is with freq, ride time, Vpp, width, and Vmax showing, the other uses the cursors to see how large the dip in signal is. Attached are both pictures.

Any thoughts on how to clean up the signal?

Matt
 

Attachments

Thread Starter

MrJojo

Joined Jan 23, 2013
45
So I tried putting my signal through a buffer but that only made things worse. My thought was to try and clean up the signal and maybe that would make things better. I don't know where to go from here besides start trying to write my own code.

Matt
 

Thread Starter

MrJojo

Joined Jan 23, 2013
45
So I "zoomed in" on the rise of the Arduino's PWM and i noticed that ithe signal overshoots to 7V and then settles. I put in a low pass filter for 550 hz - I had components laying around for it - and I got a smooth rise time. However, I'm still getting the jitter issue.

Can it be possible I don't have enough power to the signal pin of the servo...? My power supply can definantly handle the power draw of both servos under full load. Maybe should I put a large cap across the power supply? I'm kind of pulling at straws now.

matt
 
Top