Pages: [1]   Go Down
Author Topic: (Noob) Servo question, TowerPro SG-5010 won't move.  (Read 1088 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);

}
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12417
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Rob Tillaart

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

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 168
Posts: 12417
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 .....
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: