Working with the Arduino Diecimila, we are unable to achieve a full 180 degrees of motion when interfacing with servos using either the SoftwareServo library available for download at this website or the Servo library included in the Arduino IDE package. We have tested this with three servos, including two TowerPro MG995 and an SG90. All servos move through approximately 135 degrees of motion when testing from 0 to 180 in software. We believe, due to the consistency across servo brands, that this is an interfacing problem rather than a hardware problem (ie, the maximum pulse width sent by the arduino may be less than the maximum expected by the servos). Does anyone know what might be going wrong?
Many servos are not capable of a full 180 degree stroke. Check the data sheets for nominal travel for the servos you have to see if that might first be the problem. Hobby servos will typically have travel that will include 1ms to 2ms commands, with some amount of over travel above and beyond this spec, but it varies from brand and model how much 'over travel' they can process.
You can set the pulse width associated with 0 degrees and 180 degrees using the min and max parameters to the attach method, see: Servo - Arduino Reference
By default, a servo will be driven through a range of 544 to 2400 microseconds. Although this can be changed using lower values of min and larger values of max, most servos won't handle much more than this.
If you prefer to work in microseconds, you can use the MegaServo library here : Arduino Playground - MegaServo
It treats values given to the write method that are larger than 200 degrees as values in microseconds.