I made a simple device using a servo and an arduino uno. I wanted to simply power it through a wall outlet. I once made a project with a professor and he simply plugged in a 5v plug to it and the wall. Well when I do it everything works perfectly except when the servo is supposed to be off. Sometimes it runs very slowly and sometimes it stays off like its suppose to. The project works perfect when plugged in via USB to computer. So to me it seems obvious that the issue is with plugging it in to the wall. Thanks for the help
Use a separate supply for the servo, rated at 1A minimum - a USB supply is not suitable.
MarkT:
Use a separate supply for the servo, rated at 1A minimum - a USB supply is not suitable.
MarkT:
Use a separate supply for the servo, rated at 1A minimum - a USB supply is not suitable.
I guess I just don't understand why the device worked perfectly fine while attached to a USB to my PC but acts funny when plugged into the standard wall outlet.
Am I reading this correctly: sometimes the servo moves when it's not supposed to?
It's time to post your code and a schematic I reckon.
You need to make sure you have a common ground connected between the new servo power supply ground and the arduino ground similar to below.
zoomkat:
You need to make sure you have a common ground connected between the new servo power supply ground and the arduino ground similar to below.
Hey zk, I wonder how many times you've posted that particular sentiment along with your well known schematic?
Hi, zoomkat, trademark or copywrite that file.
Tom.....
Generally servo issues almost always go back to the big two, power supply and grounding. JimboZA has the slick multi servo pix. Pix make for quick explanation instead of typing.
As everyone has already said, Always have a 2ndary +5V supply for the servos. I've been powering most of my quick assemble projects with a modified ATX supply (Several sources on how).. Usually, I'll put a 7809 (yes, a +9V regulator) to the barrel power connector on the Arduino, and a wire from the +5V from the supply to anything requiring 5V.. (I.E. Servos, low-voltage stepper motors, etc.) If running from a single voltage wall-wart, if you can draw a second connection from the supply, to a 7805's input, and GND pins, and a separate rail for the +5 output from the regulator.. NEVER, draw more than 1-Amp from the +5V pin of the Arduino, and likewise, NEVER draw ANY +9V from the Vin pin of the arduino either! I've gone as far, as with a few robotics projects, assembling a 7809 & 7805 onto a single heat sink, and feeding the 7805's input pin from the output of the 7809.
I accidentally shorted the Vin pin on one arduino, to GND, and it wasn't pretty.. Now, if you look under the board, You'll see a soldered wire across the trace that fried.. Did likewise rebuilding an Adafruit Version-1.0 Protoboard, which cooked both GND pins, and the trace going from the far-end (from power & USB) GND rail, back to the GND pin on the A13-9 rail.
The traces are thin, and sensitive.. so as always, be careful!