A multi-tasking approach to battery refreshes: AN1139 Li-ion charger with the LPC111x

A multi-tasking approach to battery refreshes: AN1139 Li-ion charger with the LPC111x

Rechargeable lithium-ion (Li-ion) batteries are everywhere these days, powering everything from laptops and tablets to cell phones, MP3 players, digital cameras, and all sorts of portable electronics. But what’s the best way to charge them? This app note looks at using an LPC111x MCU to do the job, because this low-cost yet high-performance microcontroller can perform other “housekeeping” tasks at the same time. Click here to access AN11139 : Off-line Li-ion battery charger solution with the LPC111x family

Choosing a charging method
For some time now, rechargeable lithium-ion (Li-ion) batteries have been the power source of choice in a very wide range of portable electronics, and it’s easy to see why. They offer high power density, do a good job of holding a charge when not in use, and, unlike nickel-cadmium (NiCd) batteries, perform better over the longer term because they charge to their maximum energy capacity without suffering from “memory effect”.

The choice to use a Li-ion battery may seem obvious, but deciding how to charge the battery can be a bit more complicated. There are several different charging methods to consider, some involving simple logic parts, others involving special power-management ICs, or a microcontroller.

In the sample application described here, we use an NXP LPC111x for the charging function. Built around a power- and area-optimized Cortex-M0 core, the LPC111x is a low-cost yet high-performance option that is powerful enough to perform other “housekeeping” tasks while charging takes place.

Note: Li-ion batteries should never be subjected to over-charging as this can shorten battery life and cause a safety hazard.

A multi-tasking approach to charging
The low-cost Cortex-M0 LPC111x family is equipped with up to 32 kB of flash and up to 4 kB of SRAM. The flash memory can be programmed in-circuit. Members of the LPC111x family have 10-bit ADCs, four timers (two 32-bit and two 16-bit timers), and a host of other peripherals, including SPI, I2C, and a UART.

The 10-bit ADC provides superior accuracy for monitoring charging voltage and current. It plays a critical role in preventing the battery from overcharging, and ensures maximum effectiveness, safety, and battery life. The 16-bit timer is used for the PWM output of the buck converter, saving the 32-bit timers for other purposes. As the frequency of the PWM is not critical, the design can use the internal 12 MHz (±1 %) RC oscillator, saving the cost of a crystal. Our sample application uses a 48-pin LQFP package, but the code size is small enough to fit into a 20-pin LPC1110FD20.

The charger requires very few of the microcontroller’s resources (one PWM using a 16-bit timer, two or three channels of ADC, and the Systick timer), leaving sufficient bandwidth and peripherals for the addition of other functions and features to be added to the project. Having a battery charger that can also do other things creates a multi-tasking system that is more efficient and more compact, and with a lower bill of materials.

The sample application
The sample application uses the NPX LPC111x as the controller for an off-line Li-ion battery charger. The design ensures quick charging by alternating between constant-current and constant-voltage charging methods, and uses LEDs as status indicators. Figure 1 shows the block diagram and schematic.

Figure 1. LPC111x used as a multi-tasking Li-ion battery charger

A buck converter, which is a switching regulator that uses an inductor as the energy-storage device, is the most economical way to create a tapered termination charge. The sample design works with a buck converter and supports all the phases typically used when charging Li-ion batteries, including pre-charge, constant-current, constant-voltage, and the optional time constant-voltage phase.

The LDO connected to the LPC111x is used to regulate the supply (VDD) voltage, since the VDD is used as the reference voltage for the A/D converter and needs to be precise. For additional filtering of the LPC111x VDD, our design uses ferrite beads, but this may not be necessary in every application.

The LPC111x provides a PWM output for the buck converter switch control. When using the on-chip RC oscillator and PLL, the clock speed of the microcontroller is 48 MHz, and the PWM frequency can be set to 192 kHz. The buck converter’s “on” time is then adjusted by the PWM cycle. The duty cycle of the PWM has a resolution of 250 steps when operating at 192 kHz. The higher PWM frequency allows the use of smaller inductor and output capacitors.

When the battery is fully charged, any additional charge is converted into thermal energy. This can result in a temperature rise in the battery. In this case, the temperature monitoring function shown in the design can be added in. Many Li-ion battery modules have this over-charging protection function built-in, so the temperature detect function may not be needed.

Get all the details
The full design, including the complete schematic, timing diagrams, software flowchart, is described in the application note AN11139. Give it a look, and let us know what you think!

We are here to deliver the latest and greatest news to developers using our LPC families of microcontrollers. Follow @LPCZone on Twitter, Facebook, and LinkedIn ~ and you will have the most up-to-date information on the LPC product families.

Comments are closed.

Buy now