2

I am making a robot with arduino mega r3. I want to power the arduino with a usb power bank. How should I do that?

  • 8
    Did you try plugging it in? – Ignacio Vazquez-Abrams Mar 6 '15 at 17:24
  • Plug USB power bank output into Arduino USB port. Done. [BUT see madanon's comment re the need to dra a minimum current level in some cases to keep powerbank output alive]. – Russell McMahon Mar 7 '15 at 6:05
  • I know that I am not supposed to post this, but @IgnacioVazquez-Abrams, thank you sir. I love your sense of humor :D – dhimaspw Nov 14 '16 at 12:33
6

I have a "USB power bank" with two USB ports, which I use to power some projects.

I have discovered that my bank (i.e. your mileage may vary!) shuts off unless my project draws at least 50mA. If your project does draw at least that at ALL times, you should just be able to plug a USB cable directly from the powerbank to the project.

For some other projects, I have bought a USB cable (USB A to USB A) which I cut in half, stripped the wires, then used a multimeter set to "Volts" to work out which wire was +5V and which was GND; I connect these straight to the 5V/GND on my project. To make sure at least 50mA was drawn at all times, I put a 100 Ohm resistor from +5V to GND (at LEAST 1/4 watt!!). This obviously wastes a lot of power (turning it into 1/4 watt of heat), but it keeps the power bank "awake". By using a USB A to USB A, I now have two cables.

My power bank also has a "torch" (led) integrated; if the torch is on, it also stays awake.

  • 2
    +1 Quantification if minimum current requirement is useful. – Russell McMahon Mar 7 '15 at 6:06
  • Thanks! This solved my problem. I tried powering an arduino with a power bank and it kept shutting down every X seconds, unless I turned on the LED on the power bank. In that case it continued working until the led went out. Now I know why :) – Joris Mans Jul 25 '16 at 19:23
  • @RussellMcMahon, the 50mA figure is probably not useful, as it will vary from model to model. Gives an idea though :) – AMADANON Inc. Jul 26 '16 at 4:10
1

Powerbank is a term for those external batteries that output USB. Usually used to recharge a phone when you don't have access to wall outlet and USB charger.

Inside powerbank:
Battery (3.7v) --- Some Circuit --- USB female

How to:
You have a bank
You have USB cable
ugh! ...
Plug USB to Arduino and you are (pretty much) done.

For those who use ProMini and/or want to skip the USB port
Cut the USB cable and take the red (+) and black (-).

Put it directly to Vin and Gnd and you are good to go.

*

Unfortunately for us (fortunately for most) most Powerbank has auto-shutoff where it will shut off the power if there's no load (usually ~50mA, vary with every brand). Since Arduino may not draw that much, the battery thinks it is not connected to anything.. thus it will auto-shutoff after a while

I found this trick helps (a lot!! thank you!):
https://www.dorkbotpdx.org/blog/paul/battery_pack_load

0

Not clear what a usb power bank is. I assume you actually have a battery, perhaps with a regulator. The data sheet http://www.arduino.cc/en/Main/arduinoBoardMega at says: Microcontroller ATmega1280 Operating Voltage 5V Input Voltage (recommended) 7-12V Input Voltage (limits) 6-20V Digital I/O Pins 54 (of which 15 provide PWM output) Analog Input Pins 16 DC Current per I/O Pin 40 mA DC Current for 3.3V Pin 50 mA

also

The Arduino Mega can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

If you use the usb connector, use the correct pins an make sure you have it regulated to 5 volts.

I think this answers the question, if not please comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.