AN13095 Smart Battery Charger by LPC845 with SMBus Interface Rev. 0 January 5, 2021 Application Note by: NXP Semiconductors Contents 1 Introduction 1 Introduction......................................1 2 Overview......................................... 2 Batteries are used everywhere, such as smart phones, notebook computers, 2.1 Function block diagram................2 wearable devices, handheld electronic products, smart small appliances, etc. 2.2 System diagram...........................2 Users always want to know the battery temperature, voltage, current, capacity, 3 Hardware.........................................3 how long it can be fully charged, and how long the battery will be exhausted. 3.1 Hardware overview...................... 3 During the charging process, it is very important to ensure the safety of battery 3.2 System connection.......................5 charging and provide a smooth and controllable charging curve. The above 3.3 Charger board..............................6 requirements are expected to be realized by a smart charger. A smart charging 3.4 Smart battery............................... 7 solution implemented with LPC845 is recommended. 3.5 LCD display board....................... 7 3.6 Emulator.......................................8 Based on the Arm Cortex -M0+ core, LPC84x is a low-cost, 32-bit MCU family 3.7 AC adaptor...................................8 operating at frequencies of up to 30 MHz. The LPC84x MCU family supports up 4 Software.......................................... 8 to 64 KB of flash memory and 16 KB of SRAM. This family features exceptional 4.1 Source code.................................9 power efficiency in the low-current mode using the FRO as the clock source. 4.2 Program flow chart.....................10 The peripheral complement of the LPC84x MCU family includes: 4.3 PWM generation........................ 11 4.4 SMbus communication...............12 One CRC engine 4.5 Temperature sample..................13 4.6 Cycle interrupt............................13 Four I2C-bus interfaces 4.7 LCD driver..................................14 Up to five UARTs 4.8 FreeMASTER.............................14 5 Step-by-step demo........................16 Up to two SPI interfaces 6 Charging timing and specifications One multi-rate timer ...................................................... 17 A Schematic......................................18 Self-wake-up timer SCTimer/PWM One general purpose 32-bit counter/timer One DMA One 12-bit ADC Two 10-bit DACs One analog comparator Function-configurable I/O ports through a switch matrix One input pattern match engine Up to 54 general-purpose I/O pinsNXP Semiconductors Overview 2 Overview 2.1 Function block diagram Figure 1. Function block diagram LPC845 periodically communicates with smart battery through SMBUS bus to obtain battery information and dynamically controls PWM output to adjust charging voltage. At the same time, the charging status is displayed through LEDs and the charging information is displayed through the LCD screen. 2.2 System diagram Figure 2 shows the system diagram, including NXP LPC845 battery charger board, +12 Adapter, smart batter, LCD, and emulator. Smart Battery Charger by LPC845 with SMBus Interface, Rev. 0, January 5, 2021 Application Note 2 / 19