Continuous Rotation servo jitters when in neutral.  Calibration required? - Page 1
Forum section: electronics / beginners

author: grue
author_rank: Newbie
timestamp: February 07, 2016, 07:44:55 am
content: Hello,I am a servo and PWM noob.I'm trying to drive a continuous rotation servo with an MSP430.When I write "90" to the servo, I believe this should be "neutral" and the servo shouldn't be doing anything -- but in my case, it is jittering about 3 times a second and inching ever-so-slightly forward in one direction.My circuit is simple:* Servo Power -> +5V on Breadboard driven by YwRobot power supply (actually measures +4.5V using Multimeter)* Servo GND -> GND on Breadboard* Servo Control -> MSP430 Pin P1.6* MSP430 GND -> GND on Breadboard* Note: MSP430 itself is powered using USBAnd my Energia program just sets up the servo at 90 with no loop activity:#include <Servo.h>Servo my servovoid setup() {myservo.attach(GREEN_LED); // P1.6 on MSP430myservo.write(90); // Should be "Neutral" (no spin)}void loop() {// NOP}Why the jitter? If I go to 91 or 89, the servo turns "more" than the slight jitter it does at 90.Does a new servo require some kind of calibration? In asking myself that, I just found a tiny hole with a phillips head screw in it... Maybe that's what I need to adjust! I will try to find a tiny screwdriver -- is the proper way to calibrate this to put it at 90 and adjust until it is absolutely silent?Should a calibrated servo be "silent with no movement" in neutral, or will there always be a bit of jitter?Thank you!

author: grue
author_rank: Newbie
timestamp: February 07, 2016, 07:56:09 am
content: I found a tiny screwdriver and turning the servo's screw (I assume it is a potentiometer) does change the behavior of the servo to start spinning left or right, but I cannot get the servo to "be still" when it should be "fully in neutral."

author: grue
author_rank: Newbie
timestamp: February 07, 2016, 08:07:56 am
content: If a picture is worth a thousand jitters, I made this video to demonstrate the jitter I'm seeing:

author: Skimask
author_rank: Super Contributor
timestamp: February 07, 2016, 08:10:56 am
content: http://www.rcgroups.com/forums/showthread.php?t=1145538http://lmgtfy.com/?q=servo+dead+band

author: MarkS
author_rank: Unknown
timestamp: February 07, 2016, 09:20:31 am
content: Quote from: Skimask on February 07, 2016, 08:10:56 amThat was rude. Google is only helpful if you know the search terms.

author: lamello
author_rank: Contributor
timestamp: February 07, 2016, 11:15:42 am
content: I assume it's due to software pwm signal generation by the servo lib.It's unrelaible due to interrupt handling for other stuff.You could test this by disconnect the signal cable of the servo, does it stop jiggering?A solution is to detach the servo if it's at the correct angle.Look for the servoextend library.Verstuurd vanaf mijn SM-T800 met Tapatalk

author: babysitter
author_rank: Frequent Contributor
timestamp: February 07, 2016, 11:32:15 am
content: Time to form a music group called "Servo death band".

author: Galenbo
author_rank: Super Contributor
timestamp: February 07, 2016, 12:11:54 pm
content: Quote from: grue on February 07, 2016, 07:44:55 am"Position "90" (1.5ms pulse) is stop,..."can you measure the result with a scope?How close is the result to 1.5ms?

author: nuno
author_rank: Frequent Contributor
timestamp: February 08, 2016, 01:25:33 am
content: What's the time you're using between pulses? Sometimes it's too short (as it happens with Arduino's PWM signals) and that causes trouble with some servos which have smaller tolerance on that spec (even same model servos). If memory serves me right, the typical value is start a (1ms to 2ms) pulse every 20ms.

author: retrolefty
author_rank: Super Contributor
timestamp: February 08, 2016, 01:54:31 am
content: You need to find the 'true zero' for your continuous rotation servo. This is typical said to be 90 (degrees) but that often doesn't allow the step resolution required to prevent creep. Some such servos have an internal trim pot to adjust the zero point but most don't.Arduino users can deal with zeroing continuous rotation servos by commanding with microsecond resolution as follows:Quote

author: electr_peter
author_rank: Unknown
timestamp: February 08, 2016, 08:17:01 pm
content: Servo is not set exactly to be neutral at 90 degrees (or 1.5 ms signal). There is very little you can do about this - either get another servo without this problem or change input signal just slightly up/down until servo is stationary. Changing to 89 or 91 from 90 is too abrupt change, you have to change to something like 90.1 or 89.8.Worst of all, calibration/adjustment mentioned above will be only temporarily at best because neutral point will drift with time and servo usage. The only real way to solve this issue is to get an expensive servo with much better closed loop (better sensor = optical/magnetic encoder; better and smoother electronics with less deadband).

author: nuno
author_rank: Frequent Contributor
timestamp: February 09, 2016, 12:16:28 am
content: Usually I also stop the signal to the servo when I want it to be stopped, it's probably harmless in your application.

author: Galenbo
author_rank: Super Contributor
timestamp: February 11, 2016, 05:09:00 pm
content: Quote from: nuno on February 09, 2016, 12:16:28 amDoes your servo keep the position in that case, and corrects for external force?

author: nuno
author_rank: Frequent Contributor
timestamp: February 12, 2016, 12:27:40 am
content: Quote from: Galenbo on February 11, 2016, 05:09:00 pmOf course not, but the applications I usually see for continuous rotation servos (little robots and such) are ok with that, that's why I said "it's probably harmless in your application", and also to note there's a caveat.

author: Galenbo
author_rank: Super Contributor
timestamp: February 12, 2016, 11:01:37 am
content: I thought maybe there were versions that kept the force, in the case there was voltage supply, and no signal.I a way they remembered the last asked-position.

author: nuno
author_rank: Frequent Contributor
timestamp: February 12, 2016, 04:23:52 pm
content: Actually, all continuous rotation servos I've used were normal servos I modified for continuous rotation. I also make them center-point adjustable, leaving a hole in the center of the output gear to access the shortened pot shaft where I cut a slot for the screwdriver to grab. I don't think "commercial" cont. rotation servos are "any" different from normal ones except for 2 or 3 mechanic components, and as far as I've seen there's maybe less than half a dozen models available "mainstream", so they probably behave the same as normal ones.