Smart Lipo charging

How can I make a Lipo charger? I have little arduino experience but I am learning.

The basic needs:

Lipo battery will charge when plugged in to DC power source (transformed from AC power socket). The load (lets say a LED array) will take current from the DC power source instead of the battery while plugged in.

When unplugged, the LED array will take current from the Lipo battery until it is 20% or so which it will then turn off.

When plugged in again, the LED array will take current from the DC power source and the battery will charge etc.

When the battery is full, there should be a shut off of some sort to prevent overcharging. The LED array will however, continue to take current from the DC power source converted from the AC power point (not the battery).

How can I make this work? And how can I do this?

I understand that charging lipo batteries are dangerous if the wrong steps are taken. I am not sure how much current my load will draw yet (I will know in a few months). Thus, I am not sure of my battery yet.

Apologies for the lack of knowledge/bluntness in this topic, I am very new to arduino. I am receiving my first Arduino Uno in a week or so and I am very excited to experiment with it!

Any guidance on this mini project would be greatly appreciated. None of my friends have any experience with Arduino which is why I am asking for assistance here.

chairr:
How can I make a Lipo charger? I have little arduino experience but I am learning.

The basic needs:

I understand that charging lipo batteries are dangerous if the wrong steps are taken. I am not sure how much current my load will draw yet (I will know in a few months). Thus, I am not sure of my battery yet.

You need to be sure about your battery needs first.
Lipos are useful for their high power to weight ratio primarily in aircraft.
They can also be useful where size and portability are required.
They are expensive, do you need one, lead acid are cheaper.
What voltage do you need .
Single cell lip[os can be charged easily, multi cell packs are where it gets complex.

Voltage is quite low. It's in the 3-5v range. I have chosen lipo due to the light weight, which is needed for this project. Capacity does not matter, although larger is preferred.

chairr:
Capacity does not matter, although larger is preferred.

Capacity dictates how long your circuit will function depending on load.

Leds can be a significant drain in themselves.
You should size the capacity according to your application.
An arduino can be powered off a single lipo but you may have to bypass the regulator.

This may interest

Lipos are normally charged in 2 phases.

1 - constant voltage until a set voltage is reached
2 - constant (low) current until the final fully charged voltage is reached.

Be very careful when charging lipos of any size as treating them badly by overcharging can cause a fire (rare but possible) and discharging them too low will make them deteriorate and not hold charge as will storing them fully or nearly fully charged.

True but its possible to do simply with a current limiting resistor and a zener shunt.
Just will not charge very fast.

edit
2 resistors

Boardburner2:
True but its possible to do simply with a current limiting resistor and a zener shunt.
Just will not charge very fast.

edit
2 resistors

What would happen when the Lipo is fully charged though?

The Microchip MCP73871 suits your requirements. See the datasheet: http://www.adafruit.com/datasheets/MCP73871.pdf

On page 15 read paragraph 3.2 as it outlines how the chip prioritises the system load (LEDS in your case) over battery charging although it can do both at once if there is enough current.

As it is a small surface mount device you may want to buy a breakout board such as this:

Don't let the solar charger description put you off. All you do is replace the solar panel with an AC plugpack and you will get better performance.

It will charge your battery safely (they explode in flames if you don't get it right), accurately and get the maximum number of recharges out of your batteries. Your battery will need a protection circuit in it to prevent over discharge but most already have them embedded anyway. Just check.

Only certain coloured LEDS will run of the voltage supplied by a LiPo. You can add something like this to the above: LiPower - Boost Converter - PRT-10255 - SparkFun Electronics to boost it to 5 volts that will power most LEDS and provide you with low voltage cut-out protection at the same time (removing the need for the protection circuit mentioned in the paragraph above).

chairr:
What would happen when the Lipo is fully charged though?

Thats the purpose of the zener it shunts the current when the voltage is reached.

Akin to a solar panel regulator used with LA batteries.

lemming:
USB / DC / Solar Lithium Ion/Polymer charger [Rev C] : ID 390 : Adafruit Industries, Unique & fun DIY electronics and kits

Don't let the solar charger description put you off. All you do is replace the solar panel with an AC plugpack and you will get better performance.

something worth mentioning.

Lipos do not like sitting there at full charge doing nothing.
They need to be cycled.

So for an application such as standby or occasional use they are a poor choice.
They can be used by keeping them at half charge however.

All the units i have seen use a full charge.

For a beginner, a LiFePO4 battery is far less likely to burn your house down and it has similar charging characteristics to a lipo battery (with a slighly lower power density)

Whatever you use, consider building a fireproof enclosure using house bricks, sand and a fire blanket.