Is Servo Faulty?

So I recently got my first arduino, an Uno Rev 3, for one of my first project I had hoped to make a robotic arm. I bought a micro servo and a standard 4.8v-6.0v servo. I connected the standard servo to my arduino’s 9 pin with a 100 ohm resistor in between, and it was connected to an external power supply.

All of this so far I did through online tutorials.

Now here is where my problems come in. My microservo works perfectly fine it is connected to the arduino’s 5v connection and still using the 100ohm resistor to 9pin. Using the code below I tried to step my servo from 0-160 degrees and the microservo handled this action perfectly fine. However the standard servo when the pos variable reached about 70-90 it would rotate back and forth from 0-160.

Am I doing something stupidly wrong or is this servo likely broken?

Could it be that the power is to high for the servo? since the supply i’m using is set up for 4?

I’d appreciate and constructive advice.

Servo_test.ino (637 Bytes)

Sorry code was in attachment here it is.

#include <Servo.h> 
Servo myservo;  // 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() 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
  int pos;
void loop() 
 for(pos = 0; pos <= 160; pos += 10)

Never power a servo from the Arduino 5V supply....

Also make sure the supply you do use can provide enough current (1A per servo is a rough rule of thumb). Common grounds.

Here’s the schematic to go with what MarkT just said.

servo power.png

JimboZA: Here's the schematic to go with what MarkT just said.

Have I seen that schematic before, well only about once a day... When will they learn??

@DrLamb your code looks OK! But the full size servo just needs more power.

BTW instructables are full of poor practices and ideas, anyone can write them?? I have given this answer twice today.

Get back to us, let us know how it goes.