Author Topic: Continuous Rotation servo jitters when in neutral. Calibration required?  (Read 8261 times)

0 Members and 1 Guest are viewing this topic.

Offline grueTopic starter

  • Newbie
  • Posts: 4
  • Country: us
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 USB

And my Energia program just sets up the servo at 90 with no loop activity:

#include <Servo.h>
Servo my servo

void setup() {
  myservo.attach(GREEN_LED); // P1.6 on MSP430
  myservo.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!
 

Offline grueTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #1 on: February 07, 2016, 07:56:09 am »
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."
 

Offline grueTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #2 on: February 07, 2016, 08:07:56 am »
If a picture is worth a thousand jitters, I made this video to demonstrate the jitter I'm seeing:

 

Offline Skimask

  • Super Contributor
  • ***
  • Posts: 1433
  • Country: us
I didn't take it apart.
I turned it on.

The only stupid question is, well, most of them...

Save a fuse...Blow an electrician.
 

Offline MarkS

  • Supporter
  • ****
  • Posts: 825
  • Country: us
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #4 on: February 07, 2016, 09:20:31 am »
http://lmgtfy.com/?q=servo+dead+band

That was rude. Google is only helpful if you know the search terms.
 

Offline lamello

  • Contributor
  • Posts: 25
  • Country: nl
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #5 on: February 07, 2016, 11:15:42 am »
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

 

Offline babysitter

  • Frequent Contributor
  • **
  • Posts: 893
  • Country: de
  • pushing silicon at work
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #6 on: February 07, 2016, 11:32:15 am »
Time to form a music group called "Servo death band".
I'm not a feature, I'm a bug! ARC DG3HDA
 

Offline Galenbo

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: be
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #7 on: February 07, 2016, 12:11:54 pm »
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....

Why the jitter?  If I go to 91 or 89, the servo turns "more" than the slight jitter it does at 90...

"Position "90" (1.5ms pulse) is stop,..."

can you measure the result with a scope?
How close is the result to 1.5ms?
If you try and take a cat apart to see how it works, the first thing you have on your hands is a nonworking cat.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #8 on: February 08, 2016, 01:25:33 am »
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.
« Last Edit: February 08, 2016, 01:27:23 am by nuno »
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #9 on: February 08, 2016, 01:54:31 am »

 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
#include <Servo.h>

Servo myservo;

void setup()
{
  myservo.attach(9);
  myservo.writeMicroseconds(1500);  // set servo to mid-point or the stop point for continuous rotation servos
                                                       // trim the 1500 value up or down until servo stops
}

void loop() {}
 

Offline electr_peter

  • Supporter
  • ****
  • Posts: 1302
  • Country: lt
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #10 on: February 08, 2016, 08:17:01 pm »
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).
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #11 on: February 09, 2016, 12:16:28 am »
Usually I also stop the signal to the servo when I want it to be stopped, it's probably harmless in your application.
 

Offline Galenbo

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: be
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #12 on: February 11, 2016, 05:09:00 pm »
Usually I also stop the signal to the servo when I want it to be stopped, it's probably harmless in your application.
Does your servo keep the position in that case, and corrects for external force?
If you try and take a cat apart to see how it works, the first thing you have on your hands is a nonworking cat.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #13 on: February 12, 2016, 12:27:40 am »
Usually I also stop the signal to the servo when I want it to be stopped, it's probably harmless in your application.
Does your servo keep the position in that case, and corrects for external force?
Of 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.
 

Offline Galenbo

  • Super Contributor
  • ***
  • Posts: 1469
  • Country: be
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #14 on: February 12, 2016, 11:01:37 am »
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.
If you try and take a cat apart to see how it works, the first thing you have on your hands is a nonworking cat.
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Continuous Rotation servo jitters when in neutral. Calibration required?
« Reply #15 on: February 12, 2016, 04:23:52 pm »
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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf