loading

external power supply for arduino/ driving motors?

I need to use an external dc power supply for arduino. I have the male jack for the power jack on the arduino (that is what the black round jack next to the usb jack on arduino uno is right?) but, given the power supply from the usb is 5v, should I use 4.5v or could I use 6v? I also need to run two 1.5-3v motors on it. I read that because the arduino digital pins have a total output of about 20 ma, and if you plug something larger into it, it could fry the processor, and that you should use mosfet transistors to connect the larger items. but could you just use  NPN transistors rather than the mosfet transistors? 

sort by: active | newest | oldest
jrh0655 years ago
Ok, part one.

You can put anywhere from 6-20 volts into that power jack. The Arduino has a regulator to pull it to five volts, however it is suggested that you keep it between 7-12 volts so you don't strain the voltage regulator(at least I guess that's why).

As far as the pins and the amperage. You will not be able to run motors directly off of a pin as you've stated, so you'll need transistors. I would look into an H-bridge. They're wonderful things with lots of transistors and sometimes flyback diodes, and they're designed in a way that lets you isolate power easily.

Yes, NPN transistors should be fine if you use them correctly, and they can handle the voltage and power you're sending through them. Make sure you are actually running around three volts into those motors or they'll go up in smoke in no time.
Higgs Boson (author)  jrh0655 years ago
Thank you for the fast response. Would any NPN transistor work? or would it need to have a specific Ic max and stuff?
Ic max should be 1.5-2x the I of the motor for safety fudge factor; really you can use 1x the Ic and it shouldn't be too bad but the pulse when the motor starts and stops may cause damage.

Definitely go as jrh says with 7+ volts input on the arduino, with a SEPARATE regulator for the motors or big resistors to drop the 7volts down to not destroy the motors.
Higgs Boson (author)  frollard5 years ago
Thank you.
Higgs Boson (author)  Higgs Boson5 years ago
so you would connect the base of the transistor to the output pin, and then connect the collector to the motor and the emitter to ground?
You can muck around with transistors to create an HBridge but I say go for the easier option, use an HBridge IC like L293D or SN754410. There are many
tutorials on the net on how to control a motor with an external power supply (external to the arduino) with L293D.

For the power options, I also have that dilemma, arduino needs 7-12 volts but
my motors need 3 volts only.

There are several options -

1. Use 3.7 V LiPo, use it to power your motor directly, and boost-regulate it to 5V and inject it directly to the 5V line of the arduino.

2. Use two power source, a 9V battery to power the arduino through the DC barrel jack and another 3V battery to power your motor.

In all these cases, never use arduino power to power your motor. Always have a separate, external power for your motor.
Higgs Boson (author)  emantos5 years ago
Okay. Thank you for your help.
Higgs Boson (author)  Higgs Boson5 years ago
would that be a pretty common IC, or would I probably need to order it?
Both of those are very common, but if you're like me you're stuck somewhere that doesn't have an electronics store worth anything. You'll likely have to order them, and I would suggest getting extras.

I've got some 3v motors, and I found that together they draw a pretty large current, so I used one SN754410 per motor.

I also suggest using LiPo batteries for the motors if you need portability.
jrh065 frollard5 years ago
Keep in mind the the transistor needs to handle the amperage(I) of the motor when it is stalling since it will be highest then. And then plus some for safety like Frollard said.
...and the rest...I'd shoot for 10X.
vek114 years ago
What if you just use a motor shield?
Higgs Boson (author)  vek114 years ago
That's actually what I ended up doing. It made programming easier, and worked better then my diy H-bridge, but was almost double the cost.
mjm20085 years ago
I have a master degree project and I discovered that if you power up the Arduino with USB Cable or with a power less than 7.5 Volt the regulator will fail in giving 5 Volts to the ATMEGA chip. This is a kind of bad design or bad component they used in regulating the input power source.
It is bad design since the 5 volt from the computer or from the USB port is not trusted and they took it to the regulator. And bad components as the regulator is not passing 5 volt when it is really 5 volts.
Using 5 Volt, or USB cable will give only 3.4 volts to the ATMEGA chip. This means that the ATMEGA is not getting the standard power which is 5 Volts. When the Power Source for the ATMEGA is 3.4, all I/O pulses will be based on that.. This could make problem for devices that expect 5 volts and is sensitive to have the level more than 4 volts.

When the power supply is not enough to be regulated by the regulator, I expect that none of the output voltage on the board will be able to give the desired current and voltage. That is why many people face tooooooooo much trouble when they power up their XBee modules using Arduino itself and they think that the input power to the Arduino is 5 Volt.
So, please use a voltage source that is more than 7.5 and less or equal to 12 with at least 500 mA.
I hope that I answered the question
Higgs Boson (author)  mjm20085 years ago
I'm working on version 2.0 now, and I am using a motor shield with the 298 as a h bridge, so I kind of needed higher voltage that 5v, and over 500ma. In fact I am using an rc car battery which is 9.6v, and 1600mah.