servo overheat HELP!!

HI there ime new to coding and i have tried my hardest to get this to work but am now struggling
all i want to do is get two servos to move 8 hours apart after pressing a button but as i was testing my device i left it on for 30 min and it overheated the servos and burnt them out and now i am back to square one some advice would be great i have designed 2 servo pumps witch work flawlessly but my coding skills have let me down as i only have very basic knowledge

/*
Input Pullup Serial

This example demonstrates the use of pinMode(INPUT_PULLUP). It reads a
digital input on pin 2 and prints the results to the serial monitor.

The circuit:

  • Momentary switch attached from pin 2 to ground
  • Built-in LED on pin 13

Unlike pinMode(INPUT), there is no pull-down resistor necessary. An internal
20K-ohm resistor is pulled to 5V. This configuration causes the input to
read HIGH when the switch is open, and LOW when it is closed.

created 12.27.201

*/

#include <Servo.h>

Servo servo1; // create servo object to control a servo
Servo servo2;
int pos = 0; // variable to store the servo position

void setup(){
//start serial connection
Serial.begin(9600);
//configure pin2 as an input and enable the internal pull-up resistor
pinMode(2, INPUT_PULLUP);
pinMode(13, OUTPUT);
servo1.attach(9); // attaches the servo on pin 9 to the servo object
servo2.attach(8); // attach second servo to pin 8

}

void loop(){
//read the pushbutton value into a variable
int sensorVal = digitalRead(2);
//print out the value of the pushbutton
Serial.println(sensorVal);

// Keep in mind the pullup means the pushbutton’s
// logic is inverted. It goes HIGH when it’s open,
// and LOW when it’s pressed. Turn on pin 13 when the
// button’s pressed, and off when it’s not:
if (sensorVal == LOW) {
digitalWrite(13, HIGH);
servo1.write(0);
delay(700);
servo1.write(180);
delay(900);
servo1.write(0); // one rev 3ml
delay(700);
servo1.write(0);
delay(700);
servo1.write(180);
delay(900);
servo1.write(0); //2nd rev 6ml
delay(700);
servo1.write(0);
delay(700);
servo1.write(180);
delay(900);
servo1.write(0); //3rd rev 9ml
delay(700);
servo1.write(0);
delay(700);
servo1.write(60);
delay(900);
servo1.write(0); //4th rev final 10ml
delay(700);

servo2.write(180); // one rev 3ml
delay(700);
servo2.write(180);
delay(700);
servo2.write(0);
delay(900);
servo2.write(180); //2nd rev 6ml
delay(700);
servo2.write(180);
delay(700);
servo2.write(0);
delay(900);
servo2.write(180); //3rd rev 9ml
delay(700);
servo2.write(180);
delay(700);
servo2.write(120);
delay(900);
servo2.write(180); //4th rev final 10ml
}
else {
digitalWrite(13, LOW);

}
}

running from a 9v .65a powersupply out of vin pin and had usb connected when the overheat happen

could you provide a circuit diagram?

regards

Allan

hope this helps

wire diagram.jpg

Well , apart from anything else you're getting servo power from the arduino Vin- which will probably be >9v, and the servos are only rated at 5.

You need a seperate 5v regulated supply for the servos.

regards

Allan

i thought that 2 so i stepped down the power to 6v 1A befor the incident and the servos dident move and there are many other people who use 9v battrys to power servos they are rated up to 7.2v they are dc motors so can handle up to 9v usualy without risk as i had them running of a 9v battery for a couple of hours without a problem but i was looking for something more long term so i used a 9v .65 a power supply witch worked but they were jittery as it was running the arduino to it only happened when i connected to usb for programming

For two standard servos, you must use a 4.8 - 6 V regulated power supply or battery pack capable of providing at least 2 amperes.

Don't forget to connect all the grounds.

I still think a regulated psu is good idea....

The point of a servo is that it only takes significant power when it's moving. If it's jittering it's taking power all the time, so could overheat.

Try putting a deadband round the movement command - only if greater than a certain amount of error does the servo move.

Or find out why it's jittering.

regards

Allan

how would i put a deadband around the movement commands as i sead ime rearly new to coding it may help and i will have a look at getting a regulated psu at 6v 2aps at craplins or it may have to be off flebay and thanks for the help i will keep you posted

would a 5v 2a psu work
http://www.ebay.co.uk/itm/DC-12V-24V-5V-Power-Supply-for-LED-Strip-Universal-Regulated-Switching-CCTV-UK-/191733870857?var=&hash=item2ca43ab109:m:mPu7fe3VbWXi0A1quJ78VWg

or

http://www.maplin.co.uk/p/20w-acdc-multi-voltage-power-supply-l06br