August 2012 Doc ID 022389 Rev 1 1/55
UM1481
User manual
STEVAL-ISB012V1 Li-Ion battery monitor and gas-gauge
based on the STC3105
Introduction
This document describes an easy and compact solution to monitor voltage, current, and
capacity of single cell Li-Ion batteries using the STC3105, which has a highly efficient gas-
gauge. In addition, the board has an internal charger in order to charge the battery. Battery
charging can be done through the USB port or by using a DC adaptor.
The board contains the following devices:
Battery monitoring device STC3105
Microcontroller STM32F102C8
Voltage regulator LD1117AXX33
Li-Ion battery charger STC4054
Step-up converter L6920
Figure 1. STEVAL-ISB012V1 single cell Li-Ion battery monitor and gas-gauge
based on the STC3105
www.st.com
Contents UM1481
2/55 Doc ID 022389 Rev 1
Contents
1 Key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1 Typical applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1 Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Setting up the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Hardware layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 System overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 General description of product architecture . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Automatic battery capacity learning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4 User interface section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5 STC3105 parameter setting and display . . . . . . . . . . . . . . . . . . . . . . . . 16
5.1 How to enter the capacity of the battery . . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 Entering low SOC threshold of the battery . . . . . . . . . . . . . . . . . . . . . . . . 17
5.3 Entering low voltage threshold of the battery . . . . . . . . . . . . . . . . . . . . . . 18
5.4 Entering RLX counter current threshold . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.5 Status LED description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.6 HyperTerminal display settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
6 Graphical user interface application . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.1 Installation of the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
6.2 Board initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.3 Key battery parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6.4 Other battery parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.5 Battery status and data log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7 Hardware design description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1 Microcontroller (STM32) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.2 Battery monitor IC (STC3105) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.3 ESD protection device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
UM1481 Contents
Doc ID 022389 Rev 1 3/55
7.4 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.5 STC4054 charger IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.6 Power MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8 Connectors and jumpers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.1 JTAG connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.2 USB connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.3 Power supply connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.4 LCD connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.5 Jumper J7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.6 Jumper J10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.7 Jumper J11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.8 Jumper J9: external MCU connection . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
8.9 Jumper J3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.10 Jumper 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.11 Terminal block J12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.12 Terminal block J14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
8.13 Terminal block J13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.14 Charger selection switch: SW8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.15 External power supply selection switch: SW7 . . . . . . . . . . . . . . . . . . . . . 40
8.16 uSD connector: J8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9 Hardware schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
10 Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
11 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
12 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
13 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
List of tables UM1481
4/55 Doc ID 022389 Rev 1
List of tables
Table 1. LED description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 2. Microcontroller details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 3. Maximum capacity and charge register LSB resolution for various values of Rsense . . . . 33
Table 4. STC3105 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 5. USBLC6 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 6. Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 7. Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 8. Power MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 9. Pin description of JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 10. USB connector pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 11. LCD connector pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 12. ALM pin connection of STC3105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 13. SDA pin for I2C communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 14. SCL pin for I2C communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 15. Pinout for external microcontroller connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Table 16. Jumper J3 configuration details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 17. Jumper J15 configuration details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 18. Terminal block J12 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 19. Terminal block J14 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 20. Terminal block J13 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 21. Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 22. Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Table 23. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
UM1481 List of figures
Doc ID 022389 Rev 1 5/55
List of figures
Figure 1. STEVAL-ISB012V1 single cell Li-Ion battery monitor and gas-gauge based on the
STC3105. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. STEVAL-ISB012V1 single cell Li-Ion battery monitor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 3. Hardware layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 4. System architecture details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Figure 5. Data screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 6. Display flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 7. Welcome message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 8. Battery absent message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 9. Battery low indication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 10. Battery parameters display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 11. Main menu screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 12. Relaxation time display on LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 13. Battery current display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 14. Battery voltage display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 15. Entry of parameters related to SOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 16. Message after entering value of parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 17. Wrong value entry message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 18. Total capacity display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 19. Change in the name of total capacity after complete learning of capacity . . . . . . . . . . . . . 18
Figure 20. Alarm parameter setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 21. Low voltage alarm setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 22. Relaxation counter current threshold value entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 23. My computer hardware properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 24. Board appearing as a COM port device under device manager. . . . . . . . . . . . . . . . . . . . . 21
Figure 25. HyperTerminal settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 26. COM port property settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 27. HyperTerminal display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 28. GUI installation step 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 29. GUI installation step 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 30. GUI installation step 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Figure 31. GUI installation step 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 32. GUI installation step 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 33. Board connection command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 34. Board connected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 35. Key parameter page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 36. Other battery parameters page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 37. Battery log and graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 38. JTAG connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 39. Micro-B USB connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 40. Power supply connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 41. Microcontroller and battery monitoring section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 42. Battery charger and regulator section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 43. Switches and MOSFET switching section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 44. USB and 5 V output section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Key features UM1481
6/55 Doc ID 022389 Rev 1
1 Key features
The board demonstrates the capability of the STC3105 device which uses the Coulomb
counter method to track the state-of-charge in order to track when the battery is
charging or discharging.
The STC3105 uses accurate measurements of the battery voltage to estimate battery’s
initial state of charge (SOC). The board also measures current, voltage, relaxation time
and other battery parameters set by the user using the STC3105 battery monitoring
device. The onboard STM32 microcontroller is interfaced with USB, STC3105, LCD,
and switches.
Battery parameters are sent to the PC via the USB using the virtual COM port and can
be observed using the HyperTerminal as well as the GUI.
The board can also display parameters on the LCD. 4 switches are available for
scrolling through the MENU.
Charging and discharging status is displayed by the + and - sign respectively on the
LCD and also the LED (D2) toggles during charging of the battery and is turned off
during discharging.
The board also shows low voltage and SOC alarms using LED D13 depending on
respective thresholds set by the user.
A battery with a capacity up to ±10950 mAh can be monitored by the board (with a
20 mΩ sense resistor).
An external/internal charger can be selected for charging the battery using a switch
(SW8). This allows the user to use/evaluate the STC3105 with their own battery
charger system.
The onboard charger STC4054 can be used as an internal charger for the Li-Ion
battery. The USB is used for communication with the PC to send the various battery
parameters. Power from the USB micro-B connector can also be used to power on the
board and charge the battery.
The user also has an option of interfacing their microcontroller to the STC3105 device
using jumpers. The onboard monitoring device STC3105 can be disconnected from the
onboard microcontroller and the user can connect their own microcontroller (gas-gauge
host device) using the relevant pins.
1.1 Typical applications
Battery monitoring for handheld devices such as PDAs, mobile phones, MP3 players
Medical and health care products such as a Glucometer
Digital cameras, USB-chargers, digital photo frames
Consumer applications using an Li-Ion battery.
UM1481 Getting started
Doc ID 022389 Rev 1 7/55
2 Getting started
2.1 Package
The STEVAL-ISB012V1 demonstration board package includes the following:
Hardware content
Demonstration board STEVAL-ISB012V1
Documentation
User manual (this document)
Schematics, Gerber files, BOM list
Microcontroller firmware
Pre-programmed STM32F102C8T6 device soldered onto the demonstration
board.
Virtual COM port driver
Gas-gauge application GUI.
2.2 Setting up the board
The following steps should be taken to set up the board:
1. Standalone operation
Set the jumper between pin 1 and 2 of J3. This ensures the clearing of the RAM
registers of the STC3105 and indicates the connection of a fresh battery. For
details refer to jumper J3.
The board can be powered up by a power adapter (5 V power supply), by
connecting the micro-B USB cable or by the battery to be monitored.
Connect the Li-Ion battery pack to the board with appropriate polarity across
J14. A welcome message (STC3105 battery monitoring demo) is displayed on the
LCD during startup. Once again, place the jumper between pin 2 and 3 of J3. For
details refer to jumper J3.
Now use the navigation keys (SW1, SW2, SW3, and SW4) to scroll through the
menu.
2. Battery charging and discharging
If an external power source (USB or 5 V adaptor) is present, the internal charger can
be used to charge the battery using switch SW8.
Switch SW7 is used to select between the wall adapter or USB as the power
source.
An external charger can also be connected directly across J12. Switch SW8 is
used to select either an internal or external charger.
External load can also be connected to the board across J13 or J15. When
external load and power supply is not present, the board itself acts as a load to the
battery and discharges it.
Make sure to connect the external power supply source if battery voltage is below
cut-off voltage. It is shown by LED D2. Cut-off voltage is set to 3.2 V, below this
any external load (connected at J13/J15) is also disconnected by MOSFET Q7
(acting as a switch between battery and external load).
Getting started UM1481
8/55 Doc ID 022389 Rev 1
3. Displaying battery parameters on PC HyperTerminal
To display battery parameters on the HyperTerminal, connect the micro-B cable
and open a new HyperTerminal window. Details are given in Figure 2.
Figure 2. STEVAL-ISB012V1 single cell Li-Ion battery monitor
!-V
*4!'CONNECTOR
2ESETSWITCH
3TATUS,%$3
3WITCH37
53"CONNECTOR
0OWER*ACK
-#5
-ENUNAVIGATION
KEYS %XTERNALMOCRO
CONNECTOR
34#
*UMPER*
,I)ONBATTERY
PACK
%XTERNALLOAD
CONNECTOR
"ATTERY
CONNECTOR
%XTERNALCHARGER
CONNECTOR
3WITCH37
UM1481 Getting started
Doc ID 022389 Rev 1 9/55
2.3 Hardware layout
The hardware layout of the PCB is shown in Figure 3, which shows all the components
mounted on the board.
Figure 3. Hardware layout
!-V
*4!'CONNECTOR
2ESETSWITCH
3WITCH37
53"
CONNECTOR
0OWER
*ACK
-#5
.AVIGATION
KEYS
%XTERNAL
CHARGER
CONNECTOR
34#
*UMPER*
"ATTERY
CONNECTOR
,OAD
CONNECTOR
"ATTERY
ANDLOAD
CONNECTOR
%XTERNALMICRO
CONNECTOR
3WITCH
37
3TATUS,%$S
#RYSTAL
System overview UM1481
10/55 Doc ID 022389 Rev 1
3 System overview
3.1 General description of product architecture
Figure 4. System architecture details
System architecture details
The STM32 communicates with the STC3105 using I2C communication protocol to
obtain information regarding battery capacity, relaxation time, current, voltage, etc.
The board is able to run on a battery source. When the battery reaches its critical
voltage, the board goes into shutdown mode. To keep track of the battery status, the
STC3105 is always powered up by the battery.
The L6920 is configured to step up input voltage to 5 V. Then, LD1117AS33TR
produces a constant output voltage of 3.3 V to power on the LCD and the STM32.
LCD and switches are used for user interface.
Onboard charger is provided to charge the battery.
Two manual slide switches are provided on the board. The SW7 slide switch is used to
allow the user to choose only one external power supply at a time i.e. either USB or an
external wall adapter.
The second manual slide switch (SW8) is used to select the battery charger, either
internal or external.
A MOSFET is provided between the battery and the L6920 which connects the board
(and is acting as a load to the battery) to the battery in the absence of any external
power source (USB/wall adapter) and similarly disconnects boards from the battery in
the presence of any external power source.
UM1481 System overview
Doc ID 022389 Rev 1 11/55
In a similar manner, another MOSFET is provided between an external load and
battery. When battery voltage falls below the cut-off value (3.15 V), it disconnects the
external load from the battery.
Whenever the microcontroller accesses the STC3105 registers, the LED (D3) blinks
and the values are updated.
LED D2 toggles if the battery is in a charging position with either an internal or external
charger. This LED is turned off if the battery is being discharged and is turned on if the
battery voltage is below 3.2 V.
LED D13 turns on if any alarm condition occurs i.e. battery voltage or SOC goes below
the threshold set by the user. A related message also appears on the LCD. Similarly, if
the battery is absent or deeply discharged, this LED turns on and a warning message
appears on the screen.
3.2 Automatic battery capacity learning
Whenever a new battery is connected to the board it automatically estimates the present
SOC percentage depending on the open circuit voltage (refer to step 3 below). Initially, the
total capacity of the battery is assumed to be default, i.e. 1500 mAh here. The user can
change the total capacity of the battery to the required value as mentioned in Section 5.1.
In order to learn the actual capacity of the battery we need to first discharge it completely
and then charge it back to 100%. To achieve this, follow the steps below:
1. Do not connect external charger with the board and change switch position SW8
towards external charger. This ensures that the battery is not charged on first
connection. Place the jumper between pin 1 and 2 of J3.
2. Connect power source (USB/wall adapter) to the board and then connect the battery.
3. Steps 1 and 2 ensure the battery is neither being charged nor discharged and so it
measures OCV in order to estimate initial SOC of the battery.
4. Now, in order to discharge the battery we must disconnect the external power source,
the board acts as a load and consumes power from the battery.
5. Similarly, if the user wants to charge the battery, either an internal or external charger
can be used by adjusting SW8 accordingly.
6. Battery parameters appear on the LCD screen as shown in Figure 5.
Figure 5. Data screen
7. Change the jumper position to pin 2 and 3 of J3.
8. When battery voltage falls below 3.2 V, LED D2 turns on and indicates that battery is
low. Now, it is recommended to start charging the battery using an internal or external
charger in order to avoid a deep discharge of the battery.
System overview UM1481
12/55 Doc ID 022389 Rev 1
9. If charging is still not enabled, battery voltage falls further and the board enters
shutdown mode. When battery voltage is around 2.7 V the board is turned off.
10. A fully charged condition is achieved when charging current falls below 50 mA for about
30 seconds along with a battery voltage of at least 4.17 V. This can be seen by a
change in name from “Total Capacity” to “Actual Capacity”. This can be observed on
both the LCD and HyperTerminal.
Note: If battery charging is stopped inside the ‘automatic battery capacity leaning phase’, it does
not impact it as the STC3105 takes care of battery capacity calculations by using its
registers. The only thing to be taken into account is that the battery should not be removed
from the system and battery voltage should be above 3.1 V. If any of the conditions are not
met, battery capacity learning restarts.
UM1481 User interface section
Doc ID 022389 Rev 1 13/55
4 User interface section
There are various options available on the board to display the battery status, device ID,
register info, etc. Figure 6 shows all the information which it is possible to display on the
LCD by using the relevant keys.
Figure 6. Display flow chart
!-V
,OW3 / #,OW6OLT ./
9%3
9%3
#HECK
,OW
VOLTAGE O R
3/#
3HOW,OW
3/#!LARM
3HOW,OW
6OLT!LARM
"ATTERY
3TATUS
2EGISTER
)NFO
$EVICE
)$
3ETTINGS
$EVICE)$(%8
 %NTER
3ELECT-ODE
3/# !,-4(
2LX4IMER
#URRENT
4(
6OLTAGE!,-
./
0OWE R/.
)F,OW
"ATTERY
!LARM
#HECK
-ENU+EYS
0RESSED
7ELCOME-ESSAGE
3HOW"ATTERYPARAMETERS
6
)
3/#ETC
#URRENT
2EMAININ
G
#URRENT
2ELAXATION
6OLTA
G
E
4OTA L#APACITY
3/#!LARM
6OLT!LARM
2E
G
#HAR
G
E
2E
G
#HAR
E
2E
G
#OUNTER
2EG#OUNTER(IGH
2E
G
#URRENT
2E
G
#URRENT
2EG6OLTAGE,OW
2EG6OLTAGE(IGH
2EG3/#"ASE,OW
2EG3/#"ASE(IGH
2EG3/#!,-,OW
2EG3/#!,-,OW
2EG6OLT!LARM
2EG2LX4IME4HRS
2EG2LX4IME
User interface section UM1481
14/55 Doc ID 022389 Rev 1
During startup the following welcome message appears on the LCD display.
Figure 7. Welcome message
If the battery is absent or empty (below 3 V), the user sees either of these two messages, as
shown in Figure 8 and 9, and the battery must be connected to the board.
Figure 8. Battery absent message
Figure 9. Battery low indication
After some delay from the welcome message, the LCD automatically starts displaying
various battery parameters (data screen), as shown in Figure 10:
Figure 10. Battery parameters display
UM1481 User interface section
Doc ID 022389 Rev 1 15/55
On pressing the MENU key, program execution enters the main menu, as shown in
Figure 11:
Figure 11. Main menu screen
While scrolling through the menu, (by pressing the menu button or navigation buttons) one
of the options is always indicated by the arrow mark “<-”, as shown in Figure 9. By pressing
the enter key the corresponding tab is selected, which is indicated by the arrow mark “<-”.
To scroll between the different options, use the UP and DOWN switches. For example, if
relaxation time “RLX TIME” is being displayed on the LCD screen, as shown in Figure 12:
Figure 12. Relaxation time display on LCD
On pressing DOWN, the LCD displays current, as shown in Figure 13.
Figure 13. Battery current display
If the UP key is pressed, then the voltage is displayed, as shown in Figure 14.
User interface section UM1481
16/55 Doc ID 022389 Rev 1
Figure 14. Battery voltage display
On pressing the MENU key, control exits all the sub levels and returns to the main menu
screen. If the MENU key is pressed again, the battery parameter display appears.
There are 5 switches mounted on the board to scroll through these available options. They
are as follows:
SW1: enter switch; to select the currently indicated option using the arrow
SW2: menu switch; to go to the main menu from any point of the display menu
SW3 and SW4: UP and DOWN switches; to scroll between the different options
displayed on the LCD
SW5: reset switch; to reset the microcontroller.
UM1481 STC3105 parameter setting and display
Doc ID 022389 Rev 1 17/55
5 STC3105 parameter setting and display
5.1 How to enter the capacity of the battery
When a new battery is connected to the board, depending on requirements, the user can
enter the total capacity of the battery. If the user doesn't enter the capacity of the battery, a
default value of a total capacity equal to 1500 mAh is considered and all the data is shown
accordingly.
To enter the battery capacity, select the “Settings” tab and select the appropriate option.
Now the user is able to see the image shown below in Figure 15:
Figure 15. Entry of parameters related to SOC
Using the UP and DOWN switch sets the number. To move to the next digit, press enter.
When all the digits are set the user is able to see the image shown in Figure 16:
Figure 16. Message after entering value of parameter
If the user enters the wrong value i.e. 0 or more than ±10950 mAh (with 20 mΩ sense
resistor) then it shows the message as in Figure 17, and the default value i.e.1500 mAH, is
stored. When the value entered is right, it is updated in total capacity.
Figure 17. Wrong value entry message
STC3105 parameter setting and display UM1481
18/55 Doc ID 022389 Rev 1
If the capacity is entered (for example 740 mAh), and capacity learning is not completed, the
user sees the image in Figure 18 on the LCD showing total capacity.
Figure 18. Total capacity display
If capacity learning is over, the actual capacity is displayed on the LCD for total capacity, as
shown in Figure 19.
Figure 19. Change in the name of total capacity after complete learning of capacity
5.2 Entering low SOC threshold of the battery
This is the threshold value of SOC below which the battery is supposed to be empty or if the
charge available in the battery is not sufficient to run the load. The board indicates an alarm
once the battery capacity (SOC) drops below this. If the user wants to change the LOW
SOC alarm threshold (it changes the contents of “REG_ALARM_SOC_LOW” and
“REG_ALARM_SOC_HIGH”) from the default value, i.e. 10% of default battery capacity
(150 mAH), the user must use the setting menu.
Figure 20. Alarm parameter setting
To enter the battery LOW SOC Alarm, select the “Settings” tab and select the appropriate
option. Now the user is able to see the image shown in Figure 15.
UM1481 STC3105 parameter setting and display
Doc ID 022389 Rev 1 19/55
Using the UP and DOWN switch sets the number. To move to the next digit, press enter.
When all the digits are set, the user is able to see the image shown in Figure 16.
If the user enters any value below 150 mAh or above 7300 mAH, the board shows the
message in Figure 17 and enters default value, i.e. 150 mAH.
5.3 Entering low voltage threshold of the battery
If the user wants to change the “low voltage alarm threshold” from the default value i.e. 2.9
V, 3.2 V, they must use the setting ‘MENU’.
Note: The low voltage alarm threshold is configurable and different to the cut-off voltage, which is
fixed at 3.15 V and used to disconnect an external load from the battery.
To enter the battery low voltage alarm threshold, select the “Settings” tab and select the
appropriate option. Now the user is able to see the image shown below:
Figure 21. Low voltage alarm setting
The UP and DOWN switch sets the number. To move to the next digit, press enter.
When all the digits are set the user is able to see the image shown in Figure 16.
This parameter changes the contents of “REG_ALARM_VOLTAGE”.
If the user enters any value below 2.9 V or above 4.2 V, the board shows the message in
Figure 17 and enters the default value, i.e. 2.9 V.
STC3105 parameter setting and display UM1481
20/55 Doc ID 022389 Rev 1
5.4 Entering RLX counter current threshold
If the user wants to change the relaxation counter current threshold from the default value,
i.e. 40 mA, it is necessary to use the setting ‘MENU’.
To enter the battery relaxation counter current threshold, select the “Settings” tab and select
the appropriate option. It is now possible to see the information in Figure 22:
Figure 22. Relaxation counter current threshold value entry
Using the UP and DOWN switch sets the number. We can enter this threshold value in
multiples of 20 mA only. To move to the next digit, press enter.
When all the digits are set, the user is able to see the information shown in Figure 16.
If the user enters any value below 40 mA or above 4.8 A, the board shows the information in
Figure 17. If the user enters a value that is not a multiple of 20 mA, then the value entered is
automatically for the lower closest value available in multiples of 20 mA, e.g. if the user
enters 65 mA, then the board automatically accepts 60mA as it is the closest value lower
than 65 mA and also a multiple of 20 mA.
5.5 Status LED description
Table 1. LED description
LED Description Toggling OFF ON
D2 Charging/discharging
status Charging Discharging Battery below
3.15 V
D3 STC3105 register
access
Register being
accessed per second No access Some problem
D13 Alarm LED Alarm situation, refer
to message on display No alarm
Alarm occurred,
refer to displayed
message to see
type of alarm
UM1481 STC3105 parameter setting and display
Doc ID 022389 Rev 1 21/55
5.6 HyperTerminal display settings
The STC3105 board supports the virtual COM port feature. After installing the driver
provided for the virtual COM port or the gas-gauge GUI driver (which automatically installs
the virtual COM port driver in addition to the GUI), the user can see the battery parameters
and other register information on the HyperTerminal window of the PC. To do this, the user
should connect the micro-USB cable between the board and the PC, and select the device
manager under the hardware tab of system properties, as shown in Figure 24.
Figure 23. My computer hardware properties
Now the user is able to see the “STM Virtual COM Port” under ports (COM & LPT). Take a
note of the COM port number.
Figure 24. Board appearing as a COM port device under device manager
STC3105 parameter setting and display UM1481
22/55 Doc ID 022389 Rev 1
Open the HyperTerminal window as shown in Figure 24 and select the same COM port
number which was shown with the name “STM Virtual COM Port”. Set the properties as
shown in Figure 26.
Figure 25. HyperTerminal settings
Figure 26. COM port property settings
UM1481 STC3105 parameter setting and display
Doc ID 022389 Rev 1 23/55
Figure 27. HyperTerminal display
Once the HyperTerminal is open, the parameters are shown, as in Figure 27. These
parameters are updated on the HyperTerminal every 5 seconds (as configured in the
firmware). With the capture text feature of the HyperTerminal, it is possible to create a text
file showing the information regarding the battery status. Open this file with WordPad.
Graphical user interface application UM1481
24/55 Doc ID 022389 Rev 1
6 Graphical user interface application
It is possible to monitor and set various battery parameters using a GUI, which also
communicates with the demo board through the USB (virtual COM port). Only one of the
two, HyperTerminal or GUI, can be run at any one time. The key features of the GUI are:
It can show gas-gauge results such as voltage, current, etc. at the log frequency set
by the user.
It also shows three different graphs of voltage, current, and SOC percentage with
respect to time.
The user can set various parameters like key battery parameters (battery total capacity,
etc.), alarm parameters (SOC and voltage alarm), board hardware parameters (sense
resistor, vin resistor), and some other battery parameters.
The gas-gauge can also be started and stopped using the GUI.
It is also possible to read mode and control registers as well as write some bits of these
two registers.
After proper installation of the GUI demo, the user can read and write various parameters of
the board as mentioned below.
6.1 Installation of the GUI
Click the setup package and start the installation of the application.
Figure 28. GUI installation step 1
UM1481 Graphical user interface application
Doc ID 022389 Rev 1 25/55
Figure 29. GUI installation step 2
Accept the license agreement and click Next.
Figure 30. GUI installation step 3
Graphical user interface application UM1481
26/55 Doc ID 022389 Rev 1
Click Next to continue installing the application.
Figure 31. GUI installation step 4
The setup installs the application and then starts the installation of the virtual COM port
driver.
Figure 32. GUI installation step 5
UM1481 Graphical user interface application
Doc ID 022389 Rev 1 27/55
6.2 Board initialization
Figure 33. Board connection command
!-V
"OARDCONNECTION
COMMAND
Graphical user interface application UM1481
28/55 Doc ID 022389 Rev 1
Figure 34. Board connected
To start evaluating board parameters and its configuration, the user must first connect the
board to a USB port using the USB micro-B cable and then connect the GUI using the
connect tab. When the board is connected properly to the GUI, it shows the message “The
board is connected”, as shown in Figure 34.
6.3 Key battery parameters
The following are the parameters that appear on the first page (key parameter page) of the
GUI, as shown in Figure 35.
Board hardware: it is possible to read and write the value of the sense resistor as well
as the room temperature value.
Alarm: it is possible to R/W the battery low voltage alarm as well as the low SOC alarm.
Battery parameters: it is possible to read and write total battery capacity, internal
resistance of the battery pack as well as the open circuit voltage and its relative SOC
percentage table to be used for an estimation of initial SOC of battery depending on the
open circuit voltage.
Control register: it is possible to read the value of the control register as well as write
the 1st bit (bit 0) of this register.
Mode register: it is possible to read the value of the mode register as well as write the
3rd and 4th bits (bit 2 and 3).
UM1481 Graphical user interface application
Doc ID 022389 Rev 1 29/55
Figure 35. Key parameter page
6.4 Other battery parameters
The following are the parameters that appear on the first page of the GUI, as shown in
Figure 36.
Battery parameters: it is possible to read and write the value of:
Maximum SOC at which the battery is assumed to be fully charged entered here in
percentage of “battery total capacity” (defined under key battery parameters).
Battery min. voltage defines the cut-off voltage below which the battery is
assumed to be empty and the external load is disconnected and indicated by LED
D2 glowing.
Battery min. SOC corresponding to SOC at battery nearly empty (%).
System parameters: it is possible to read and write various parameters like battery
relaxation time (battery relaxation time before OCV measurement in seconds),
battery low current (relaxation timer current threshold, i.e battery max. discharge
current for OCV measurement), application min. current (minimum application
current consumption in mA (<0)), charging end current (end charge current in mA),
charging min. current (min. charge current in mA).
Graphical user interface application UM1481
30/55 Doc ID 022389 Rev 1
Figure 36. Other battery parameters page
6.5 Battery status and data log
Here it is possible to observe various battery parameters at a regular interval (set by
configurable log rate), in addition, it is also possible to observe the separate graphs of
battery voltage, current and SOC percentage in respect to time, on the same page as shown
in Figure 37. The zoomed view of graphs, as well as zoom in and zoom out, can be seen by
simply positioning the mouse over the desired graph. This option can be enabled and
disabled through the options available on the same page. If the user wants to start a new log
there is also an available option to clear the previous screen. The log rate can also be
changed by using the appropriate option. The following are the key features:
Observe various parameters like battery voltage, battery current, battery SOC (in mAH)
etc. at a regular interval set by the log rate.
The GUI can display separate graphs of battery voltage, current and SOC percentage
in respect to time on the same page.
Zoom in and zoom out effect of graph is also available.
It is possible to clear the log if necessary in order to view a new log.
UM1481 Graphical user interface application
Doc ID 022389 Rev 1 31/55
Figure 37. Battery log and graph
Note: For more details please refer to the help file available in the GUI.
Hardware design description UM1481
32/55 Doc ID 022389 Rev 1
7 Hardware design description
The board supports both USB and a wall adapter (external supply). A switch (SW7) is used
to choose between these two. When an external supply is absent the whole board
consumes power from the battery. In this case the step-up converter device L6920 steps up
battery voltage to 5 V. The voltage from these sources (external or L6920) is connected to a
low drop-out regulator (LD1117V) which gives 3.3 V output. This output is used for powering
up devices such as the LCD, microcontroller, etc.
The STC3105 battery monitoring device always receives power from the battery. In order to
avoid the loss of data stored in the RAM registers of the STC3105 during power-off.
7.1 Microcontroller (STM32)
The STM32 is a 32-bit MCU based on the popular ARM 32-bit Cortex™-M3 CPU. The
STM32 device (STM32F102C8T6A) used in this demonstration board runs at 48 MHz. The
microcontroller has single-cycle multiplication and hardware division. The device supports
low power mode such as sleep, stop, and also standby. This device (microcontroller) has up
to 5 communication interfaces which includes two I2Cs (400 kHz), three USARTs, two SPIs
(12 Mbit/s), and USB 2.0 full-speed interface. For more details refer to the STM32F102x8
datasheet and RM0008 reference manual. For this application, a minimum of one I2C to
interface with the STC3105 is needed, a USB to support a USB based charger and USB
data transfer, and some general purpose IOs for the user interface, are required. The part
numbers used to develop this application are shown in Ta b l e 2 .
The microcontroller is used to communicate with and control the STC3105 device, USB
communication to display data on the PC, LCD driving, interfacing menu keys and menu
operation.
Table 2. Microcontroller details
Feature Description
Sales type STM32F102C8T6A:USB access line, USB 2.0 full-speed interface
Package LQFP-48 (7 x 7) mm
Flash - Kbytes 64
SRAM - Kbytes 10
Operating voltage 2.0 to 3.6 V
UM1481 Hardware design description
Doc ID 022389 Rev 1 33/55
7.2 Battery monitor IC (STC3105)
The STC3105 monitors the critical parameters of a single-cell Li-Ion battery (voltage, and
current, SOC, etc.) and includes hardware functions to implement a gas-gauge for battery
charge monitoring, based on a programmable 12- to 14-bit A-D converter. With a typical
20 mΩ external sense resistor, the gas-gauge system provides a capacity of up to ±10950
mAh with a resolution of 0.2 mAh, as described below.
Calculation of the maximum battery capacity being supported by the STC3105:
The voltage drop across the external sense resistor is integrated during a conversion period
and input to a 12- to 14-bit AD converter. The output conversion is accumulated into a 28-bit
accumulator. The LSB value is set by the internal gain and internal reference and is 11.77
uV at maximum resolutions. The conversion cycle for n bit resolution is 2 n clock cycles.
Using the 32,768 Hz internal clock, the conversion cycle time is 125 to 500 ms for a 12- to
14-bit resolution. The AD converter output is in 2's complement format. When a conversion
cycle is completed, the result is added to the charge accumulator.
The LSB value of the charge accumulator (in mAH) = LSB value of ADC * conversion cycle
time* 10-3 sense resistor *3600.
(LSB value of ADC= 11.77 µV, conversion time 500 mS for 14-bit resolution; sense resistor =
10 mΩ to 50 mΩ.)
Maximum capacity of battery supported (in ± mAH) = LSB value of charge accumulator
* 228 2.
Resolution of charge register = maximum capacity of battery supported 216.
The device is programmable through the I2C interface. This device also has 16-RAM bytes,
1-byte unique device ID, and an ALM pin. RAM contents are retained even up to a minimum
battery voltage of 2.0 V. For more details refer to the STC3105 datasheet.
Table 3. Maximum capacity and charge register LSB resolution for various values
of Rsense
Sense resistor value Maximum capacity of battery
supported (in ± mAH)
Resolution of charge register (in
mAH)
10 mΩ21900 0.6
20 mΩ10950 0.3
30 mΩ7300 0.2
40 mΩ5450 0.16
50 mΩ4350 0.13
Table 4. STC3105 details
Feature Description
Order code STC3105IQT
Package TDFN 3.0 X 2.0 X 0.75
Operating voltage 2.7 to 5.5 V
Operating current consumption 50 µA
Hardware design description UM1481
34/55 Doc ID 022389 Rev 1
7.3 ESD protection device
ESDAULC6-3BP6 are monolithic application specific devices dedicated to ESD protection of
high-speed interfaces, such as USB 2.0, Ethernet links and video lines. For more details
please refer to the device datasheet.
7.4 Voltage regulator
The LD1117 is a low drop voltage regulator able to provide up to 800 mA of output current,
available even in the adjustable version (VREF = 1.25 V). High efficiency, low drop voltage,
and the low quiescent current make them particularly suitable for low noise, low power
applications, and in battery powered systems. For more details please refer to the device
datasheet.
A power supply of 3.3 V is generated using this IC to power up the LCD, microcontroller, and
all other peripherals except the STC3105 which is always powered up from the battery only.
7.5 STC4054 charger IC
The STC4054 charger IC is a linear mode charger which charges the battery at 4.2 V at
programmable current level. During constant current charging mode, the charging current is
programmed to a value of around 350 mA. This value is selected by connecting a 1% 2.8 kΩ
resistor Rprog across the PROG pin. When the battery voltage approaches the charge
voltage (4.20 V), the charger enters into a constant voltage charging mode and the charging
current decreases. When the current level reaches the end-of-charge level, the battery is
almost fully charged, and the charger enters maintenance mode. For more details please
refer to the device datasheet.
Table 5. USBLC6 details
Feature Description
Order code ESDAULC6-3BP6
Package SOT-666
Table 6. Voltage regulator
Feature Description
Sales type LD1117AS33TR
Package SOT-223
Table 7. Voltage regulator
Feature Description
Order code STC4054GR
Package TSOT23-5L
UM1481 Hardware design description
Doc ID 022389 Rev 1 35/55
7.6 Power MOSFET
There are two MOSFETs under a single 8-pin package. One of these MOSFETs is used to
connect the external load to battery and the other one is for the demo board to battery.
Table 8. Power MOSFET
Feature Description
Sales Type STS4DPF20L
Package SO-8
Connectors and jumpers UM1481
36/55 Doc ID 022389 Rev 1
8 Connectors and jumpers
8.1 JTAG connector
Figure 38. JTAG connector
The JTAG connector is available on the board for re-programming the microcontroller and
debugging.
Table 9. Pin description of JTAG
Pin Number Description Pin number Description
1 3.3 V power 2 3.3 V power
3TRST4 GND
5 TDI 6 GND
7TMS8GND
9TCK10GND
11 RTCK 12 GND
13 TDO 14 GND
15 nSRST 16 GND
17 DBGRQ 18 GND
19 DBGACK 20 GND
!-V











$EBUG*4!'PORT
UM1481 Connectors and jumpers
Doc ID 022389 Rev 1 37/55
8.2 USB connector
The standard USB micro-B type (5-pin) connector is used. An additional 4 connections (pins
6-9 in the schematics) are connected to the body of the connector. The maximum current
drawn by the board from the USB host/hub should be less than 500 mA in any condition to
respect the USB specifications
Figure 39. Micro-B USB connector
Table 10. USB connector pin description
Pin number Description
1 VBUS (power): +5 V supply from USB bus
2 DM: USB D- signal
3 DP: USB D+ signal
4--
5 GND: ground signal
6SHIELD
7 SHIELD
8 SHIELD
9SHIELD
Connectors and jumpers UM1481
38/55 Doc ID 022389 Rev 1
8.3 Power supply connector
The adaptor connector is available for connecting an external voltage source. An adaptor of
5 V DC can be used.
Figure 40. Power supply connector
8.4 LCD connector
Table 11. LCD connector pin description
Pin no. Details
1GND
23.3 V
3 Contrast – connect to 3.3 V through resistor
4RS
5GND
6 Enable
7GND
8GND
9GND
10 GND
11 D4
12 D5
13 D6
14 D7
15 3.3 V
16 GND
UM1481 Connectors and jumpers
Doc ID 022389 Rev 1 39/55
8.5 Jumper J7
8.6 Jumper J10
8.7 Jumper J11
8.8 Jumper J9: external MCU connection
Table 12. ALM pin connection of STC3105
Jumper Description
1 - 2 Connecting the ALM pin of the STC3104 with onboard MCU STM32
2 - 3 Connecting the ALM pin of the STC3105 with external MCU
Table 13. SDA pin for I2C communication
Jumper Description
1 - 2 Connecting the SDA pin of the STC3105 with onboard MCU STM32
2 - 3 Connecting the SDA pin of the STC3105 with external MCU
Table 14. SCL pin for I2C communication
Jumper Description
1 - 2 Connecting the SCL pin of the STC3105 with onboard MCU STM32
2 - 3 Connecting the SCL pin of the STC3105 with external MCU
Table 15. Pinout for external microcontroller connections
Jumper Pin function Description
1 Alarm Pinout for the ALM pin of the STC3105 for external
MCU
2 NC NC
3 I2C_SDC Pinout for the SDA line for external MCU
4 I2C_SCL Pinout for the SCL line for external MCU
5 GND Pinout for the GND connection for external MCU
Connectors and jumpers UM1481
40/55 Doc ID 022389 Rev 1
8.9 Jumper J3
This jumper is basically used to ensure that the RAM registers of the STC3105 device are
cleared at the time of powering up the board.
8.10 Jumper 15
It is used to connect the load as well as the battery to the board.
8.11 Terminal block J12
8.12 Terminal block J14
Table 16. Jumper J3 configuration details
Jumper Description
1 - 2 Put the jumper in this position before powering up the board when a new battery is
connected. This ensures a clearing of the STC3105 RAM resistors.
2 - 3 Put the jumper in this position once the parameters of the battery appear on
screen. As shown in Figure 5
Table 17. Jumper J15 configuration details
Jumper Description
1 - 2 For load connection
2 - 3 For battery connection
Table 18. Terminal block J12 details
Pin Description
CHG+ Charger positive terminal
CHG- Charger negative terminal
Table 19. Terminal block J14 details
Pin Description
B+ Battery positive terminal
B- Battery negative terminal
UM1481 Connectors and jumpers
Doc ID 022389 Rev 1 41/55
8.13 Terminal block J13
Note: The load is connected to the battery via a MOSFET. Once battery voltage falls below 3.15 V,
the MOSFET disconnects load from the battery. This prevents the battery from going into
deep discharge.
8.14 Charger selection switch: SW8
This switch is used to select between an internal (onboard) charger and an external charger.
Indication is printed on the board.
8.15 External power supply selection switch: SW7
This switch is used to select between the USB and Wall adapter. Indication is printed on the
board.
8.16 uSD connector: J8
The provision of an external uSD card to store various battery parameters in the future has
been made.
Table 20. Terminal block J13 details
Pin Description
Load+ External load positive terminal
Load- External load negative terminal
Hardware schematic UM1481
42/55 Doc ID 022389 Rev 1
9 Hardware schematic
Figure 41. Microcontroller and battery monitoring section
!-V
9
26&B287
26&B,1
/('B3%
Q567
9
/('B3%
*1'
%227
%227
*1'
&)*B3&
*1'
&)*B3%
*1'
9
*1'
9
%227
-7$*B-7'2B3%
-7$*B-17567B3%
-7$*B-7&. B3$ 
/('B3%
-7$*B-7',B3$ 
86%B38B3&
9
26&B,1
*1'
Q567
26&B287
9
/('B3%
%227
9
*1'
67&B$/0B3%
3$
/&'B56B3$
/&'B(B3$
06'B166B3$
/&'B'B3%
/&'B'B3%
&)*B3&
/&'B'B3%
/&'B'B3%
&+5*B3$
06'B6&.B3$
06'B0,62B3$
'2:1B3&
,&B6&/B3%
06'B026,B3$
,&B6'$B3%
/'B/%2B3%
86%'3B3$
-7$*B-706B3$
86%'0B3$
/2$'B6:B3$
(17(5B3$
0(18B3%
&)*B3%
83B 3$
9
9
9
9
9
#/.&)'52!4)/.*5-0%23
-)#2/#/.42/,,%23%#4)/.
5
5
5
.
5
.
&
S)
&
S)
&
Q)
&
Q)
-
&21
-
&21
''
5
0
5
0
5
0
5
0
&
Q)
&
Q)
8
670)&7
8
670)&7
3&B 26&B ,1
3&B 26&B 287
3'B26&B,1
3'B26&B287
1567
966$
9''$
3$B:.83

3$

3$

3$

3$
 3$

9%$7
3&B $17B7$03
3%

3$

3% 
3$

3%

3%

3%

3%

966B

9''B

3% 
3% 
3% 
3$ 
3$ 
3$ 
3$ 
3$ 
3$ 
966B 
9''B 
3$  
3$  
3% 
3% 
3% 
3% 
3% 
9''B 
966B 
3% 
3% 
%227 
<
0+]
<
0+]
5
5
&
Q)
&
Q)
5

5

''
5

5

6:6:
&
Q)
&
Q)
5
.
5
.
&
S)
&
S)
-
&21
-
&21
&
Q)
&
Q)
&*B%
9
9%$7B %
9
67&B 6'$
67&B 6&/
9%$7B %
9
67&B $/0
67&B %$7
(;7B&+*
./4%#/..%#4'.$0)./&34#$)2%#4,97 )4(3(5. 42%3)34/2./44(2/5'('.$0,!.%
34#"!44%29-/.)4/2).')#
5
5
&
S)
&
S)
8
67& ,47
8
67& ,47
9,1
9&&
&*
1&
6'$
$/0
6&/
*1'
5
.
5
.
5
5
5

5

5

5

''
5
PLOOLRKP
5
PLOOLRKP
5
N
5
N
5

5

&
X)
&
X)
8
76 ,/7
8
76 ,/7
5HI
&DWKRGH
$QRGH
5
0
5
0
4
675
4
675
&
S)
&
S)
5
N
5
N
5
0
5
0
6:
32:(56(/(&7,21
6:
32:(56(/(&7,21
5
N
5
N
&
Q)
&
Q)
'
/('
'
/('
UM1481 Hardware schematic
Doc ID 022389 Rev 1 43/55
Figure 42. Battery charger and regulator section
!-V
:$//B$'37
(;7B67&B 6'$
(;7B67&B $/0
(;7B67&B $/0
67&B $/0
(;7B67&B 6'$
(;7B67&B 6&/
67&B $/0B3%
/&'B56B3$
/&'B(B3$
/&'B'B3%
/&'B'B3%
/&'B'B3%
9
9
(;7B67&B 6&/
,&B6'$B3%
67&B 6'$
,&B6&/B3%
67&B 6&/
/&'B'B3%
%84%2.!,#/.42/,,%23%,%#4)/.*5-0%23
,#$3%#4)/.
7!,,!$!04/2
/&'B&211(&725
-
&21
-
&21
-
&21
-
&21
--
5 N5 N
5

5

-
&21
-
&21
--
'% 
/(' 
9''
966
9
'%
'% 
56
5:
'% 
'% 
'%
(
'%
'% 
/(' 
-
&21
-
&21
5 N5 N
5 N5 N
5 N5 N
5 N5 N
Hardware schematic UM1481
44/55 Doc ID 022389 Rev 1
Figure 43. Switches and MOSFET switching section
!-V
/2$'B6:B3$
9
/2$'
9%$7B%
9
B ,1
9%$7B%
6,1*/(&(//B287

-/3&%437)4#().'3%#4)/.
%ITHERMOUNT12AND2OR5!AND2
5
0
5
04
675
4
675
5
0
5
0
8
/' %05
8
/' %05
,1
*1'
,1+,%,7
%<3$66
287
5
.
5
.
&
X)
&
X)
4
676'3)/
4
676'3)/
& X)& X)
5
.
5
.
5
.
5
.
5
5
8
9*&75
8
9*&75
<
9&&
1&
$
*1'
5
N
5
N
4
675
4
675
5
N
5
N
5
N
5
N
&
X)
&
X)
9%$7B %
B 287
B ,1
9
6,1*/(&(//B 287
.#H-/3&%4SWITCHING3ECTION
'
*
6
4
6711) /
'
*
6
4
6711) /
5
.
5
.
5
.
5
.
5
.
5
.
-
&21
-
&21
4
675
4
675
-
&21
-
&21
5
0
5
0
-7$*B-7'2B3%
57&.
'%*54
'%*$&.
-7$*B-17567B3%
-7$*B-706B3$
-7$*B-7&.B3$
-7$*B-7',B3$
9
Q567
9
-7$*&211(&725
5
N
5
N
5
N
5
N
5
N
5
N
5
N
5
N
5
5
5
N
5
N
5
N
5
N
-
-7$*B&211
-
-7$*B&211










 5
N
5
N
5
N
5
N
83B 3$
0(18B3%
9
'2:1B3&
(17(5B3$
6:,7&+(6
&
Q)
&
Q)
&
Q)
&
Q)
&
Q)
&
Q)
6:6:
5
0
5
0
5
0
5
0
6:6:
5
0
5
0
5
0
5
0
6:6:
6:6:
&
Q)
&
Q)
UM1481 Hardware schematic
Doc ID 022389 Rev 1 45/55
Figure 44. USB and 5 V output section
!-V
/'B/ %2B3%
86%'3B3$
86%'0B3$
86%B38B3&
86%9
86%B'3
B ,1
B ,1
*1'
B 287
B ,1
9%$7B%
86%B'0
86%B'3
86%9
53"3%#4)/.
6/,4 /54054
86%0LFUR%FRQQHFWRU
5 .5 .
5
N
5
N
&
S)
&
S)
8
76 ,/7
8
76 ,/7
5HI
&DWKRGH
$QRGH
--
86%B9&&
86%'0
86%'3
86%B*1'
6+(//
6+(//
,'
5
.
5
.
&
X)9
&
X)9
&
S)
&
S)
5
0
5
0
&
X)
&
X)
5
0
5
0
&
S)
&
S)
5
0
5
0
8
(6'$8/&%3
8
(6'$8/&%3
1&
*1'
,2
,2
,2
1&
5
0
5
0
8
670 5: ;)
8
670 5: ;)
9FF
9VV
567
5
N
5
N
/
X+
/
X+
&
Q)
&
Q)
8
/ '
8
/ '
)%
/%,
/%2
5()
*5281'
6+'1
287
/;
5
N
5
N
&
X)9
&
X)9
5

5

&
Q)
&
Q)
5

5

UM1481 Bill of material
Doc ID 022389 Rev 1 46/55
10 Bill of material
Table 21. Bill of material
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
ST devices
U1
STM32 low-density USB
access line, 48-pin, 32 K
Flash, 6 K RAM
LQFP48 STMicroelectronics STM32F102C8T6A
U10 Reset circuit SOT23-3 (WX) STMicroelectronics STM1816RWX7F
U3
ESDAULC6-3BP6 ESD
protection for high-speed
interface
SOT-666 STMicroelectronics ESDAULC6-3BP6
U4 Battery monitor IC with
Coulomb counter/gas-gauge
TDFN 3.0 X 2.0 X
0.75 STMicroelectronics STC3105IQT
U5 Step-up converter TSSOP8 STMicroelectronics L6920D
U6
800 mA standalone linear Li-
Ion
battery charger with thermal
regulation
TSOT23-5L STMicroelectronics STC4054GR
U7
Low drop fixed and
adjustable positive voltage
regulators
SOT-223 STMicroelectronics LD1117AS33TR
D5, D6 STPS1L30U (low drop power
Schottky rectifier) SMB STMicroelectronics STPS1L30U
Q7 DUAL P-channel 20 V
STripFET™ Power MOSFET SO-8 STMicroelectronics STS4DPF20L
U8
Very low drop and low noise
voltage regulator low ESR
capacitors compatible, with
inhibit function. (1.8 V)
SOT23-5L STMicroelectronics LD2985BM18R
Bill of material UM1481
47/55 Doc ID 022389 Rev 1
ST devices
Q6 N-channel 30 V STripFET
II power MOSFET SOT-223 STMicroelectronics STN4NF03L
Q5, Q8, Q9 Low voltage fast-switching
NPN power transistor SOT-23 STMicroelectronics 2STR1230
Q3 Low voltage fast-switching
PNP power transistor SOT-23 STMicroelectronics 2STR2215
U9 Single Schmitt inverter SOT323-5L STMicroelectronics 74V1G14CTR
U11, U12 Programmable shunt voltage
reference SOT23-3L STMicroelectronics TS3431ILT
Crystal and
oscillator Y1 Quartz crystal 8 MHz SMD ECS Inc ECS-80-S-5PX-TR Digi-Key XC1243CT-ND
Connectors
and
jumpers
J1 JTAG connector
Box header, right
angle, 20-way,
2x10-pin, 2.54
mm x 2.54 mm
pitch
Protectron P9604-20-15-1
J6 Power jack 2.5 mm
Socket, DC power,
2.5 mm, right
angle, locking type
Protectron PDCJ01-08 Protectron PDCJ01-08
J3, J4, J7,
J10, J11,
J16 and J17
CON3 1x3 header, 2.54
mm pitch Any
Table 21. Bill of material (continued)
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
UM1481 Bill of material
Doc ID 022389 Rev 1 48/55
Connectors
and
jumpers
J9 CON5
1x5 header 2.54
mm x 2.54 mm
pitch
1
J12, J13,
J14
Header, top entry, 2-way,
through hole vertical
plug
2-pin through hole
vertical plug,
5.08 mm pitch
WEIDMULLER SL 5.08/2/180 Farnell Part#
1121826
J12, J13,
J14
Socket block, screw, 2-way,
26-14AWG, pitch spacing:
5.08 mm
Pluggable
terminal block, no.
of contacts: 2
WEIDMULLER BL 5.08/2 Farnell Part#
1131811
J2 LCD_connector 14022 1x16 header, 2.54
mm pitch Any
J5 USB micro-B connector SMD Molex 47589-0001 MOUSER 538-47589-0001
J15 BATT and LOAD_CONN
Header 4-pin, 1x4
way, 2.54 mm
pitch
Any
J8 µSD connector SMD Proconn
Technology MSPN09-D0-1002 1
Capacitors
C14, C16,
C32 15 pF SMD0805 Any
C1,C3 20 pF SMD0805 Any
C15 4.7 nF SMD0805 Any
Table 21. Bill of material (continued)
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
Bill of material UM1481
49/55 Doc ID 022389 Rev 1
Capacitors
C2,C4,C5,
C6,C7,C8,
C9,C10,C11,
C17,C21,
C22,C33
100 nF SMD0805 Any
C19,C29,
C30,C31 1 µF SMD0805 Any
C35,C36 22 pF SMD0805 Any
C18,C20 47 µF/16 V
EIA 3216-18/ size
B or aluminum
electrolytic
capacitors - SMD
25 V 47 µF 20%
5X5.7
Any/Lelon Any/VZS470M1ETR-
0506
Any/
Mouser
140-
VZS470M1ETR05
06
C23 100 µF/16 V
Aluminum
electrolytic
capacitors -
leaded 100 µF 16
V
Panasonic-ECG ECE-A1CKA101 Mouser 667-ECE-
A1CKA101
C28 2.2 µF SMD0805 Any
C33,C34 4.7 µF SMD0805 Any
LEDs D2,D3,D7,
D13 (red) LED SMD0805 Any
Inductors L1 10 µH SMD Coiltronics/Div of
Cooper/Bussmann SD53-100-R Digi-Key 513-1457-1-ND
Resistors
R1,R10,R12,
R49(DNM),
R61(DNM),
0 SMD0805 Any
Table 21. Bill of material (continued)
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
UM1481 Bill of material
Doc ID 022389 Rev 1 50/55
Resistors
R22, R23,
R54,R63 330 ΩSMD0805 Any
R24 3.3 kΩSMD0805 Any
R2,R3,R4,
R5,R13,R15,
R18,R19,R5
8,R72,R74
10 kΩSMD0805 Any
R25,R26 22 ΩSMD0805 Any
R27,R29,R3
0,R32,R33,
R47,R62,
R70,R60
1 kΩSMD0805 Any
R6,R7,R8,
R9,R11,R14,
R20,R21,R2
8,R44,R46,
R48,R51,R5
2,R59,R68
1 MΩSMD0805 Any
R31,R41 1.5 kΩSMD0805 Any
R34 100 ΩSMD0805 Any
R36 150 ΩSMD0805 Any
R37,R53 2.2 kΩSMD0805 Any
R38,R39 4.7 kΩSMD0805 Any
R40
Resistor, metal strip, 0.02 Ω
0.5%
0.5 W
SMD01206 OHMITE OHMITE
LVK12R020DER Farnell Part#
1462292
R43 2.8k (1%) SMD0805 Any
R35,R42 10 M SMD0805 Any
Table 21. Bill of material (continued)
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
Bill of material UM1481
51/55 Doc ID 022389 Rev 1
Resistors
R45 2.2 MΩSMD0805 Any
R50, R71 470 kΩSMD0805 Any
R64, 65, 67,
R73 100 kΩSMD0805 Any
R47 33 kΩSMD0805 Any
R69 330 kΩSMD0805 Any
Switches
SW1, SW2,
SW3, SW4,
SW5
Pushbutton switch, SMD
Tactile switch,
SPNO, SMD.
6 mm x 3.5 mm
MULTICOMP DTSM-32S-B Farnell Part# 9471898
SW7, SW8 Slide Switch, 2 position,
Vertical, BlacK T/H
Through hole,
3.0 mm pitch TE connectivity SLS121PC04 Digi-Key 450-1598-ND
Others Oriole LCD, 16 x 2 alpha
numeric LCD Modular Oriole
Table 21. Bill of material (continued)
Category Ref. design. Component description Package Manufacturer
Manufacturer’s
ordering code /
orderable part
number or equivalent
Supplier Supplier
ordering code
References UM1481
52/55 Doc ID 022389 Rev 1
11 References
1. STC3105 datasheet
2. STM32 datasheet
UM1481 Abbreviations
Doc ID 022389 Rev 1 53/55
12 Abbreviations
Table 22. Abbreviations
Term Meaning
SOC Battery state of charge i.e. capacity/charge available in battery
LED Light emitting diode
LDO Low dropout regulator
MCU Microcontroller unit
GUI Graphical user interface
LCD Liquid crystal display
mAH Milli-ampere hour
USB Universal serial bus
Li-Ion Lithium Ion
MOSFET Metal oxide semiconductor field effect transistor
uSD Micro SD card
Revision history UM1481
54/55 Doc ID 022389 Rev 1
13 Revision history
Table 23. Document revision history
Date Revision Changes
07-Aug-2012 1 Initial release.
UM1481
Doc ID 022389 Rev 1 55/55
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.
© 2012 STMicroelectronics - All rights reserved
STMicroelectronics group of companies
Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan -
Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America
www.st.com