Strange performance of Software Servo

Finally I've got myself a couple of Servo's, but I can't get them working properly.
I've found this code on the Arduino homepage and I've got it working, but I there isn't 180 degrees between when I write 0s and 180s - so the Servo isn't turning all the was back or forth.

Here is the code I'm working with:

#include <SoftwareServo.h>

SoftwareServo servo1;

void setup()


void loop()
  static int v = 0;

  if ( Serial.available()) {
    char ch =;

    switch(ch) {
      case '0'...'9':
        v = v * 10 + ch - '0';
      case 's':
        v = 0;


I have the same problem, just I didn't had time to ask around about it. Didn't bother me too much yet, but it will be nice to fix it. It's maybe because I'm using cheap servos?

Did you try adjusting the min/max pulse width for your servo? Different types of servos have varying specifications for the minimum and maximum pulse width. If you have specifications for your servo you should be able to find the values there. If not, then you're going to have to experiment.

I don't have any specifications.
It's a J-Power Microservo if you could find sine specifications.

I still can't get it turning all the way, but it's better now.
The problem is that if i set the minimum to 460, then when i set it to position 0, then it goes to the left and start humming - like it can't go further!
But if i set it to 464, then it goes to the left, but not all the way, but it doesn't start humming!

If the servo turns to the point where it stops an hums, then you've hit the mechanical limit of the servo. Try adjusting the maximum until you find its limit in the other direction. When you find the limits then that's all the rotation your servo is capable of.

Also, don't run the servo long against it's limit (where it stops and hums). You'll damage the servo as it's straining against a mechanical stop.

But the point where it stops and hums, if i turn off the power, I can turn it even more to the left, and then I hit the mechanical stop.
But the servo starts to hum some degrees before the mechanical stop, and it can't get further to the left electrically!