App note from Texas Instruments about Li-Ion battery charger design. Link here (PDF)
A primary goal in the design of any portable electronic device is to make the product as small and lightweight as possible. When the device is powered by a rechargeable battery, a means of charging the battery from the AC line must be provided. Although battery charging is often thought of as a secondary function, the proper implementation of a charging system can ultimately determine the success of a product.
This paper will describe a 120VAC off-line charger that is based on a two series cell Lithium-Ion pack with a 1200mA hour capacity rating. The design described here can be modified to address different line and pack voltages. The paper will address the recommended charge algorithm for the pack, primary and secondary circuitry design, feedback loop compensation, and magnetic design for the converter.