Go Down

Topic: (Noob) Servo question, TowerPro SG-5010 won't move. (Read 1 time) previous topic - next topic

Scatman

Hi!

I'm new to all this and I have a question about my TowerPro SG-5010 servo.

With this code I'm able to move a micro servo by rotating a pot.
But when i swap the micro servo for my TowerPro (a lot bigger) it won't work.

Is this a power related problem? What do i need to do to make use of my 5010?

Thank you very much!

#include <Servo.h>
Servo myservo;
int sensorPin = 0;
int sensorValue  = 0;

void setup() {

  myservo.attach(9);

}

void loop(){

  sensorValue = analogRead(sensorPin);
 
  int place = map(sensorValue, 0, 1023, 180, 0);
 
  myservo.write(place);

}

robtillaart


Maybe the powertoy draws too much current for the Arduino to handle, try using a separate voltage supply.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Scatman

Just tried it with a another 5010, and it works. Probably a faulty servo? Or can the difference in current between servos be that big?

robtillaart

Quote
Probably a faulty servo? Or can the difference in current between servos be that big?

1) Possible
2) yes

Do you have a multimeter to see how much current is drawn?
And yes an Arduino cannot deliver so much (from head 50mA per pin max) where a servo can easily draw 4 times as much .....
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up