| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Functions | Macros | Variables
LTC3335_Correction_Tables.cpp File Reference
Switching Regulators, Battery Chargers, and LED Drivers » LTC3335: Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter

LTC3335: Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter. More...

## Detailed Description

LTC3335: Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter.

Graphs G37 - G44 in the LTC3335 datasheet show the typical error in the coulomb counter and battery current measurement error for various IPEAK, VOUT, and battery voltage conditions. The LTC3335 accuracy is impressive when configured for high values of IPEAK. When configured with low values of IPEAK, however, there can be up to 40% error.

This file contains the typical error for all IPEAK, VOUT, and battery voltage conditions encoded as a signed 16bit integer. An array of these errors will build into the firmware as LTC3335_Software_Correction_Table[] for the IPEAK and VOUT values specified in LTC3335_Config.h. The index into this table will be the battery voltage, which may vary over life of a product using the LTC3335.

To use these correction factors to adjust the coulomb count and battery current measurement, multiply the unadjusted value by the correction factor and shift right by 16. For example:

If IPEAK = 10mA (LTC3335_IPEAK_CONFIGURATION == LTC3335_IPEAK_CONFIGURATION_10MA), VOUT = 3.3V (LTC3335_OUTPUT_VOLTAGE == LTC3335_OUTPUT_VOLTAGE_3_3V), and VBAT = 4.5V (vbat = 4500mV), then the LTC3335_Get_Software_Correction_Factor(uint16_t vbat) function will return 8826 as the software correction factor. This value translates to 8826/65536 = 13.4%, which matches the error shown in G43 of the datasheet.

If a prescaler of 5 was selected for this example, then one count of the accumulator should represent 31638 mAs (0.0088 Ah) of charge. To adjust for the expected error, we should add the fraction returned by the LTC3335_Get_Software_Correction_Factor(uint16_t vbat) function to the unadjusted coulomb count:

31638mAs + (31638mAs * 8826) >> 16 = 35899 mAs.

Note! - These correction factors are only valid at room temperature and for the recommended Coilcraft LPS5030-xxxMRB inductor listed in the datasheet. Contact LTC applications if interested in generating the software correction factors for other tempeature conditions and inductors.

    The LTC®3335 is a high efficiency, low quiescent current
    (680nA) buck-boost DC/DC converter with an integrated
    precision coulomb counter which monitors accumulated
    battery discharge in long life battery powered applications.
    The buck-boost can operate down to 1.8V on its input and
    provides eight pin-selectable output voltages with up to
    50mA of output current.

    The coulomb counter stores the accumulated battery discharge
    in an internal register accessible via an I2C interface.
    The LTC3335 features a programmable discharge alarm
    threshold. When the threshold is reached, an interrupt is
    generated at the IRQ pin.

    To accommodate a wide range of battery types and sizes,
    the peak input current can be selected from as low as 5mA
    to as high as 250mA and the full-scale coulomb counter
    has a programmable range of 32,768:1.

http://www.linear.com/product/LTC3335

http://www.linear.com/product/LTC3335#demoboards

Copyright 2018(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
- The use of this software may or may not infringe the patent rights of one or more patent holders. This license does not release you from the requirement that you obtain separate licenses from these patent holders to use this software.
- Use of the software either in source or binary form, must be run on or directly connected to an Analog Devices Inc. component.

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Coulomb Counter and Current Correction Tables for LTC3335: Nanopower Buck-Boost DC/DC with Integrated Coulomb Counter

Definition in file LTC3335_Correction_Tables.cpp.

Go to the source code of this file.

## Functions
int16_t | LTC3335_Get_Software_Correction_Factor (uint16_t vbat)
| Returns the software correction factor for a specified LTC3335_IPEAK_CONFIGURATION, LTC3335_OUTPUT_VOLTAGE, and battery voltage. More...

## Macros
#define | LTC3335_VBAT_MIN 1800
#define | LTC3335_VBAT_STEP 100
#define | LTC3335_VBAT_NUM 38
#define | LTC3335_VBAT_MAX (LTC3335_VBAT_MIN + LTC3335_VBAT_STEP * (LTC3335_VBAT_NUM - 1))
#define | LTC3335_VBAT_TO_TABLE_INDEX(vbat) ((uint8_t)((vbat - LTC3335_VBAT_MIN) / LTC3335_VBAT_STEP))

## Variables
const int16_t PROGMEM | LTC3335_Software_Correction_Table [LTC3335_VBAT_NUM] = {-1163, -1170, -1171, -1165, -1152, -1134, -1111, -1082, -1048, -1010, -967, -920, -869, -814, -756, -693, -628, -559, -487, -412, -334, -253, -169, -83, 6, 98, 192, 288, 387, 487, 590, 695, 802, 910, 1020, 1132, 1244, 1358}
| Tables of typical error of LTC3335 at a given battery voltage, output voltage, and iPeak. More...

## Function Documentation

## ◆ LTC3335_Get_Software_Correction_Factor()

int16_t LTC3335_Get_Software_Correction_Factor | ( | uint16_t | vbat | ) |

Returns the software correction factor for a specified LTC3335_IPEAK_CONFIGURATION, LTC3335_OUTPUT_VOLTAGE, and battery voltage.

Note! - These corrections factors are only valid at room temperature and for the recommended Coilcraft LPS5030-xxxMRB inductor.

Returns
  TRUE if the LTC3335 communication was successful.

Parameters

  vbat | Battery voltage used to select software correction factor.

Definition at line 354 of file LTC3335_Correction_Tables.cpp.

## Macro Definition Documentation

## ◆ LTC3335_VBAT_MAX

#define LTC3335_VBAT_MAX (LTC3335_VBAT_MIN + LTC3335_VBAT_STEP * (LTC3335_VBAT_NUM - 1))

Definition at line 119 of file LTC3335_Correction_Tables.cpp.

## ◆ LTC3335_VBAT_MIN

#define LTC3335_VBAT_MIN 1800

Definition at line 116 of file LTC3335_Correction_Tables.cpp.

## ◆ LTC3335_VBAT_NUM

#define LTC3335_VBAT_NUM 38

Definition at line 118 of file LTC3335_Correction_Tables.cpp.

## ◆ LTC3335_VBAT_STEP

#define LTC3335_VBAT_STEP 100

Definition at line 117 of file LTC3335_Correction_Tables.cpp.

## ◆ LTC3335_VBAT_TO_TABLE_INDEX

#define LTC3335_VBAT_TO_TABLE_INDEX | ( |  | vbat | ) | ((uint8_t)((vbat - LTC3335_VBAT_MIN) / LTC3335_VBAT_STEP))

Definition at line 120 of file LTC3335_Correction_Tables.cpp.

## Variable Documentation

## ◆ LTC3335_Software_Correction_Table

const int16_t PROGMEM LTC3335_Software_Correction_Table[LTC3335_VBAT_NUM] = {-1163, -1170, -1171, -1165, -1152, -1134, -1111, -1082, -1048, -1010, -967, -920, -869, -814, -756, -693, -628, -559, -487, -412, -334, -253, -169, -83, 6, 98, 192, 288, 387, 487, 590, 695, 802, 910, 1020, 1132, 1244, 1358}

Tables of typical error of LTC3335 at a given battery voltage, output voltage, and iPeak.

See Graphs G37 - G44 in LTC3335 datasheet.

Definition at line 277 of file LTC3335_Correction_Tables.cpp.