3

I have a powerbank rated 5v. The battery is actually 3.6v, powering the built-in SMPS to give out 5v. I have stripped one end of the USB cable coming from the power bank, powering a motor driver and the Arduino in parallel. The positive end of the power bank, which is 5v, is going into the Arduino and the motor driver IC's Vcc.

I heard that 5v is not enough to drive the Arduino from the Vin pin. And there is only one power out from the powerbank, so directly connecting the Arduino through the USB would leave nothing to drive the motor driver IC.

A USB splitter would be the obvious solution, but is there anything else I can do? The power source has to be mobile. Can I power the Arduino through the Vin with those 9v batteries commonly used in electronics hobby projects?

dda
  • 1,588
  • 1
  • 12
  • 17
  • "I heard that 5v is not enough to drive the arduino from the Vin pin." Where did you hear that? – longneck Dec 30 '16 at 18:15
  • from another answer on stackexchange.someone quoted from the arduino website that Vin requires 7v to 12v –  Dec 30 '16 at 18:16
  • 1
    You want to be careful, depending on the model Arduino has a voltage regulator or hasn't. I can never remember what the exact pin names are ... But one that comes with a voltage regulator also has a pin for 5V ... or 3V3 ... You really want to read the documentation that comes with your exact model. – jippie Dec 30 '16 at 18:28
  • Its a uno. Yes there is a volatge regulator and yes 3v and 5v pins are also there. So are you saying I should power the arduino through the 5v pin and not the Vin? Isn't the 5v pin meant to draw power and not feed power into the arduino?? –  Dec 30 '16 at 18:32
  • Read the data sheet for the arduino, don't expect others to wipe your bottom and smile with a perfect answer for you. Do some research. Dig a bit deeper. Questions like this are quite often closed when talking about uses of "electronic devices". Questions like this are often closed due to lack of research on the questioner's part also. –  Dec 30 '16 at 18:40
  • Can't recall the first one to come up with the sentence: Arduino is the brains, not a power plant. – jippie Dec 30 '16 at 18:43
  • 1
    @Andyaka How do you know I haven't done any research.I have seen you in many answers in Andy.Although your knowledge base is poor you are very good at insulting people –  Dec 30 '16 at 18:54
  • @Andyaka You are always on the hunt for easy questions.And whenever after reading a question you find that you don't know the answer you just write something insulting to protect your ego.Learn to accept defeat. –  Dec 30 '16 at 18:58
  • What it wrong with connecting it straight to the 5v pin? Even better, why not connect to the, say, usb port on the arduino? Just connect it to the usb port, and connect the motor to the 5v pin of the arduino. – Gerben Dec 30 '16 at 20:06
  • @Jippie - you are simply wrong here. The Vin pin is the input to the regulator, something the poster was well and accurately aware of before you wasted a bunch of comments disputing that. Frankly they are quite justified in being annoyed by your behavior! – Chris Stratton Dec 31 '16 at 08:25
  • The solutions can be 1) plug the arduino USB cable and then use the +5V pin to power the motor (if the motor needs a low current, since you can source at most 400-450mA this way) 2) power the arduino from the +5V pin (and put a capacitor on it, but note that you are bypassing the fuse this way) 3) strip a USB cable, attach the motor to the two power wires and make a Y cable yourself. – frarugi87 Jan 04 '17 at 09:34

3 Answers3

6

You have a powerbank which has a USB output, right? Why not just plug a cable from that into the Arduino USB port? That will connect the 5V directly into the 5V pin of the Arduino (probably via a switching MOSFET). Then you can connect to your motor driver from the 5V pin on the Arduino (and Gnd of course). There may be some limitations on how large a motor you can drive (based on the capacity of the power bank, and to an extent also the thickness of the traces on the Arduino board).

As others have commented, Vin is not intended for that purpose (ie. to supply 5V). You should supply 7V or more to Vin to force the switching MOSFET to disconnect the USB input. In your case you don't have 7V from the powerbank.


Here is how the Uno Rev3 power system works:

Uno power switching

The input jack (circled in blue) goes through a diode (D1) to the Vin line.

Vin then goes through the 5V voltage regulator (U1) to provide +5V.

However on the top left you see 2 x 10K resistors (RN1A and RN1B) which make a voltage divider from Vin to Gnd. This is compared to the output of the 3.3V voltage regulator by U5A op-amp (circled in red). If higher, then T1 (circled in green) will turn off, disconnecting USBVCC from the +5V line. If lower, then USBVCC is connected to +5V. The nett effect is that if Vin in greater than 6.6V (because of the voltage divider) then the circuit chooses to use Vin, otherwises it uses USBVCC (USB power).

That's why they recommend to use 7V or more into Vin.

Note that you lose around 0.7V through the diode, which is why you need something like 7.3V at the input jack to allow for the loss of the 0.7V before the op-amp compares it to 6.6V.

Nick Gammon
  • 38,184
  • 13
  • 65
  • 124
  • the loads on the motor driver are too heavy to be powered from the arduino. – Bodhisattya Dutta Dec 31 '16 at 11:20
  • What are those loads (in mA)? The powerbank might not be able to provide it either. – Nick Gammon Dec 31 '16 at 21:04
  • about 1 amp each,2 motors.although the power bank may not be able to fulfil the required power but the powerbank's smps will protect the battery...on the other hand if i do the same with the 5v arduino pin it will straight away damage it (from drawing too much current)..am I right? – Bodhisattya Dutta Jan 01 '17 at 13:22
1

I had this problem last year when I needed to power a prototype using a LiPo battery which supplies only 3,2 up to 3,7V (and up to 4,2V when charging).

My way of solving the problem was to use a voltage boost module. Boost circuits are a kind of circuit where you the inertial properties of passive components to elevate (or attenuate) DC voltage levels.

But you don't need to worry about the math behind use, there is modules like the MT3608 which will supply your circuit up to 28V starting from as little 2V, check the datasheet.

0

That is true, you can't power the Arduino with 5V from VIn.

If you have a constant 5V and you are confident that no major spikes are going to happen, then you might as well connect it to the Arduino's 5V pin.

Other wise, you need at least 7V power the Arduino from the VIn pin. Some say you can put in 6V, but that is just from test. The 7V is more reliable. Thus, you can power the Arduino with a 9V battery is you wish.

Dat Ha
  • 2,913
  • 6
  • 23
  • 45