Problems when controling a servo via TIP120

As I use my servo rather unfrequently I want to cut it's power when it's idle.
I am using this scheme with the servo instead of the solenoid, the TIP120 connected to D4 and D9 as the servo control pin, with the code

#include <LowPower.h>
#include <Servo.h>

Servo myservo; 

int pos = 0;
int power=4;

void setup() {
myservo.attach(9); 
}

void loop() {
    digitalWrite(power, HIGH);
    delay (1000);
    myservo.write(60);  
    digitalWrite(13, HIGH);     
    delay(1000); 
    myservo.write(90);
    digitalWrite(13, LOW);
    digitalWrite(power, LOW);
    delay(1000);
    LowPower.powerDown(SLEEP_1S, ADC_OFF, BOD_OFF);  
}

The led is blinking, The current from the battery to the servo is changing accordingly from 0 to roughly 1mA (this is not accurate) but the servo is not moving.

What could be the problem with this?

That will never work. TIP120 is very old Darlington transistor. The voltage drop between collector and emitter is some 1.5 to 2 volt when it is conducting. When the transistor is off the servo control input has not ground reference.

Railroader:
That will never work. TIP120 is very old Darlington transistor. The voltage drop between collector and emitter is some 1.5 to 2 volt when it is conducting. When the transistor is off the servo control input has not ground reference.

I try to understand this-
When the transistor is off this may damage anything?
I tried to put the transistor always on and still it didn't work - is it just b/c the voltage drop?

Anyway is there a way to save servo power in idle time?

Hi,

Please read the post at the start of any forum , entitled "How to use this Forum".
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

You need to disconnect your servo on the positive supply lead, this will need a P-CH MOSFET.

When you want to turn your servo off, is it applying torque to keep a position?
If it is, then removing power will loose control of the servo and the load torque on the servo will turn the servo away from it set position.

Servos consume current to not only move but if needed hold a set position.

Tom..... :slight_smile:

TomGeorge:
You need to disconnect your servo on the positive supply lead, this will need a P-CH MOSFET.

Thanks! I don't have any load so I'll try this.

holdingpattern:
Did you see this?

I didn't know this option but indeed detach lowered the idle time consumption of my MG669R from 10mA to 5mA.
Nice!