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 gasgauge. 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. August 2012 STEVAL-ISB012V1 single cell Li-Ion battery monitor and gas-gauge based on the STC3105 Doc ID 022389 Rev 1 1/55 www.st.com Contents UM1481 Contents 1 Key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 2 3 Typical applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Setting up the board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 Hardware layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 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 6 7 2/55 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 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 Hardware design description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.1 Microcontroller (STM32) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.2 Battery monitor IC (STC3105) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 7.3 ESD protection device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Doc ID 022389 Rev 1 UM1481 8 Contents 7.4 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.5 STC4054 charger IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 7.6 Power MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 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 Doc ID 022389 Rev 1 3/55 List of tables UM1481 List of tables Table 1. Table 2. Table 3. Table 4. Table 5. Table 6. Table 7. Table 8. Table 9. Table 10. Table 11. Table 12. Table 13. Table 14. Table 15. Table 16. Table 17. Table 18. Table 19. Table 20. Table 21. Table 22. Table 23. 4/55 LED description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Microcontroller details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Maximum capacity and charge register LSB resolution for various values of Rsense . . . . 33 STC3105 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 USBLC6 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Power MOSFET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Pin description of JTAG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 USB connector pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 LCD connector pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 ALM pin connection of STC3105 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 SDA pin for I2C communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 SCL pin for I2C communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Pinout for external microcontroller connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Jumper J3 configuration details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Jumper J15 configuration details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Terminal block J12 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Terminal block J14 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Terminal block J13 details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Doc ID 022389 Rev 1 UM1481 List of figures List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. Figure 31. Figure 32. Figure 33. Figure 34. Figure 35. Figure 36. Figure 37. Figure 38. Figure 39. Figure 40. Figure 41. Figure 42. Figure 43. Figure 44. STEVAL-ISB012V1 single cell Li-Ion battery monitor and gas-gauge based on the STC3105. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 STEVAL-ISB012V1 single cell Li-Ion battery monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Hardware layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 System architecture details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Data screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Display flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Welcome message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Battery absent message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Battery low indication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Battery parameters display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Main menu screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Relaxation time display on LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Battery current display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Battery voltage display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Entry of parameters related to SOC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Message after entering value of parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Wrong value entry message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Total capacity display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Change in the name of total capacity after complete learning of capacity . . . . . . . . . . . . . 18 Alarm parameter setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Low voltage alarm setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Relaxation counter current threshold value entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 My computer hardware properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Board appearing as a COM port device under device manager. . . . . . . . . . . . . . . . . . . . . 21 HyperTerminal settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 COM port property settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 HyperTerminal display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 GUI installation step 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 GUI installation step 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 GUI installation step 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 GUI installation step 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 GUI installation step 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Board connection command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Board connected. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Key parameter page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Other battery parameters page. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Battery log and graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 JTAG connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Micro-B USB connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Power supply connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Microcontroller and battery monitoring section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Battery charger and regulator section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Switches and MOSFET switching section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 USB and 5 V output section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Doc ID 022389 Rev 1 5/55 Key features 1 1.1 6/55 UM1481 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. 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. Doc ID 022389 Rev 1 UM1481 Getting started 2 Getting started 2.1 Package The STEVAL-ISB012V1 demonstration board package includes the following: Hardware content - - User manual (this document) - Schematics, Gerber files, BOM list Microcontroller firmware - 2.2 Demonstration board STEVAL-ISB012V1 Documentation Pre-programmed STM32F102C8T6 device soldered onto the demonstration board. Virtual COM port driver Gas-gauge application GUI. Setting up the board The following steps should be taken to set up the board: 1. 2. 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. 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). Doc ID 022389 Rev 1 7/55 Getting started 3. UM1481 Displaying battery parameters on PC HyperTerminal - Figure 2. To display battery parameters on the HyperTerminal, connect the micro-B cable and open a new HyperTerminal window. Details are given in Figure 2. STEVAL-ISB012V1 single cell Li-Ion battery monitor *4!' CONNECTOR 2ESET SWITCH 3WITCH 37 3TATUS ,%$3 %XTERNAL CHARGER CONNECTOR 3WITCH 37 "ATTERY CONNECTOR 53" CONNECTOR %XTERNAL LOAD CONNECTOR 0OWER *ACK ,I )ON BATTERY PACK -#5 8/55 34# -ENU NAVIGATION KEYS %XTERNAL MOCRO CONNECTOR Doc ID 022389 Rev 1 *UMPER * !-V UM1481 2.3 Getting started 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 *4!' CONNECTOR 2ESET SWITCH 3WITCH 37 3TATUS ,%$S %XTERNAL CHARGER CONNECTOR 3WITCH 37 "ATTERY CONNECTOR 53" CONNECTOR ,OAD CONNECTOR 0OWER *ACK "ATTERY AND LOAD CONNECTOR 34# -#5 .AVIGATION #RYSTAL KEYS %XTERNAL MICRO CONNECTOR *UMPER * !-V Doc ID 022389 Rev 1 9/55 System overview UM1481 3 System overview 3.1 General description of product architecture Figure 4. System architecture details System architecture details 10/55 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. Doc ID 022389 Rev 1 UM1481 3.2 System overview 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. 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. Doc ID 022389 Rev 1 11/55 System overview 9. UM1481 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: 12/55 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. Doc ID 022389 Rev 1 UM1481 4 User interface section 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 0OWER/. 7ELCOME-ESSAGE 9%3 ,OW3/# #HECK ,OW VOLTAGEOR 3/# 3HOW,OW 3/#!LARM ,OW6OLT )F ,OW "ATTERY !LARM ./ 3HOW"ATTERYPARAMETERS 6 ) 3/#ETC #HECK -ENU +EYS 0RESSED 3HOW,OW 6OLT !LARM ./ 9%3 2EGISTER "ATTERY 3TATUS #URRENT 2EMAINING #URRENT 2ELAXATION 6OLTAGE 3ETTINGS $EVICE )$ )NFO 2EG #HARGE 2EG #HARGE 2EG #OUNTER $EVICE)$(%8 %NTER 3ELECT-ODE 2EG#OUNTER(IGH 3/#!,-4( 2EG #URRENT 6OLTAGE !,- 2EG #URRENT 2EG6OLTAGE,OW 2LX4IMER #URRENT 4( 2EG6OLTAGE(IGH 4OTA L #APACITY 2EG3/#"ASE,OW 3/#!LARM 2EG3/#"ASE(IGH 2EG3/#!,- ,OW 6OLT !LARM 2EG3/#!,- ,OW 2EG6OLT !LARM 2EG2LX4IME 4HRS 2EG2LX4IME !-V Doc ID 022389 Rev 1 13/55 User interface section UM1481 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 14/55 Doc ID 022389 Rev 1 UM1481 User interface section 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. Doc ID 022389 Rev 1 15/55 User interface section UM1481 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: 16/55 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. Doc ID 022389 Rev 1 UM1481 STC3105 parameter setting and display 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 Doc ID 022389 Rev 1 17/55 STC3105 parameter setting and display UM1481 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. 18/55 Doc ID 022389 Rev 1 UM1481 STC3105 parameter setting and display 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. Doc ID 022389 Rev 1 19/55 STC3105 parameter setting and display 5.4 UM1481 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 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 Alarm LED Alarm situation, refer to message on display No alarm Alarm occurred, refer to displayed message to see type of alarm D13 20/55 LED description Doc ID 022389 Rev 1 UM1481 5.6 STC3105 parameter setting and display 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 Doc ID 022389 Rev 1 21/55 STC3105 parameter setting and display UM1481 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 22/55 Doc ID 022389 Rev 1 UM1481 STC3105 parameter setting and display 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. Doc ID 022389 Rev 1 23/55 Graphical user interface application 6 UM1481 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 24/55 Doc ID 022389 Rev 1 UM1481 Graphical user interface application Figure 29. GUI installation step 2 Accept the license agreement and click Next. Figure 30. GUI installation step 3 Doc ID 022389 Rev 1 25/55 Graphical user interface application UM1481 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 26/55 Doc ID 022389 Rev 1 UM1481 6.2 Graphical user interface application Board initialization Figure 33. Board connection command "OARD CONNECTION COMMAND !-V Doc ID 022389 Rev 1 27/55 Graphical user interface application UM1481 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. 28/55 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). Doc ID 022389 Rev 1 UM1481 Graphical user interface application 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). Doc ID 022389 Rev 1 29/55 Graphical user interface application UM1481 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: 30/55 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. Doc ID 022389 Rev 1 UM1481 Graphical user interface application Figure 37. Battery log and graph Note: For more details please refer to the help file available in the GUI. Doc ID 022389 Rev 1 31/55 Hardware design description 7 UM1481 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 CortexTM-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 Table 2. 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 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. 32/55 Doc ID 022389 Rev 1 UM1481 7.2 Hardware design description 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. 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 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 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 Doc ID 022389 Rev 1 33/55 Hardware design description 7.3 UM1481 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. Table 5. 7.4 USBLC6 details Feature Description Order code ESDAULC6-3BP6 Package SOT-666 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. Table 6. 7.5 Voltage regulator Feature Description Sales type LD1117AS33TR Package SOT-223 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 7. 34/55 Voltage regulator Feature Description Order code STC4054GR Package TSOT23-5L Doc ID 022389 Rev 1 UM1481 7.6 Hardware design description 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 Doc ID 022389 Rev 1 35/55 Connectors and jumpers UM1481 8 Connectors and jumpers 8.1 JTAG connector Figure 38. JTAG connector $EBUG *4!' PORT !-V Table 9. Pin description of JTAG Pin Number Description Pin number Description 1 3.3 V power 2 3.3 V power 3 TRST 4 GND 5 TDI 6 GND 7 TMS 8 GND 9 TCK 10 GND 11 RTCK 12 GND 13 TDO 14 GND 15 nSRST 16 GND 17 DBGRQ 18 GND 19 DBGACK 20 GND The JTAG connector is available on the board for re-programming the microcontroller and debugging. 36/55 Doc ID 022389 Rev 1 UM1481 8.2 Connectors and jumpers 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 6 SHIELD 7 SHIELD 8 SHIELD 9 SHIELD Doc ID 022389 Rev 1 37/55 Connectors and jumpers 8.3 UM1481 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. 38/55 LCD connector pin description Pin no. Details 1 GND 2 3.3 V 3 Contrast - connect to 3.3 V through resistor 4 RS 5 GND 6 Enable 7 GND 8 GND 9 GND 10 GND 11 D4 12 D5 13 D6 14 D7 15 3.3 V 16 GND Doc ID 022389 Rev 1 UM1481 8.5 Connectors and jumpers Jumper J7 Table 12. 8.6 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 Jumper J10 Table 13. 8.7 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 Jumper J11 Table 14. 8.8 ALM pin connection of STC3105 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 Jumper J9: external MCU connection 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 Doc ID 022389 Rev 1 39/55 Connectors and jumpers 8.9 UM1481 Jumper J3 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 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. Table 17. 8.11 Description 1-2 For load connection 2-3 For battery connection Terminal block J12 details Pin Description CHG+ Charger positive terminal CHG- Charger negative terminal Terminal block J14 Table 19. 40/55 Jumper Terminal block J12 Table 18. 8.12 Jumper J15 configuration details Terminal block J14 details Pin Description B+ Battery positive terminal B- Battery negative terminal Doc ID 022389 Rev 1 UM1481 8.13 Connectors and jumpers Terminal block J13 Table 20. Terminal block J13 details Pin Description Load+ External load positive terminal Load- External load negative terminal 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. Doc ID 022389 Rev 1 41/55 Hardware schematic 9 UM1481 Hardware schematic Figure 41. Microcontroller and battery monitoring section -)#2/#/.42/,,%2 3%#4)/. & S) 26&B,1 < 0+] 5 0 %227 5 %227 5 & S) Q567 & 9 5 0 Q) 6: 9''B 966B 3% 3% %227 3% 3% 3% 3% 3% 3$ 3$ 8 9 *1' 0(18B3% &)*B3% %227 ,&B6'$B3% ,&B6&/B3% 67&B$/0B3% -7$*B-17567B3% -7$*B-7'2B3% -7$*B-7',B3$ -7$*B-7&.B3$ 26&B287 9 & Q) & Q) & Q) & Q) 9%$7 3&B$17B7$03 3&B26&B,1 3&B26&B287 3'B26&B,1 3'B26&B287 1567 670)&7 966$ 9''$ 3$B:.83 3$ 3$ 9''B 966B 3$ 3$ 3$ 3$ 3$ 3$ 3% 3% 3% 3% 9 *1' -7$*B-706B3$ 86%'3B3$ 86%'0B3$ /2$'B6:B3$ 3$ 83B3$ /&'B'B3% /&'B'B3% /&'B'B3% /&'B'B3% *1' 3$ 3$ 3$ 3$ 3$ 3% 3% 3% 3% 3% 966B 9''B 9 86%B38B3& &)*B3& '2:1B3& 26&B,1 26&B287 Q567 *1' 9 (17(5B3$ /&'B56B3$ /&'B(B3$ 9 9 9 9 &)*B3% *1' &21 ' 5 &21 ' - &)*B3& *1' 5 . - %227 /'B/%2B3% /('B3% *1' 9 5 . &+5*B3$ 06'B166B3$ 06'B6&.B3$ 06'B0,62B3$ 06'B026,B3$ /('B3% 9 5 /('B3% #/.&)'52!4)/. *5-0%23 5 0 34# "!44%29 -/.)4/2).' )# ' 8 67&B $/0 4 675 67&B 6'$ 67&B 6&/ 5 9,1 6'$ 67& ,47 & S) 5 N ' /(' 5 N & S) 9&& &* 5 9 5 & Q) 1& 6&/ 9%$7B% 5 N $/0 *1' 5 6: &*B% 9 5 /('B3% 5 PLOOLRKP 5 & 0 X) 5 . 67&B %$7 &DWKRGH $QRGH 9%$7B% (;7B&+* 5HI 8 76 ,/7 32:(56(/(&7,21 9 ./4% #/..%#4 '.$ 0). /& 34# $)2%#4,9 7 )4( 3(5. 4 2%3)34/2 ./4 4(2/5'( '.$ 0,!.% !-V 42/55 Doc ID 022389 Rev 1 UM1481 Hardware schematic Figure 42. Battery charger and regulator section %84%2.!, #/.42/,,%2 3%,%#4)/. *5-0%23 ,#$ 3%#4)/. - - 67&B $/0B3% 67&B $/0 (;7B67&B $/0 966 9'' 9 56 5: ( '% '% '% '% '% '% '% '% /(' /(' &21 9 5 N /&'B56B3$ - (;7B67&B $/0 (;7B67&B 6'$ (;7B67&B 6&/ /&'B(B3$ 5 N 5 N 5 N 5 N /&'B'B3% /&'B'B3% /&'B'B3% /&'B'B3% &21 - ,&B6'$B3% 67&B 6'$ (;7B67&B 6'$ &21 5 - 9 ,&B6&/B3% 67&B 6&/ (;7B67&B 6&/ &21 /&'B&211(&725 - 7!,, !$!04/2 :$//B$'37 !-V Doc ID 022389 Rev 1 43/55 Hardware schematic UM1481 Figure 43. Switches and MOSFET switching section -/3&%4 37)4#().' 3%#4)/. 5 N 9%$7B% 5 0 4 675 5 N /2$'B6:B3$ 5 . 5 N 5 . 5 . 9 4 675 4 676'3)/ & X) /2$' 6,1*/(&(//B287 9 8 & X) %<3$66 & X) ,1+,%,7 *1' 5 ,1 5 0 /' %05 9&& 287 < *1' $ 1& B ,1 8 9*&75 9%$7B% %ITHER MOUNT 1 2 AND 2 OR 5! AND 2 9 6:,7&+(6 . #H -/3&%4 SWITCHING 3ECTION 9%$7B% 5 0 6: 4 6711)/ * 5 - &21 6 675 4 6: 0(18B3% & Q) 5 5 . 5 0 & Q) ' . 5 0 (17(5B3$ 5 0 9 5 0 6,1*/(&(//B287 6: . '2:1B3& B 287 & Q) B ,1 6: 83B3$ - &21 & Q) -7$*&211(&725 9 5 N 5 N 5 N 5 N 5 - 9 -7$*B-17567B3% 5 N -7$*B-7',B3$ -7$*B-706B3$ -7$*B-7&.B3$ 57&. -7$*B-7'2B3% 5 N Q567 '%*54 5 N '%*$&. 5 N -7$*B&211 !-V 44/55 Doc ID 022389 Rev 1 UM1481 Hardware schematic Figure 44. USB and 5 V output section 53" 3%#4)/. 86%9 & X) & S) 5 86%'0B3$ 6+(// 6+(// 86%B9&& 86%'0 86%'3 ,' 86%B*1' 8 1& 86%0LFUR%FRQQHFWRU & Q) ,2 5 0 & S) 1& 86%9 86%B'0 86%B'3 - *1' ,2 ,2 5 86%'3B3$ (6'$8/&%3 86%B'3 & S) 5 N 86%B38B3& 6/,4 /54054 B 287 B ,1 & X)9 5 N 8 *1' /'B/ %2B3% 5 N )% 287 /%, /; /%2 *5281' 5() 6+'1 / B ,1 X+ & X)9 / ' & Q) 5 . 9%$7B% 5 B ,1 5 0 8 . 5 0 9FF $QRGH 5HI 8 76 ,/7 567 9VV &DWKRGH 5 0 670 5:;) !-V Doc ID 022389 Rev 1 45/55 Bill of material Table 21. Bill of material Category Doc ID 022389 Rev 1 ST devices UM1481 10 Component description Package Manufacturer 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 U5 Step-up converter TSSOP8 STMicroelectronics L6920D U6 800 mA standalone linear LiIon 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 STripFETTM 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 TDFN 3.0 X 2.0 X STMicroelectronics 0.75 Supplier Supplier ordering code STC3105IQT Bill of material 46/55 Ref. design. Manufacturer's ordering code / orderable part number or equivalent Category ST devices Doc ID 022389 Rev 1 Crystal and oscillator Connectors and jumpers Bill of material (continued) Ref. design. Component description Package Manufacturer Manufacturer's ordering code / orderable part number or equivalent Q6 N-channel 30 V STripFETTM 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 Y1 Quartz crystal 8 MHz SMD ECS Inc ECS-80-S-5PX-TR 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 J3, J4, J7, J10, J11, J16 and J17 CON3 1x3 header, 2.54 mm pitch Any Supplier Supplier ordering code Digi-Key XC1243CT-ND Protectron PDCJ01-08 Bill of material 47/55 Table 21. UM1481 Category Doc ID 022389 Rev 1 Connectors and jumpers Capacitors Bill of material (continued) Ref. design. Component description Package Manufacturer J9 CON5 1x5 header 2.54 mm x 2.54 mm pitch J12, J13, J14 Header, top entry, 2-way, through hole vertical plug 2-pin through hole vertical plug, 5.08 mm pitch WEIDMULLER Pluggable terminal block, no. of contacts: 2 WEIDMULLER Manufacturer's ordering code / orderable part number or equivalent Supplier Supplier ordering code UM1481 Table 21. 1 J12, J13, J14 Socket block, screw, 2-way, 26-14AWG, pitch spacing: 5.08 mm J2 LCD_connector 14022 1x16 header, 2.54 mm pitch Any J5 USB micro-B connector SMD Molex J15 BATT and LOAD_CONN Header 4-pin, 1x4 way, 2.54 mm pitch Any J8 SD connector SMD Proconn Technology C14, C16, C32 15 pF SMD0805 Any C1,C3 20 pF SMD0805 Any C15 4.7 nF SMD0805 Any Farnell Part# 1121826 BL 5.08/2 Farnell Part# 1131811 47589-0001 MOUSER 538-47589-0001 SL 5.08/2/180 MSPN09-D0-1002 1 Bill of material 48/55 Category Bill of material (continued) Manufacturer's ordering code / orderable part number or equivalent Supplier Supplier ordering code Doc ID 022389 Rev 1 Component description Package Manufacturer 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 47 F/16 V EIA 3216-18/ size B or aluminum electrolytic capacitors - SMD 25 V 47 F 20% 5X5.7 Any/Lelon Any/VZS470M1ETR0506 Any/ Mouser 140VZS470M1ETR05 06 C23 100 F/16 V Aluminum electrolytic capacitors leaded 100 F 16 V Panasonic-ECG ECE-A1CKA101 Mouser 667-ECEA1CKA101 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 Capacitors C18,C20 UM1481 Ref. design. Bill of material 49/55 Table 21. Category Doc ID 022389 Rev 1 Resistors Bill of material (continued) Component description Package Manufacturer 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 R43 2.8k (1%) SMD0805 Any R35,R42 10 M SMD0805 Any Supplier Supplier ordering code OHMITE LVK12R020DER Farnell Part# 1462292 Bill of material 50/55 Ref. design. Manufacturer's ordering code / orderable part number or equivalent UM1481 Table 21. Category Resistors Doc ID 022389 Rev 1 Switches Others Bill of material (continued) Manufacturer's ordering code / orderable part number or equivalent Supplier Supplier ordering code Ref. design. Component description Package Manufacturer 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 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 Oriole LCD, 16 x 2 alpha numeric LCD Modular Oriole Bill of material 51/55 Table 21. UM1481 References 11 52/55 UM1481 References 1. STC3105 datasheet 2. STM32 datasheet Doc ID 022389 Rev 1 UM1481 12 Abbreviations 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 Doc ID 022389 Rev 1 53/55 Revision history 13 UM1481 Revision history Table 23. 54/55 Document revision history Date Revision 07-Aug-2012 1 Changes Initial release. Doc ID 022389 Rev 1 UM1481 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. (c) 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 Doc ID 022389 Rev 1 55/55