PowerBank Click-Platine
PowerBank Click-Platine
Overview
Das PowerBank Click Board™ ist eine USB-Ladeerweiterungskarte, die zum Erstellen von Powerbank-Geräten oder zum Hinzufügen einer Ladeoption zu Ihrem Gerät verwendet werden kann. Zur Verwaltung des Batterieladevorgangs verwendet diese Karte MP2632B, ein hochintegriertes 3A-Lu-Ionen- und Li-Polymer-Batterieladegerät von Microchip. Neben dem Batterieladegerät verfügt PowerBank Click auch über einen MCP3221-Analog-Digital-Wandler, der zur Überwachung der Batteriespannung über die I2C-Schnittstelle dient. Neben Batterielade- und Überwachungsfunktionen verfügt diese Karte auch über eine Betriebssektionstaste sowie Benachrichtigungs-LEDs zur Auswahl des Betriebsmodus und des Batteriestatus. Powerbanks sind beliebt zum Laden von über USB aufladbaren Geräten und können als Stromversorgung für verschiedene über USB mit Strom versorgte Geräte wie Lampen und kleine Ventilatoren verwendet werden.
Der PowerBank Click Board™ wird von einer mikroSDK-kompatiblen Bibliothek unterstützt, die Funktionen enthält, die die Softwareentwicklung vereinfachen. Dieses Click Board™ wird als vollständig getestetes Produkt geliefert und ist bereit für den Einsatz auf einem System, das mit der mikroBUS™-Buchse ausgestattet ist.
How Does The PowerBank Click Board™ Work?
The PowerBank Click Board™ can supply power from the connected battery through a USB port as well as charge the battery. The MP2632B can operate in both charge mode and boost mode to allow for full-system and battery-power management. It has an integrated VIN-to-SYS pass-through path to pass the input voltage to the system. The pass-through path has built-in over-voltage (OVP) and over-current protection (OCP) and a higher priority over the charging path.
This board can also re-charge connected battery from microUSB connector on the bottom side by providing input power. When the input power is present, the MP2632B operates in charge mode. The MP2632B detects the battery voltage automatically and charges the battery in three phases: trickle current, constant current, and constant voltage. Other features include charge termination and auto-recharge. The MP2632B also integrates both input current limit and input voltage regulation to manage the input power and prioritize the system load.
In the absence of an input source, the MP2632B switches to boost mode through PB to power SYS from the battery. In boost mode, the OLIM pin programs the output current limit, and the MP2632B turns off at light load automatically. The MP2632B also allows for output short-circuit protection (SCP) to disconnect the battery completely from the load in the event of a short-circuit fault. Normal operation resumes once the short-circuit fault is removed.
The operational mode selector button on the PowerBank Click has few purposes. If the button is pressed for more than 1.5ms, the boost is enabled and latched if V IN is not available. LEDs 1-4 are ON for five seconds whenever the button is pressed for more than 1.5ms. If the button is pressed for more than 1.5ms twice within one second, it serves as a torch light ON/OFF switch. If the button is held pressed for more than 2.5 seconds, this is defined as a long push, and boost is shut down manually.
A 4-LED driver is integrated for voltage-based fuel gauge indication. Together with torch-light control, the MP2632B provides an all-in-one solution for power banks and similar applications without an external microcontroller.
The PowerBank Click is also equipped with a MCP3221, a successive approximation A/D converter (ADC) with a 12-bit resolution to monitor battery voltage over I2C bus over mikroBUS™ socket.
This Click Board™ is designed to be operated only with 5V logic level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with logic levels of 3V3.
SPECIFICATIONS
Type | Battery charger |
Applications | Battery Charger Applications, Power-Bank Applications for Smartphones, Tablets and Other Portable Devices |
On-board modules | MP2632B switch-mode battery charger |
Key Features | Switch-mode battery charger with system power-path management designed for single-cell Li-ion or Li-polymer batteries |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | L (57.15 x 25.4 mm) |
Input Voltage | 5V |
PINOUT DIAGRAM
This table shows how the pinout on PowerBank Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | NC | ||
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
NC | 7 | 3.3V | 5V | 10 | 5V | Power Supply | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
LD1-4 | LD1-4 | - | Battery Status LEDs / Fault Indicator |
LD5 | LD5 | - | Operation Mode Indicator |
T1 | - | - | Operation Mode Selector |
CN1 | - | - | USB Power/Communication Port |
CN2 | - | - | USB Charge Port |
Software Support
We provide a library for the PowerBank Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the PowerBank click board. It offers reading from output register and calculations that result in relatively accurate measurement of connected batteries voltage.
Key Functions
uint16_t powerbank_read_data ( );
- Function is used to read raw data from MCP3221.uint16_t powerbank_read_voltage ( uint16_t v_ref );
- Function is used to calculate voltage of the connected battery.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module and LOG structure.
- Application Initialization - Initalizes I2C driver and makes an initial log.
- Application Task - (code snippet) This example shows the capabilities of the PowerBank click by measuring voltage of the connected battery. In order to get correct calculations user should change "v_ref" value to his own power supply voltage.
void application_task ( ) { voltage = powerbank_read_voltage( v_ref ); WordToStr( voltage, log_txt ); mikrobus_logWrite( "Battery voltage: ", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mV", _LOG_LINE ); mikrobus_logWrite( "------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- Conversions
- UART
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
This Click board™ is supported with mikroSDK - MikroElektronika 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.
Software Support
We provide a library for the PowerBank Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the PowerBank click board. It offers reading from output register and calculations that result in relatively accurate measurement of connected batteries voltage.
Key Functions
uint16_t powerbank_read_data ( );
- Function is used to read raw data from MCP3221.uint16_t powerbank_read_voltage ( uint16_t v_ref );
- Function is used to calculate voltage of the connected battery.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module and LOG structure.
- Application Initialization - Initalizes I2C driver and makes an initial log.
- Application Task - (code snippet) This example shows the capabilities of the PowerBank click by measuring voltage of the connected battery. In order to get correct calculations user should change "v_ref" value to his own power supply voltage.
void application_task ( ) { voltage = powerbank_read_voltage( v_ref ); WordToStr( voltage, log_txt ); mikrobus_logWrite( "Battery voltage: ", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "mV", _LOG_LINE ); mikrobus_logWrite( "------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- Conversions
- UART
Additional Notes and Information
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
This Click board™ is supported with mikroSDK - MikroElektronika 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.