Go Down

Topic: servo works when connected with usb but not with 9v reg power supply (Read 1 time) previous topic - next topic

dadamssg

So i just bought this continuous rotation servo

http://www.frys.com/product/5230077?source=googleps&gclid=CJ2viqmr_bQCFUqoPAodPQsAGw

and i have this exact power supply

http://www.adafruit.com/products/63

When i transfer the sketch via usb to the arduino uno, it works when the uno is being powered by usb. When i connect the arduino to the power supply. It doesn't. It just hums a little bit but doesn't move at all. Does anyone know what's going on? do i need an external power supply for the servo? That doesn't seem to make much sense though.

Here's the sketch
Code: [Select]
#include <Servo.h>
Servo myServo;        // Create Servo object to control the servo

void setup() {
  myServo.attach(9);  // Servo is connected to digital pin 9
}

void loop() {
  myServo.writeMicroseconds(1700);  // Counter clockwise
  delay(2000);                      // Wait 2 seconds
  myServo.writeMicroseconds(1300);  // Clockwise
  delay(2000);
  myServo.writeMicroseconds(1500);  // Stop
  delay(2000);
}

johnwasser

Is your servo connected to +5V (Red), Gnd (Black) and Pin 9 (Yellow or White)?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

patduino

There are 10 types of people in the world, those that understand binary, and those that don't.

retrolefty

That is weird it should work with that power pack if it works on USB. You should probably try and measure the board's 5V pin when on USB and then when on external power pack and see if there is a difference.

As a general rule it's just never a good idea to power a servo from the arduino 5V pin no matter what the power source is. Servos should use their independent regulated +5vdc power source with the ground also wired to a arduino ground pin.

Lefty

dadamssg

what kind of power supply? i don't want to constantly be replacing batteries...

johnwasser


what kind of power supply? i don't want to constantly be replacing batteries...


6V and about 1A per servo.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

dadamssg

I'm very new to electronics so forgive me. Will getting a another 9v reg wall wart, cutting the ends and plugging those into a breadboard with a voltage regulator work and be the cheapest/best option? If so, how would i go about sharing the ground with the arduino? Would i just leave the ground cable from the wall wart unplugged and use a jumper from the breadboard to the ground on the arduino?

michinyon

You probably don't need another wall wart.   What I would try doing,  is taking another wire from the 9V of the supply to another regular to supply the servo power supply,   separately from using the 5V regulator chip on the arduino board.

dadamssg

I'm not sure i understand. The wall wart i have plugs straight into the barrel jack of the arduino. How would i get another wire from it?

retrolefty

#9
Jan 23, 2013, 05:24 pm Last Edit: Jan 23, 2013, 05:26 pm by retrolefty Reason: 1

I'm not sure i understand. The wall wart i have plugs straight into the barrel jack of the arduino. How would i get another wire from it?


The shield Vin pin is wired to the barrel jack's positive terminal (through a series polarity protection diode) so it's avalible for your use as a 'raw' 9vdc in your case using that 9v power module you showed. But keep in mind that your servo may still draw more current then the 9vdc module might be able to supply and in any event you can't draw more then 1 amp from the Vin pin because of the polarity protection diode which is rated for 1 amp maximum current.

Servos have motors in them, motors tend to draw lots of current depending on the mechanical load placed on them, so planning proper power management for servo(s) is not a slam dunk easy task sometimes.

Lefty


0AlphaOmega

Will the board run other sketches while using the 9V supply? e.g. run the LED on pin 13?
What voltage is actually being supplied? you need about 7.5V minimum.
If the current draw is too big for the supply, then the voltage may be collapsing too much and causing the Arduino to reset. Try adding a 100 to 1000 uf cap across the 9V supply as a ballast if the voltage is sagging.
For whom does the clock pulse? It pulses for you!

Go Up