2

I have a project where I use 22 servos. I attach all 22 of the servos in the setup and in the loop, I use myservo.write() command to make a particular servo move to a particular position.

The problem here is that, all the other servos become stiff at this point of time, even though I am not writing any value to those servos. By stiff I mean that the servo is holding at a particular random value. Which for most of the 22 servos is at or near 90°.

My question is how can I make a particular servo move, while allowing all the other servos to freely rotate. I think that when I attach a servo the program prevents the free rotation of the servo.

I was wondering if the signal to one of the servos is leaking to other servos because of an issue with wiring, but this is not the case. The other servos become stiff only when I attach them to the pins which have been "attached" as a servo in the program.

0

When you attach a servo the Arduino starts generating the PWM waveform for its currently selected angle. When you write to the servo you just change the current angle and the waveform changes to match. That waveform is constantly being generated from the moment the servo is attached, and will always be generated. That is how servos work. They are not really designed to be back-driven by the load turning the cogs - it is the role of the servo to do the driving, not to be driven.

Depending on the servo you might actually damage the mechanics by driving it backwards like that.

The only way you can stop the servo from being actively driven is to detach the pin from the servo system so that it doesn't think there is a servo there any more.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.