Wednesday, 18 January 2012

Arduino servos and power burnout...

Wanting to complete my automata-based reading lamp, but having had a lot of servo burnouts, I am trying to prevent the servo getting any power in between position changes. This should greatly reduce the risk of heating.
struggling with the circuit.

If I us digital pin outputs, an output voltage can easily be turned to HIGH (5V) or LOW (0V), but only seems to work with no servos attached. When they are attached the voltage is only 2.5V.

not sure what I'm doing wrong

valPot1 = analogRead(potPin1);            // reads the value of the potentiometer (value between 0 and 1023)
  if ((valPot1 <= midLow)or (valPot1>= midHigh)) {
     digitalWrite (PowerPin,HIGH); //turn on power to servos briefly only at point of writing to allow movement;
     digitalWrite (ledPinJoystick,HIGH);
    // potActive1=true;
    valPot1 = map(valPot1, 150, 900, 0, 179);     // scale it to use it with the servo (value between 0 and 180)
    myservo.write(valPot1);                  // sets the servo position according to the scaled value
 digitalWrite (PowerPin,LOW); //turn off power to servos again once moved to reduce heating effect;  
  else {
    digitalWrite (ledPinJoystick,LOW); // signal that value is in mid-range dead-spot - used to turn off LED that indicates joystick activity;
    digitalWrite (PowerPin,LOW); //turn off power to servos when inactive;


  1. Thanks. I read lots of great stuff by other people who put their efforts online, so I put these ramblings out there just in case they are of any use to anyone!

  2. How are you connecting the Arduino pins to the servo power pins? Directly? Or via a transistor? If you're connecting directly, that would explain why it won't work, because an Arsuino pin can only supply at most 40mA. The servo will need a lot more current than that, which a transistor driver could supply.