Trouble detaching two servos

I have a project that uses two servos to move to hands on a clock face.

I am able to control the fine; however, I want to be able to detach them once they move to the right position so that the motors don’t chatter periodically.

When using one servo, I can do this fine. I move the servo, detach it and attach it the next time I need to move it. The clock is quiet except when I need to adjust the hands.

With two servos, the method of attaching and detaching causes very erratic movement in the motors. It also behaves erratically if I leave one motor attached but detach the other.

I’m using pins d0 and d1 to control the motors.

Any thoughts on How I might improve this (short of adding a second control board)? I’m curious if changing pins might help or if there is another library other than the default servo library that might be worth trying.

Can you cut power to the Servo instead of cutting the position pins D0 and D1?

1 Like