Texas Instruments | bq27220 Calibration | Application notes | Texas Instruments bq27220 Calibration Application notes

Texas Instruments bq27220 Calibration Application notes
Application Report
SLUA771 – May 2016
bq27220 Calibration Guide
Fernando Lopez Dominguez
................................................................................... PMP/BMS/Handheld
ABSTRACT
The bq27220 includes one-time programmable (OTP) profiles that allow users to program the settings that
would otherwise be required to be initialized in RAM after powering up. Calibration data is one of the
included subsets of data that can be programmed in to OTP. This guide goes over the process on how to
calibrate the bq27220 using the provided TI tools and how to transfer that to OTP.
1
2
3
4
Contents
Tools Required for Calibration .............................................................................................
Operation .....................................................................................................................
Calibration Process ..........................................................................................................
OTP Mode FlashStream (ot.fs) Files ......................................................................................
1
1
3
5
List of Figures
Registers Screen
2
Data Memory Screen........................................................................................................ 3
3
Calibration Screen ........................................................................................................... 4
4
Typical ot.fs File Snippet .................................................................................................... 5
5
Launch bqStudio Software
6
7
8
9
10
11
12
13
14
1
............................................................................................................
1
2
................................................................................................. 8
Load .GG File ................................................................................................................ 9
Confirm or Update Data Memory Parameters .......................................................................... 10
Update Battery ID .......................................................................................................... 10
Save .OTFS File ............................................................................................................ 11
Launch SmartFlash Software ............................................................................................. 12
Open .OTFS File ........................................................................................................... 12
Apply 7.4 V .................................................................................................................. 13
Program OTP ............................................................................................................... 13
Confirm Success ........................................................................................................... 14
Tools Required for Calibration
The following tools are required for calibration:
• bq27220EVM with EV2400
• 2x power supplies, one for powering the gauge; another, for the OTP programming voltage.
• DC load capable of at least 1 A.
• bqStudio (minimum v1.3.51)
• SmartFlash
2
Operation
This section details the operation of the bq27220 bqStudio software.
All trademarks are the property of their respective owners.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
1
Operation
2.1
www.ti.com
Starting the Program
With the EV2300 or EV2400 and the bq27220EVM connected to the computer, run bqStudio from the
desktop or installation directory. The window consists of a tools panel at the top, and other child windows
that can be hidden, docked in various positions, or allowed to float as separate windows. When bqStudio
first starts up, the DashBoard, the Registers, and the Commands windows should be open. Additional
windows can be added by clicking the corresponding icons in the tools panel at the top of the main
window.
The Scan (continuous scan) or Refresh (single time scan) buttons can be clicked in order to update the
data in the Registers and Data Memory windows.
bqStudio provides a logging function which logs selected Data Registers last received from the bq27220.
To enable this function, click the Start Log button. The default elapsed interval is 4000 milliseconds, to
change this interval, go to Windows, select Preferences, choose Registers, and change Scan/Log Interval
from 4000 to 1000 milliseconds. There is no need to log faster than 1 second as the gauge will not update
the registers faster than 1 second.
Figure 1. Registers Screen
2.2
Setting Programmable bq27220 Options
The bq27220 comes configured per the default settings detailed in the bq27220 Technical Reference
Manual (TRM – SLUUBD4) . Ensure that the settings are correctly changed to match pack and application
for the bq27220 solution being evaluated.
NOTE: The correct setting of these options is essential to get the best performance. The settings
can be configured using the Data Memory window (Figure 2).
2
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
Calibration Process
www.ti.com
Figure 2. Data Memory Screen
To read all the data from the bq27220 RAM, OTP, and non-volatile memory, click on the Read All button
on the Data Memory window. Make sure the device is not sealed and in full access to read/write to the
data memory. To update a parameter in RAM, click on the desired parameter and a window will pop-up
that provides details on the selected parameter. Next, enter the value in the value textbox and press
Enter. After Enter has been pressed, bqStudio will update the selected parameter.
See the TRM (SLUUBD4) for details on how to program the OTP values on the bq27220.
The Import button in the Data Memory window can be clicked in order to import an entire configuration
from a specified *.gg.csv file.
The configuration can be saved to a file by clicking the Export button in the Data Memory window and
entering a file name. The configuration will be saved to a *.gg.csv file. The module calibration data is also
held in the bq27220 data memory. If the Gauge Dashboard is not displaying any information, then the
bq27220 may not be supported by the bqStudio version that is being used, a bqStudio upgrade may be
required.
3
Calibration Process
The process to calibrate and program the OTP on the bq27220 is as follows:
1. Connect the bq27220 to bqStudio using the EV2400.
2. Perform the calibration storing the calibration data in RAM.
3. Use bqStudio to generate the ot.fs file required for OTP programming.
4. Use SmartFlash to program the OTP profile on the gauge.
See the following sections detailing the steps.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
3
Calibration Process
3.1
www.ti.com
Calibration
The bq27220 must be calibrated to ensure accurate value reporting. This can be done by going to the
Calibration window in bqStudio.
Figure 3. Calibration Screen
NOTE: Please ensure the gauge is unsealed and in full access before proceeding with the
calibration procedure. See the TRM for details on how to unseal and place the gauge in full
access.
Calibration consists of the following:
• CC Offset/Board Offset: Simply check Calibrate CC Offset and Calibrate Board Offset and click
Calibrate Gas Gauge to calibrate the Coulomb counter and board offsets. Ensure no current is flowing
through the sense resistor during these steps. After a successful calibration, a green check mark
shows next to the Calibrate Gas Gauge button.
• Current: Connect a 2-A load to LOAD+/LOAD– or a current source to LOAD–/PACK–. Ensure the
measured current reported is negative, or else reverse the connections. Check Calibrate Current and
enter the current into the textbox followed by Calibrate Gas Gauge.
• Voltage: Apply a known DC voltage to PACK+/PACK– with no current flowing through the sense
resistor. Check Calibrate Voltage and enter the voltage into the textbox followed by Calibrate Gas
Gauge.
Once these steps are completed, program the design parameters for the application in RAM. Once both
the design and calibration parameters are verified, the ot.fs file can be generated. This file is used to
program the OTP profile by using SmartFlash.
The OTP profile must be programmed in its entirety using the ot.fs. In order to avoid programming
incorrect values, validate the configuration files before programming the OTP, for example, test out the
values in RAM and ensure performance is acceptable before proceeding with writing to OTP.
4
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
OTP Mode FlashStream (ot.fs) Files
www.ti.com
4
OTP Mode FlashStream (ot.fs) Files
The Battery Management Studio (bqStudio) software allows generation of specific instruction files (ot.fs
files), containing the necessary I2C commands a host can send to the bq27220 device to program the
RAM-based data memory parameters. The commands in these files are largely ROM commands only
used when the gauge is in CONFIG_UPDATE mode.
The ot.fs file is an ASCII text file containing commands and data. Each line of the file represents one
command and potentially 96 bytes of data, as described in the following text. No row contains more than
96 data bytes. The first two characters of each row represent the command, followed by a ":
"W:" — Indicates that the row is a command to write one or more bytes of data.
"C:" — Indicates that the row is a command to read and compare one or more bytes of data.
"X:" — Indicates that the row is a command to wait a given number of milliseconds before proceeding.
White space is used to separate fields within the ot.fs files. Each row contains only one of the four
commands. The commands discussed in this section can be implemented by a system that can perform
multi-byte or single-byte operations for I2C.
Figure 4 shows a typical ot.fs file snippet generated from the bqStudio software.
Figure 4. Typical ot.fs File Snippet
4.1
Write Command
The write command "W:" instructs the I2C master to write one or more bytes to a given I2C address and
given register address. The I2C address format used throughout this document is based on an 8-bit
representation of the address. The format of this sequence is:
"W: I2CAddr RegAddr Byte0 Byte1 Byte2…"
For example, the following:
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
5
OTP Mode FlashStream (ot.fs) Files
www.ti.com
W: AA 55 AB CD EF 00
indicates that the I2C master writes the byte sequence 0xAB 0xCD 0xEF 0x00 to register 0x55 of the
device addressed at 0xAA.
More precisely, it indicates to write the following data to the device address 0xAA:
0xAB to register 0x55
0xCD to register 0x56
0xEF to register 0x57
0x00 to register 0x58
4.2
Read and Compare Command
The read and compare command is formatted identically to the write command. The data presented with
this command matches the data read exactly, or the operation should cease with an error indication. The
ot.fs file contains no information about program flow or decision making. If a read and compare command
results in data which does not match the expected values, the interpreting program needs to handle the
next step itself. It should not continue with further commands but would typically go back to the beginning
of the ot.fs file and try again several times before giving up.
The format of this sequence is:
"C: i2cAddr RegAddr Byte0 Byte1 Byte2"
An example of this command is as follows:
C: AA 55 AB CD EF 00
This example expects the master to read back 4 bytes from the register address 0x55 of the device
addressed at 0xAA and then compare the data to the values given on the line command in this same
order as 0xAB, 0xCD, 0xEF, and 0x00.
4.3
Wait Command
The wait command indicates the host waits a minimum of the given number of milliseconds before
continuing to the next row of the FlashStream file. A wait command is typically used to allow the fuel
gauge processor to complete a process before proceeding to the next command in the file.
For example, the following:
X: 200
indicates that the I2C master must wait at least 200 ms before continuing.
4.4
CONFIG UPDATE Mode
If the application requires different configuration data for the fuel gauge, the system processor can update
RAM-based data memory parameters using the Control()SET_CFGUPDATE subcommand to enter the
CONFIG UPDATE mode.
NOTE: To ensure that the fuel gauge has entered CONFIG UPDATE mode correctly, there must be
at least an 1100-ms delay after sending the SET_CFGUPDATE. Operation in this mode is
indicated by the Flags()[CFGUPMODE] status bit.
In this mode, fuel gauging is suspended while the host uses the extended data commands to modify the
configuration data blocks. To resume fuel gauging, the host must send a Control()SOFT_RESET
subcommand to exit the CONFIG UPDATE mode, which clears both Flags()[ITPOR] and [CFGUPMODE]
bits. After a timeout of approximately 240 seconds (4 minutes), the gauge automatically exits the CONFIG
UPDATE mode if it has not received a SOFT_RESET subcommand from the host.
6
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
OTP Mode FlashStream (ot.fs) Files
www.ti.com
The memory of the bq27220 device is separated into memory subclasses defined in this document. The
memory cannot be directly addressed, but is updated through a sequence of extended commands that
can access each block of memory indirectly. The ot.fs file updates these blocks to write the proper
configuration so the bq27220 device can have proper gauging performance and match the system
characteristics. These updates are stored in RAM and need to be reprogrammed any time the device
loses power. (The [ITPOR] bit in the Flags() register indicates that the RAM configuration has been reset
to the defaults and is in need of updating using the ot.fs file.)
4.5
4.5.1
Programming Instructions
Using ot.fs Files
The following list shows how to use ot.fs files to configure the bq27220 device on power up:
1. Use the GPCCEDV tool (on ti.com) to generate the 7-point CEDV parameter and the 11-point loaded
voltage points, see the bq27220EVM-744 User's Guide (SLUUBF5).
2. Use the Battery Management Studio (bqStudio) software to finalize all the values for Calibration,
Configuration, or Gas Gauging in RAM based on the application.
3. Complete the following OTP profiles:
(a) Programming the OTP Profile 1
(i) Fill out the CEDV Profile 1 section in RAM with required values.
(ii) Write CEDV Profile Select → Battery ID to 4.
(b) Programming the OTP Profile 2
(i) Fill out the CEDV Profile 1 section in RAM with required values.
(ii) Write CEDV Profile Select → Battery ID to 8.
(c) Programming the OTP Profile 3
(i) Fill out the CEDV Profile 1 section in RAM with required values.
(ii) Write CEDV Profile Select → Battery ID to 16.
4. Use bqStudio to generate the ot.fs file, which contains I2C instructions (with data) on how to program
the OTP with the values that were just set up in RAM.
5. Use the ot.fs file with the SmartFlash programming tool; the OTP on the bq27220 device can be
programmed.
4.6
General Setup and Software Installation to Program OTP
1. Equipment needed:
(a) Lab power supply configured for 7.4-V output (expect approximately 5-mA maximum current)
(b) Battery or second power supply with ≥ 3.0-V output (expect approximately 1-mA maximum current)
(c) EV2300 (v3.1r or later) or EV2400 USB with I2C interface adapter
(d) Unprogrammed bq27220 device assembled in the battery pack or on the EVM
(e) Example .gg file provided by factory
(f) Battery Management Studio (bqStudio) software installer
(g) SmartFlash software executable
2. Install bqStudio software.
3. Connect the EV2300 or EV2400 to the unprogrammed device or EVM.
4. Connect the battery to BAT(+) and VSS(–) pins.
5. With output disabled, connect the lab power supply to GPOUT and VSS(–) pins.
NOTE: Do not apply 7.4 V to the device until prompted by software.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
7
OTP Mode FlashStream (ot.fs) Files
4.7
www.ti.com
Launch bqStudio Software
1. Launch bqStudio software.
2. Confirm Gauge Dashboard panel detects the EV2x00 adapter and the bq27220 device.
3. If the device has been previously SEALED, UNSEAL it by sending the appropriate keys to Control()
(0x00 and 0x01). The bq27220 boots up in UNSEAL mode, but not in FULL ACCESS mode. Enter
FULL ACCESS mode to gain access to the Data Memory.
4. Click Data Memory to show the OTP factory defaults that are in data memory (RAM).
5. Click Import to load Data Memory contents from the provided sample .gg file.
Figure 5. Launch bqStudio Software
4.8
Load .GG File
This procedure imports the fuel gauge data or the data memory image to the device.
1. Browse to a desired template or sample *.GG parameter file. (example: bq27220.gg.csv in Figure 6.)
2. Click the Open button.
8
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
OTP Mode FlashStream (ot.fs) Files
www.ti.com
Figure 6. Load .GG File
4.9
Confirm or Update Data Memory Parameters
Use the following list to confirm or update data memory parameters:
1. Imported Data Memory (RAM) parameters that differ from the factory defaults appear in orange font.
2. Confirm or update Data Memory (RAM) parameters as required.
3. Save .gg file for future reference by clicking Export.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
9
OTP Mode FlashStream (ot.fs) Files
www.ti.com
Figure 7. Confirm or Update Data Memory Parameters
Figure 8. Update Battery ID
4. Set BATT_ID2 to 1.
10
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
OTP Mode FlashStream (ot.fs) Files
www.ti.com
4.10 Save .OTFS File
The following steps show how to save an .OTFS file
1. Click the GoldenImage icon.
2. From the GoldenImage panel, enter desired .OTFS base file name (example, bq27220.ot.fs).
NOTE: No Options changes are required.
3. Click Create Image File.
4. Exit bqStudio software.
NOTE: It is important to exit the bqStudio software because the EV2x00 adapter must be freed for
SmartFlash.
Figure 9. Save .OTFS File
4.11 Launch SmartFlash Software
Use the following steps when launching the SmartFlash software:
1. Launch SmartFlash software.
2. Confirm auto-detection of the EV2x00 adapter, gauge = 220 and version ≥ 1.09.
3. Click File → Open.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
11
OTP Mode FlashStream (ot.fs) Files
www.ti.com
Figure 10. Launch SmartFlash Software
4.12 Open ot.fs File
1. From the pop-up dialog box, click the needed ot.fs file and click Open.
2. Confirm successful file load from log window.
Figure 11. Open .OTFS File
12
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
OTP Mode FlashStream (ot.fs) Files
www.ti.com
4.13 Program OTP
1. Click the Program button.
2. When the Apply Programming Voltage pop-up dialog box appears, enable 7.4-V power supply and
click OK.
3. After a brief delay (approximately 1-second) for OTP programming and when the Remove
Programming Voltage pop-up dialog box appears, disable the power supply and click OK.
Figure 12. Apply 7.4 V
Figure 13. Program OTP
4.14 Confirm Success
1. Confirm the message Programming completed successfully! from the log window.
2. The device is now fully programmed.
SLUA771 – May 2016
Submit Documentation Feedback
bq27220 Calibration Guide
Copyright © 2016, Texas Instruments Incorporated
13
OTP Mode FlashStream (ot.fs) Files
www.ti.com
Figure 14. Confirm Success
14
bq27220 Calibration Guide
SLUA771 – May 2016
Submit Documentation Feedback
Copyright © 2016, Texas Instruments Incorporated
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products
Applications
Audio
www.ti.com/audio
Automotive and Transportation
www.ti.com/automotive
Amplifiers
amplifier.ti.com
Communications and Telecom
www.ti.com/communications
Data Converters
dataconverter.ti.com
Computers and Peripherals
www.ti.com/computers
DLP® Products
www.dlp.com
Consumer Electronics
www.ti.com/consumer-apps
DSP
dsp.ti.com
Energy and Lighting
www.ti.com/energy
Clocks and Timers
www.ti.com/clocks
Industrial
www.ti.com/industrial
Interface
interface.ti.com
Medical
www.ti.com/medical
Logic
logic.ti.com
Security
www.ti.com/security
Power Mgmt
power.ti.com
Space, Avionics and Defense
www.ti.com/space-avionics-defense
Microcontrollers
microcontroller.ti.com
Video and Imaging
www.ti.com/video
RFID
www.ti-rfid.com
OMAP Applications Processors
www.ti.com/omap
TI E2E Community
e2e.ti.com
Wireless Connectivity
www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2016, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising