How to stop PWM signal?

Hi. I am using a servo to move a rather heavy solar panel. Once I set the angle to, say, 45 degree, the servo doesn’t quite has the strength to move the panel to exactly 45 degree and the motor is constantly rotating, trying to get the panel to exactly 45 degree.

My question is, is it possible to turn off the PWM signal once I set the angle to 45 degree? If not, can I do it using an external circuit? (using a NMOS or whatever?)

#include <Servo.h> 

Servo myservo;
myservo.attach(3, 300, 1550);


If you stop the servo refresh then it won't hold position. If that's not an issue the you can "detach" that pin.

Nice. I didn't know about the detach function. Thanks a lot!