Using Arduino (Nano v3.0) 5v to charge Li-Ion battery pack.

I've got a project using an Arduino Nano v3.0 (ATmega328) to control a WS2811 RGB LED strip (programmable strip using a single wire data/clock). The LED strip is powered by 3 Li-Ion batteries (2400mAh 18650s) in parallel and a Tenergy 32003 for charging it. I'd like to have just a single USB connection to both program the Arduino and charge the batter pack. Is it feasible to use the +5v pin on the Nano to charge the battery pack while the USB cord is plugged in?

Assuming the answer is yes, my biggest concern is where the 5v gets its power from. I found a schematic where it looks like the +5v pin is powered from either Vin (through an LM2940 1A LDO), or from USB (through a MBR0520 .5A diode). So powering via USB might limit my charging capability to only .5A (less the draw for the uC?). Obviously only .5A if charging via computer USB port, but ideally I'd want to use a 1A wall-wart to charge faster. Not a big problem, but with ~8Ah battery pack, it could take most of a day to fully charge. However, I might end up switching to 10440 batteries due to space restrictions. If that's the case, they only have ~500mAh each, so charging would only be ~3 hrs.

I've attached two basic circuit diagrams. The first (WS2811-ext) is how 'I think' the circuit would look if using an external power source, and the 2nd (WS2811-nano) is what I think I'd need to do if powering via +5v. The Tenergy 32003 has 3 pads: B+/P+ (Battery+/Charger+), P- (Charger-), and B- (Battery -). In the 2nd schematic I switched to a DPDT switch, so when it's ON the battery pack powers the Nano and LED strip, and when OFF (and USB is plugged in), +5V is routed to B+/P+ and battery pack +, Nano GND to P-, and battery pack - to B-. I don't know if this is necessary, but thought it an added precaution.

As I said, Ideally I just want to use a single USB connection to both program and charge, and if possible have the capability of charging with more than .5A. So other, likely better, suggestions are welcome and greatly appreciated!

Here's some links for reference (and if you can't open the images):
WS2811-ext: Electronics - Album on Imgur
WS2811-nano: Electronics - Album on Imgur
Tenergy 32003: Tenergy 32003 Protection Circuit Module | Li-ion & Li-polymer Batteries
Nano Schematic: http://malylubo.sk/wp-content/uploads/2013/01/Arduino_Nano_Schematic-1024x676.png

With that kind of current, your charging current shouldn't pass-through the Arduino board. So something like your "external" setup is better.

You also can't rely on the current limiting of USB or your wall wart. If you hook-up dead batteries to USB or a 1A wall wart through that Tenergy board, it will try to "pull" 8 Amps. Best case, the power suply (or USB port) is going to shut-down. Worst case, you'll kill your power supply (or USB port). You'll need a bigger charger or a different current limiting scheme.

3 batteries in parallel can be a problem too. It may "work", but they will charge/discharge at slightly different rates, and youi can get into a situation where a stronger battery is charging a weaker (or leaky) battery. I think a pair of diodes on each battery (one for charge and one for discharge) would take care of that, but I've never done it and I haven't really thought it out or analyzed the concept.

DVDdoug:
With that kind of current, your charging current shouldn't pass-through the Arduino board. So something like your "external" setup is better.

True, it's better for high current charging, but I really need to combine the USB port into dual purpose somehow. I don't have a lot of leeway for adding a charging port. It also wouldn't have to route directly through the Nano either, it's just the simplest option I thought of. Perhaps if I just split USB V+/GND and ran it directly to the charging board?

You also can't rely on the current limiting of USB or your wall wart. If you hook-up dead batteries to USB or a 1A wall wart through that Tenergy board, it will try to "pull" 8 Amps. Best case, the power supply (or USB port) is going to shut-down. Worst case, you'll kill your power supply (or USB port). You'll need a bigger charger or a different current limiting scheme.

I'm using the 32003 based on some similar projects that utilized it for a 3-battery Li-ion pack too, so I feel safe it'll work with a parallel battery pack. Unfortunately there's not a datasheet (that I could find) for the 32003, but it was my 'assumption' that it doesn't pull current. Tenergy's website says a continuous working current of 8A, so I'm guessing that means it can regularly maintain 8A, either charging or discharging, similar to say a MOSFET's continuous drain current. Prior to installing I am going to ensure all 3 batteries are fully charged and they have built-in over/under charge protection too.

3 batteries in parallel can be a problem too. It may "work", but they will charge/discharge at slightly different rates, and youi can get into a situation where a stronger battery is charging a weaker (or leaky) battery. I think a pair of diodes on each battery (one for charge and one for discharge) would take care of that, but I've never done it and I haven't really thought it out or analyzed the concept.

idk if a pair of diodes would actually be a good idea though since it wouldn't allow them to fully equalize, only in one direction. It also helps when charging so if one is having a more difficult time taking a charge, the other two will help "move it along"...as long as you're not trying to charge it too quickly.
I've considered this before, but I think that's just the risk you take with any battery packs. I'm sure there's a way to monitor each individually during charge, but that still wouldn't safeguard against a stronger battery constantly charging a weaker. If they start to crap out, it's also an application I can [semi] easily replace them. I assume after a few years I'll need to anyway...if it's still even in use :slight_smile: