Description: Rechargeable lithium-ion (Li-ion) batteries are widely used today, powering devices such as laptops, tablets, cell phones, MP3 players, digital cameras, and various portable electronics. This application note examines the use of an LPC111x microcontroller (MCU) for charging these batteries, highlighting its capability to perform additional tasks simultaneously. The LPC111x family is built on a power-optimized Cortex-M0 core, offering high performance at a low cost. Li-ion batteries are favored for their high power density, excellent charge retention, and longer lifespan compared to nickel-cadmium (NiCd) batteries, which suffer from memory effect. Choosing the appropriate charging method can be complex, with options ranging from simple logic circuits to specialized power-management ICs or microcontrollers. In this application, the NXP LPC111x is employed for the charging function, which is capable of executing other housekeeping tasks concurrently. The LPC111x features up to 32 kB of flash memory and 4 kB of SRAM, with programmable flash memory and integrated peripherals including a 10-bit ADC, timers, SPI, I2C, and UART. The ADC is crucial for monitoring charging voltage and current, preventing overcharging, and ensuring battery safety and longevity. A 16-bit timer is utilized for PWM output to control a buck converter, while the internal RC oscillator allows for cost savings by eliminating the need for a crystal oscillator. The design employs a 48-pin LQFP package, but the code can fit into a smaller 20-pin LPC1110FD20. The charger requires minimal microcontroller resources, allowing for additional functionalities to be integrated into the project. The LPC111x controls an off-line Li-ion battery charger, using constant-current and constant-voltage methods for efficient charging, with LED indicators for status. The design incorporates a buck converter to manage the charging phases, including pre-charge, constant-current, and constant-voltage phases. An LDO regulates the supply voltage for the ADC reference, while ferrite beads provide additional filtering. The microcontroller operates at 48 MHz with PWM frequencies up to 192 kHz, enabling precise control of the buck converter. When the battery reaches full charge, excess energy is dissipated as heat, and temperature monitoring can be implemented if necessary. The complete design, along with schematics and software flowcharts, is detailed in application note AN11139.
The LPC111x microcontroller serves as a versatile platform for developing an efficient battery charging solution. The architecture allows for simultaneous execution of multiple tasks, enhancing overall system efficiency. The ability to utilize a buck converter for charging Li-ion batteries is a crucial aspect of the design, as it enables a tapered termination charge that optimizes the charging process. The buck converter's operation is characterized by its ability to efficiently regulate voltage and current, ensuring that the battery is charged safely without exceeding its maximum ratings.
The design's use of a PWM signal to control the buck converter's switch is particularly advantageous. By adjusting the PWM duty cycle, the on-time of the buck converter can be finely tuned to deliver the appropriate amount of current to the battery. This flexibility not only improves charging efficiency but also minimizes the size of passive components such as inductors and capacitors, leading to a more compact design.
In addition to the hardware components, the software aspect of the LPC111x-based charger is equally important. The microcontroller's firmware can be programmed to implement various charging algorithms, ensuring that the battery is charged according to its specific requirements. This adaptability makes the LPC111x an ideal choice for applications where battery management is critical.
Moreover, the integration of temperature monitoring within the design provides an additional layer of safety. While many Li-ion battery modules include built-in overcharging protection, implementing external temperature detection can further enhance the reliability of the charging system. This feature is particularly beneficial in applications where the battery may be subjected to varying environmental conditions.
Overall, the combination of the LPC111x microcontroller's capabilities, the efficient buck converter design, and the implementation of advanced charging algorithms make this solution a robust choice for managing Li-ion battery charging in a wide range of portable electronic devices. The detailed application note AN11139 serves as a comprehensive guide for engineers looking to implement this charging solution in their designs.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 microc
ontroller 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 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. 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 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. 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.
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! A growing number of applications, including VoIP, voice messaging, internet audio streaming, and audio books, involve the recording and playback of human speech.
To support these applications, we`ve developed source code and a sample application for running Speex, the open-source, royalty-free software codec for voice data. The sample application demonstrates playback and/or record functions, and can be used with the LPC175x and LPC176x microcontrollers, which are based on Cortex-M3 cores.
The sample application is also compatible with Keil MDK, IAR EWARM, and the LPCXpresso IDE. Click here to access AN11085: Using Speex in NXP`s LPC175x/6x MCU family Originally designed as a no-cost alternative to expensive speech codecs, Speex is a free audio compression format, designed specifically for speech and based on Code-Excited Linear Prediction (CELP), that compresses voice signals at bitrates ranging from 2 to 44 kb/s. The Speex format offers three features not found in similar codecs: intensity stereo encoding, integration of multiple sampling rates in the bitstream (embedded coding), and a variable bit rate (VBR) mode.
The result is a voice codec (vodec) format that delivers high-quality speech at a low bit rate. (For more on Speex, visit this site. ) The LPC175x/6x, which is built around a low-power Cortex-M3 core that operates at up to 120 MHz, is powerful enough and has sufficient SRAM to run the Speex codec without optimization. Adding some of the pre-processor functions in the Speex software library, such as reseampler and echo cancellation, can help boost the audio quality.
For our sample application, we started with a development board from Code Red Technologies that includes an LPC1768 and several hardware options for evaluating and testing LPC1768 features. One of the ICs integrated onto the board is an NXP UDA1380 I2S stereo codec, which includes sound processing features in playback mode, de-emphasis, volume, mute, bass boost, and treble.
The demo board also has an input for the ADC and an output for the DAC pins, allowing the application to integrate various working modes and merge the use of the converters and the I2S codec interface. Figure 1 gives a block diagram of the design. The design processes the audio signal, enhancing the bandpass related to the voice spectrum frequencies, then encodes, decodes, filters, and finally amplifies the signal.
The application software processes Speex data, capturing it from ADC or I2S and delivering it to DAC or I2S. The application supports use of ADC and DAC converters in case an I2S codec isn`t available. We programmed the application to perform two functions: record and playback. The record function uses a routine call to obtain the audio stream from the from the I2S or ADC input, encodes the stream, and then stores it in RAM.
The playback function loads a voice audio stream (previously stored in RAM), decodes it, and then delivers it to the I2S or DAC output. The application note AN11085 gives examples of three LPC175x6x evaluation boards the Code Red RDB1768v2, the Keil MCB1700, and the IAR LPC1768-SK that have been configured for the Speex demo.
The playback function is available on all three boards; the record function is only available with the Code Red and IAR boards. The application note gives a full description of the design, with codec settings, Speex parameters, and recommendations for using the libSpeex library.
It also gives flowcharts for the record and playback processes, as well as guidelines for the audio I/O and the user interface. Our application team has created the starting point for a Speex-equipped system, but the rest is up to you.
Let us know how you might use Speex in your next design!
It is assumed that individuals interested in constructing this circuit can interpret the schematics provided below. Basic principles: Note that lithium-ion batteries should not be discharged below 3V.
The circuit design focuses on the safe operation of lithium-ion batteries, particularly emphasizing...
This is a power motor controller circuit designed for 12V applications. It utilizes a microcontroller unit (MCU) for signal control, operating at a high voltage level of approximately 3V. The circuit allows for the motor to be controlled to move...
A boost converter, such as the TPS61160/1, can be utilized with a 40V rated integrated switch FET to drive multiple LEDs in series. This configuration can help reduce output ripple.
The TPS61160/1 is a highly efficient boost converter designed for LED...
The lithium-ion rechargeable battery charger described in the example operates using a constant voltage and current method. It is designed for charging 3.6V lithium-ion batteries commonly found in various mobile phones. The circuit's working principle involves a battery charger circuit,...
New cellular phones have incorporated high-resolution cameras that require bright illumination of the surrounding area to achieve high-quality pictures. Traditional xenon-filled photo flashes cannot be used due to the limited space available in cellular phone cameras. Instead, design engineers utilize...
Battery-powered devices, such as electric toothbrushes, shavers, cell phones, PDAs, MP3 players, and remote controls, are integral to daily life. Consequently, power management has become a critical consideration for embedded designers. Microcontrollers (MCUs) provide various methods for managing power requirements...
The microcontroller (MCU) is responsible for sending variable voltages over time, similar to a traditional Low-Frequency Oscillator (LFO), to an effect that can be modulated by voltage or a potentiometer on a conventional analog effect that can be replaced with...
The diagram illustrates a Lithium-ion (Li-ion) battery charger designed using the MAX1879 single chip. This charger offers a simple and cost-effective solution for charging single-cell Li+ batteries without generating heat. The MAX1879, when paired with an AC linear transformer adapter...
This is the first electronic circuit designed from scratch, marking the initial experience with programming a microcontroller (MCU), the first application written in assembly language, and the second homemade printed circuit board (PCB). While it is common for individuals to...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more