i need help.....I've been working in this project of mine for quite a while and it's my first time doing an arduino project.
i bought an arduino atmega 2560, Sensor shield for arduino mega v2 and try to use it to control 19 servos.
My power source is 7.4v, 2000mA lithium batery. i tried connecting the everything and do a simple sweep movement for testing but it didn't show any reaction. can somebody tell me what did i do wrong?
Without code, diagram etc? No, sorry, my crystal ball never works when it's summer...
septillion:
Without code, diagram etc? No, sorry, my crystal ball never works when it's summer...
Mine melted back in spring....
I'm hoping you are not trying to source 5v from the arduino 5v pin........19 servos at once could draw more than 20A, which is miles outside of the max output of the 5v regulator.
Fat change it's even outside of the spec for the battery, even with a 100% effective switch mode...
and try to use it to control 19 servos. My power source is 7.4v, 2000mA lithium batery.
That might just power 2 to 4 servos if you are lucky.
Please read this:-
How to use this forum it tells you how to ask a question here.
umm... how doi upload code in here? and picture thanks.
Code, just past it here in code-tags
Image, just use the attachment function (which you only see in reply mode, not quick reply mode)
Thanks...My circuit looks like this.. well except I'm using Arduino Atmega 2560 not like in the diagram. I can't find arduino Atmega 2560 in the component library so i use Arduino uno as substitute.
Yeahhhhhh, as if we can make anything from that tiny and unclear Fritzing-mess... Try a hand drawing
sorry i really dont know how to upload the code. i'm really just a newbie here. its my first time asking question here. im sorry
code-tags
#include <Servo.h>
Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
Servo myservo5;
Servo myservo6;
Servo myservo7;
Servo myservo8;
Servo myservo9;
Servo myservo10;
Servo myservo11;
Servo myservo12;
Servo myservo13;
// create servo object to control a servo
// twelve servo objects can be created on most boards
int pos = 0; // variable to store the servo position
void setup() {
myservo1.attach(1);
myservo2.attach(2);
myservo3.attach(3);
myservo4.attach(4);
myservo5.attach(5);
myservo6.attach(6);
myservo7.attach(7);
myservo8.attach(8);
myservo9.attach(9);
myservo10.attach(10);
myservo11.attach(11);
myservo12.attach(12);
myservo13.attach(13);// attaches the servo on pin 9 to the servo object
}
void loop() {
for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
myservo1.write(pos);
myservo2.write(pos);
myservo3.write(pos);
myservo4.write(pos);
myservo5.write(pos);
myservo6.write(pos);
myservo7.write(pos);
myservo8.write(pos);
myservo9.write(pos);
myservo10.write(pos);
myservo11.write(pos);
myservo12.write(pos);
myservo13.write(pos);
// tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
for (pos = 180; pos >= 0; pos -= 1) { // goes from 180 degrees to 0 degrees
myservo1.write(pos);
myservo2.write(pos);
myservo3.write(pos);
myservo4.write(pos);
myservo5.write(pos);
myservo6.write(pos);
myservo7.write(pos);
myservo8.write(pos);
myservo9.write(pos);
myservo10.write(pos);
myservo11.write(pos);
myservo12.write(pos);
myservo13.write(pos); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
sorry i really dont know how to upload the code. i'm really just a newbie here. its my first time asking question here. i
Then why did you not read How to use this forum
It tells you all you need to know, except posting images which is here. image guide
// waits 15ms for the servo to reach the position
No way is a servo going to move anything in 15mS, think more of the 500mS.
Do not try and get all the servos working at once, just get one working first.
You will also need lots of decoupling capacitors.
Also the code is very turged, you can write that in about 8 lines if you use arrays and for loops.