How to prevent stall on servo when returning to position 0

cubangt:
After uploading, when it gets to position 180, its a smooth return the other way heading toward position 0. But when it gets to position 0 it stalls/hangs like its being forced past and then turns around to 180.

Not 100% sure what you mean from the above, as the description could have been a bit rushed.

But what I normally do is to just write a script that slowly and gradually increases the PWM pulse width in steps.... such as in steps of 50. eg... 0, 50, 100, 150 etc. And, initially the servo will not move until the pulse width gets large enough.... such as when it reaches 650 or 700. That's when you record the value (at which the pulse width is wide enough to get things moving). The script should write messages to Serial Monitor - so that the test results can be monitored.

Then the stepping continues. eg... 2000, 2050, 2100 etc. Eventually it'll get to a point where the pulse width is too large and the servo won't do anything. So I record the very last/highest 'workable' value.

That gets you your range of pulse width (at least roughly) for which the motor will respond to workable pulse widths.

From that point on, it is necessary to use only the workable values of pulse width. Don't use values that the motor doesn't respond to (or responds incorrectly to).

So, you might end up with a range of pulse widths from 700 to 2100. The two end-points (700 and 2100) would then correspond roughly to minimum and maximum workable angle that your motor will allow.