I am controlling a servo motor using an arduino UNO R3. The servo motor would rotate once every 6 hours using a timer.How do I make the servo motor sleep when it has just rotated and wake up every 6 hours when it has to rotate?Is there a code to do this?

I am using an LCD display as well and I am making use of the "delay" command as the "timer".The user would input a "1st hour" and a "current hour". The current time would then increase by 1 using the delay(3600000) which is 1 hour. when the current hour reaches the 1st hour, the servo will rotate. The next rotation time would be the 1st hour + 12 hours/8hours/6 hours (this depends on the user input as well). So the motor would then rotate again at the calculated time. In between, the servo does not do anything. But upon running the program, I understand that internally, the servo still running and could feel some vibration.

So I would like to know if it is possible to have a code to temporarily sleep the servo till its next rotation time.

If you power off the servo it will jump, possibly on power off, and definately on power on. Also - with power removed it might not hold position ans the motor would have no holding torque. How much power does it use when sitting?

A DC motor or a stepper motor through some gear reduction might be a better choice as they could both be powered off.

// zoomkat 10-14-11 serial servo test// type servo position 500 to 2500 in serial monitor// type in number <500 to detach servo// for IDE 0022 and later// Powering a servo from the arduino usually DOES NOT WORK.

void setup() { Serial.begin(9600); myservo.writeMicroseconds(2000); //set initial servo position if desired myservo.attach(7); //the pin for the servo control Serial.println("servo-test-22"); // so I can keep track of what is loaded}

It might lower the power consumption partially because it is sending to control signal, but the servo is still powered.

I guess the terms "sleep a servo motor" should be more technically defined. There have been other previous discussions of removing total power from a servo. when a servo is detached there should not be any control signal going to the servo control chip, which would result in the servo h-bridge not receiving any control pulses, resulting in the servo motor not receiving any power, which could be equated to the motor being "asleep". The servo chip and the pot in the servo are using some power anytime the servo itself is receiving power.

Google forum search: Use Google Advanced Search and use Http://forum.arduino.cc/index in the "site or domain:" box.