Arduino Nano + LiPo charger + 1S 3.7 240 MAh cell + charging from Nano's USB

Hello all

I started building a Fakebuino (Gamebuino = Atmega328 + Nokia 5110 LCD) for my friend last night, just throwing stuff I had laying about together. I decided to use a Arduino Nano as the core, because it already has the FT232 chip and the oscillators etc. Easier to start with.

But then I decided I'd have one of those TP (Tai ching power or something)-based Lipo chargers and a 240Mah 3.7V cell to give "mobile power". Unfortunately, I have already removed the USB connector on that little breakout, because I didn't need it in the earlier project. Example of such a charger here:
http://www.ebay.com/itm/5V-Mini-USB-1A-Lithium-Battery-Charging-Lipo-Charger-Module-for-Arduino-A866-/131304520047?pt=LH_DefaultDomain_0&hash=item1e925bf96f

... at which point the fact that I hadn't really thought out the whole thing started biting back

I'm trying to figure out, how to wire the Nano, the charger, and the battery in such a way, that I could charge the LiPo from the USB power in of the Nano.

I realize that there is a possibility to screw this up, and because I'm a coder, not an electronics guy, I decided to ask the wiser for a bit of advice before proceeding.

So. The plan:

  1. I hook up the charger input into the GND and +5 (pin 27) of the Nano. The battery will ofcourse be hooked to the output of the charger.

  2. I hook up the LiPo to the same pins to get power from the LiPo when USB power is not present ... but wait ... that can't be right, right ? I know the Nano WILL run with 3.7v from the LiPO, because that's how it works on the Gamebuino (yes, I know you're supposed to have 5V for 16Mhz). The problem is that won't I have (in this case) +5V across the LiPo terminals ? That'll surely damage the cell, unless I'm very mistaken

I think I need to hook up the LiPo in some other way so as to protect the cell from overvoltage. What should it be ? A diode or will I have to put in some sort of mosfet circuit to cut the connection back from the battery when USB +5v is present.

As you can see, I am grasping thin air here :wink:

No. Joking aside. Please enlighten me a bit if you know what could be the right approach.