How does it work?
MCP73213 Click is based on the MCP73213, a dual-cell Li-Ion/Li-Polymer battery charge management controller with input overvoltage protection from Microchip. The charger integrates input overvoltage protection, pass transistor, current sense, and reverse discharge protection. It operates at constant current/constant voltage with thermal regulation. Four battery voltage charge options exist 8.2V, 8.4V, 8.7V, and 8.8V, with a resistance programmable fast charge current from 130mA up to 1100mA. Automatic recharge at 95% and preconditioning of deeply depleted cells at 10% are factory-set.
You can set the charging current over the MCP4161, a single SPI digital potentiometer with non-volatile memory from Microchip. It is a 10K, 8-bit device with 256 resistors and 257 wiper steps. The integrated EEPROM can store resistance data for the wiper position. The charge current limit is based on the die temperature during high-power or high-ambient conditions. The external power supply in a recommended range of battery voltage charge options (+0.3V) up to 13V can be connected to the VIN terminal. The batteries can be connected to the VOUT terminal.
MCP73213 uses a standard 3-Wire SPI serial interface of the MCP4161 to communicate with the host MCU supporting modes 0.0 and 1.1 and frequency of up to 10MHz. The status output of the battery charger is available over the STAT LED.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the 3V3 5V jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
Battery charger
Applications
Can be used for the development of Li-Ion/Li-Polymer battery chargers for portable devices and accessories, power tools, and more
On-board modules
MCP73213 – dual-cell Li-Ion/Li-Polymer battery charge management controller with input overvoltage protection from Microchip
Key Features
Integrated input overvoltage protection, pass transistor, current sense, reverse discharge protection, undervoltage lockout, wide range of battery charge voltage options, wide range of charging current, soft start, factory preset charge status output, and more
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on MCP73213 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | STAT | – | Status Output LED Indicator |
LD2 | PWR | – | Power LED Indicator |
JP1 | 3V3 5V | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
MCP73213 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
External Power Supply | 4.2 | – | 13 | V |
Battery Charge Voltage Options | 8.2 | – | 8.8 | V |
Charge Current | 130 | – | 1100 | mA |
Software Support
We provide a library for the MCP73213 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for MCP73213 Click driver.
Key functions
-
Set values for output current function
-
Get the status register data function
-
Convert ADC value to volatage
Example Description
This application is polymer battery charge management controller.
void application_task ( void )
{
log_printf( &logger, "---------------------- rn" );
log_printf( &logger, " 10 kOhm - 130 mA rn" );
mcp73213_set_current_output( &mcp73213, MCP73213_OUTPUT_130_mA );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "---------------------- rn" );
log_printf( &logger, " 5 kOhm - 250 mA rn" );
mcp73213_set_current_output( &mcp73213, MCP73213_OUTPUT_250_mA );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Mcp73213
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.