Servo glitch: oneway selfe going

hii,

 

my servo goes glitching when power goes on it. i made a press butten to control its flow. when i push the pcb button wich is connected to 5v on arduino the flow will go trough my servo and its moves, if u think its ok.. u might wanna know that my arduino has no controlling a servo, but it moves anyway!! how is this possible orange is conntected to pin o/i 9 red to 5v and black to current. help me and ask what u need to know :3

and also my usb goes on and of on and of...... its beebing >.< then servo moves agian a little NO CODE FOR THE SERVO IN IT

 

 

void setup() {                

  // initialize the digital pin as an output.

  // Pin 13 has an LED connected on most Arduino boards:

  pinMode(2, OUTPUT);

  pinMode(3, OUTPUT);

  pinMode(4, OUTPUT);

  pinMode(5, OUTPUT);

  pinMode(6, OUTPUT);  

 

}

 

void loop() {

  digitalWrite(2, HIGH);

  delay(100);   

 

  digitalWrite(2, LOW);  

  digitalWrite(3, HIGH); 

  delay(100); 

 

  digitalWrite(3, LOW);

  digitalWrite(4, HIGH); 

  delay(100); 

 

  digitalWrite(4, LOW);

  digitalWrite(5, HIGH); 

  delay(100); 

 

  digitalWrite(5, LOW);

  digitalWrite(6, HIGH); 

  delay(100); 

 

  digitalWrite(6, LOW);

}

 

nick

Servos will move a little

Servos will move a little when you apply voltage. This is normal.

If you want exact precise

If you want exact precise control, drop alot more for digital servos.

Power glitch?

It’s possible the servo is resetting the Arduino each time it attempts to move. 

It’s usually a good idea to try and isolate servos and other motors from controller power a little. I’ve used 2 battery packs, one for the controller and one for the servos, joining the ground wires for common reference… It is also possible to have a single battery pack provide power to a micro through a diode and capacitor set up, with the servos getting power directly from the battery pack (if it is within their reated voltage. 

Try adding a 10uf capacitor

Try adding a 10uf capacitor across the servo’s power leads, this may help.

i think i solved my

i think i solved my problem…

i added a diode at the 5v wire to the servo and it seems to work thankss