Hello! Long time listener, first time caller...
I am transitioning a project from a workbench prototype to a self-contained, enclosed unit powered by a Li-Po battery. I intend to use Sparkfun's basic LiPo charger (LiPo Charger Basic, #PRT-10217, http://www.sparkfun.com/products/
10217) to avoid burning things down in the house. I'd like to be able to run the unit from the USB supply while the battery is charging and have it seamlessly transition to battery when USB power is removed.
Because of the peculiarities of LiPo batteries, I presume that I can't just tap into the battery leads. The current draw from the unit would confuse the charger and cause problems with the cell. The current draw is not insubstantial for a microcontroller project --it will power three Atmega328 chips (a DIY dual core Arduino and a Sparkfun OpenLog board), a GPS receiver, and a backlit LCD display.
After browsing the boards, the broader internet, and various datasheets, I came up with the attached circuit. It seems to simulate well on the online, Java-based circuit simulator (www.falstad.com/circuit
), but I've had issues with that simulator in the past. So I figured I'd tap into the collective braintrust that is Arduino. The thinking behind the design is that when USB power is present, USB powers the Arduinos directly, the MOSFET is off, which isolates the battery from the Arduinos and lets the charger do its thing. When USB power is removed, the MOSFET gate is pulled low by the pulldown resistor, which turns on the MOSFET and allows the battery to send current through the MOSFET into a step-up IC which steps it up to 5V and powers the Arduinos and the rest of my board(s).
Will this work? Does anyone have any ideas to make it work better and/or to simplify the circuit? Do I need all the diodes? In my mind, I do, but then again I'm a relative novice (or at least very rusty), especially when it comes to analog circuits. (Note: the diode between the battery and MOSFET is there because the simulator showed a tiny reverse current flowing through the MOSFET when USB power was present...something like 5-10 nanoamps, but I wouldn't want to confuse the LiPoly charger IC).
*Note -the area surrounded by the green box in the schematic is the original Sparkfun component, which remains unmodified except for tapping into the USB power bus. My questions pertain to the elements to the right of the box.
*Note2 - modified to correct some glaring mistakes in the circuit.