"Turn off" or "rest" servos after long periods of inactivity?

I recently built a quick and dirty installation that uses pan/tilt mechanisms equipped with Hitec HS-422 servos to move some 10W RGB floodlights (weighing in at about 600 grams each). So far they are working great, but the installation needs to last for three months and I'd like to see if I can add some improvements to help it last.

Right now the servos are controlled by some custom control panels and are actively working for about 8 hours a day. Most of that time they are not being interacted with, so I'd like to see if I can find a way to put the servos to "sleep" to help prevent at least some of the wear they may be incurring.

For me, the ideal behavior I'm looking for is for the pan/tilt mechanism to go "limp" and move to a position that puts little to no strain on the servos' mechanical or electronic systems.

So far I've heard of two options: 1) using the detach() method after a certain amount of time has passed and 2) switching the power lines to the servo with a transistor.

  1. It looks like the detach() method only stops PWM pulses from being sent to the servo, but the servo itself is still going to actively try to hold it's last-known position. This doesn't really help prevent wear on the servos, but may be a part of my solution.

  2. Switching the power lines with a transistor isn't really practical for my project, since it is already installed at a venue and not as easy to make physical changes to. But if this really is the best solution I can make it happen.

Let's say I move the tilt servo down far enough such that the load (the 10W LED floodlight) is actually in contact with a small shelf or mounting plate so that the weight is somewhat resting. The servo would still be trying to actively hold it's position, but may have to do less work to do so. Would this be a decent solution?

It would appear from other discussion that when detach() is called pulses are immediately stopped from being sent to the servo. The servo "should" go limp at that point, if your servo is not going limp then I can think of two options.

  1. digitalWrite(servoPin, LOW) immediately after detach() as this would be to correct temporary erratic behavior if detach() were called when the servo pulse was high, this should force the servo to go limp, otherwise..

  2. Your servo is smart and tries to maintain last position in the event of "loss of signal", no servo I have ever used did this.

It should be noted that servos were never designed to be operated without control so it is possible that there could be erratic behavior; however, I suspect if you set the pin low it will just stay limp until you reattach it.

But electrons don't wear out. If it's sitting in one place then it's not wearing the gears.

Also look at counterbalancing the load so that the servo is not holding the full weight of the load.

From what I've seen, typical analog servos don't hold their last position when the servo control signal is stopped. Some digital servos do hold their last position when the signal is stopped. For the least amount of wear on the servos, the pan/tilt should be designed so the servos do not support any weight, they should only supply rotational force.

@zenwebb, the "lowering the light onto a platform" idea should work. You could press a button and the servos would move to a "home" position, maybe with the arm resting on a pad of some sort. Then, maybe switch off power to the servos.

I cant stop my servo from rotating after meeting a certain condition. Can someone help me? i use int flag = 0
and this is some part of my coding

if (flag == 0)
{
rightservo.write(180);
leftservo.write(180);
delay(2000);
rightservo.write(90);
leftservo.write(90);
flag = 1;

Can you show us some other part of your code? Like all of it? You should create a new thread for a new problem.

Don't forget to use [ code ] tags (the button looks like </>) when you post code, otherwise the forum software will misinterpret your code.

You can't stop it from rotating? You mean when you move it to a position it doesn't hold it?

you have a major mechanical design flaw. dont try to fix it with electronics. thats only a bandaide. like said above you need to balance the load.

you servos shouldnt care though if the moment the lamp weight creates is smaller than the torque of the motor.