dm00096536

AN4366
Application note
Compensate the input offset of a high-side current sensing
Nicolas Aupetit
Introduction
This application note explains how to configure a high-side current sensing when it is powered in single
supply. This approach is especially useful when a low current must be measured.
A high-side current sensing can amplify input differential signals at a common-mode voltage well
beyond the power supply rail. This common-mode voltage, in a current-sense amplifier such as the
TSC101, can rise to 28 V and can rise even higher in the TSC103. The device amplifies small voltages
across a shunt resistor on the high-voltage rail and feeds it to a low-voltage ADC generally embedded
into a microcontroller (see Figure 1). By construction, all current sensing devices have a small input
offset. Depending on whether this input offset voltage is positive or negative, there may be an impact on
the measurement of a low current.
Figure 1: Typical application schematic
Rshunt
Load
Rin1
Rin2
Vcc
+
-
+
Rg
Microcontroller
-
February 2014
DocID025330 Rev 1
1/14
www.st.com
Contents
AN4366
Contents
1
Definition of input offset voltage (Vos) .......................................... 4
2
Saturation problem.......................................................................... 5
3
How to compensate the input offset voltage ................................. 7
4
Influence of the external resistances ............................................. 9
5
6
Current source............................................................................... 10
Outcome ......................................................................................... 11
7
Conclusion ..................................................................................... 12
8
Revision history ............................................................................ 13
2/14
DocID025330 Rev 1
AN4366
List of figures
List of figures
Figure 1: Typical application schematic ...................................................................................................... 1
Figure 2: Vout vs Vsense ............................................................................................................................ 4
Figure 3: Current sensing single supply ..................................................................................................... 5
Figure 4: Schematic to compensate Vos .................................................................................................... 7
Figure 5: Suggested schematic to compensate Vos ................................................................................ 12
DocID025330 Rev 1
3/14
Definition of input offset voltage (Vos)
1
AN4366
Definition of input offset voltage (Vos)
The input offset voltage (Vos) is defined as the intersection between the linear regression
of the Vout vs. the Vsense curve with the X-axis (see Figure 2).
If Vout1 is the output voltage where Vsense = Vsense1, and if Vout2 is the output voltage
where Vsense = Vsense2, then Vos can be calculated using following equation 1:
∗ Vout
Vout
Figure 2: Vout vs Vsense
Vout
Vout_1
Vout_2
Vsense
Vos
4/14
Vsense2
DocID025330 Rev 1
Vsense1
AN4366
2
Saturation problem
Saturation problem
If the TSC103 is used in single supply with a positive Vos (see Figure 2 in Section 1:
"Definition of input offset voltage (Vos)") and zero current through the shunt, it becomes
saturated and the output is clamped to the Vol. Unfortunately, this phenomenon also holds
true with a positive Vos and low current. In such a case, a voltage drop through the shunt,
lower than the Vos of the current sensing, gives an incorrect output value.
Let us consider an automotive application where it is necessary to sense the current of the
battery. The minimum current that must be measured is 1 A. To limit the power dissipation,
a 0.5 mΩ shunt resistor is used. The current sensing, TSC103, powered in single supply
and set with a gain of 100 is used to measure the current (see Figure 3).
Figure 3: Current sensing single supply
Ibattery
1A
Vcc
Rshunt
0.5 mΩ
Vos
TSC103
Gain x100
+
Gnd
The native input offset of the TSC103 might be, in the worst case, +1.1 mV or -1.1 mV, and
the maximum Vol might be 125 mV. The output voltage of the TSC103 is given by
equation (2):
. Gain
To obtain a valuable measurement, the Vout must be higher than the output stage,
low-state saturation voltage i.e. Vout > Vol.
DocID025330 Rev 1
5/14
Saturation problem
AN4366
Negative Vos (Vos of the TSC103 = -1.1 mV)
When it is necessary to measure 1 A, the voltage output of the TSC103 using equation 2 is:
Vout = (1 A * 0.5 mΩ + 1.1 mV) * 100 = 160 mV. This value is acceptable as it is above the
maximum Vol of the TSC103.
Positive Vos (Vos of the TSC103 = +1.1 mV)
When it is necessary to measure 1 A, the voltage output of the TSC103 using equation 2 is:
Vout = (1 A * 0.5 mΩ -1.1 mV) * 100 = -60 mV. As the TSC103 is powered in single supply
the output in this case is saturated and Vout = Vol. In this case, a current lower than 4.7 A
(see equation 3 below), cannot be measured correctly by the current sensing due to the
Vos and Vol limitation.
Rshunt
6/14
DocID025330 Rev 1
AN4366
3
How to compensate the input offset voltage
How to compensate the input offset voltage
The input offset can be compensated and output saturation can be avoided thanks to:
•
•
an external current source
added resistances
To realize this compensation, it is recommended to use the TSC1031 rather than the
TSC103. Both devices are very similar in terms of their electrical characteristic, but the
TSC1031 is a more flexible current sensing solution as it allows the Rg internal resistors
values to be externally changed.
The main objective is to compensate the input offset by creating an opposite voltage,
VosC, thanks to an Rs2 resistance and a current source. In order to compensate the native
Vos, it is important that: (-Vos + Vosc + Vshunt) * Gain > Vol.
Figure 4 shows the architecture where the current sensing device always has a negative
input offset. The current source is made of few components: a voltage reference (TL431),
an op-amp (LMV821) which is used as a buffer, a NPN transistor, and one resistor (Rc4).
Figure 4: Schematic to compensate Vos
Current source
5V
5V
Vref
TL431
+
LMV821
-
Rc4
Rshunt
Vshunt
Rs1
Rs2
Vosc
Vos
TSC1031
Rin1
5kΩ
Rin2
5kΩ
5V
+
-
K1
+
Rg
125kΩ
K2
Vout
-
Rs3
DocID025330 Rev 1
7/14
How to compensate the input offset voltage
AN4366
The Vosc is calculated using equation 4:
Rs2 ∗ Vref
Rc4
Note: adding the resistances Rs1, Rs2, and Rs3 has a direct impact on the whole gain of
the TSC1031. The values of these resistances must be chosen carefully.
8/14
DocID025330 Rev 1
AN4366
4
Influence of the external resistances
Influence of the external resistances
The values of Rs1 and Rs2 should be equal to balance the contribution on both amplifier
inputs. The TSC1031 has several trimmed input resistances. Any external resistances
added in series change the value of the original gain, K1 = 25 (see equation 5).
Rg
Where Rin is the specified amplifier input resistance.
Assuming that Rs = 100 Ω, the gain, K1, becomes:
125 kΩ
Therefore, to keep the gain as close as possible to 25, ensure that the input series
resistors, Rs1 and Rs2, are small compared to Rin. Using a resistor that is less than 10 Ω
is strongly recommended.
To balance the contribution of Rs1 and Rs2 in the current sense amplifier gain, an output
resistor Rs3 should be connected between pin A1 and the Gnd of the TSC1031. The value
of Rs3 should be chosen according to equation 6:
Rg
Rin
Rs3
Rs1
To keep the gain constant (i.e. K1 = 25), let Rs3 = 250 Ω for Rs1 = 10 Ω.
To avoid an error on the gain or output offset voltage it is extremely important to:
•
•
keep the value of the external resistances, Rs1 and Rs2, as low as possible
match resistances
Other parameters, such as the process variation or the temperature coefficient of the
resistances must also be taken into consideration regarding the current measurement
error. All calculations of the total error due to external resistances are detailed in the
application note "AN4369 Adjustable gain with a current sensing".
DocID025330 Rev 1
9/14
Current source
5
AN4366
Current source
The current necessary to compensate the Vos should be high enough not to be impacted
by the gain error and low enough to allow reasonable values of Rs1 and Rs2 to be chosen.
Note that the current is generated by the current source and that gain error may appear in
temperature due to the external resistors.
To achieve good accuracy and to maintain the initial gain, the external resistances are set
as follow:
•
•
•
Rs1 = Rs2 = 10 Ω
Rs3 = 250 Ω which maintains K1 = 25
K2 = 4 by setting SEL = Vcc+
In this configuration the total gain is: AV = K1.K2 = 100.
If we consider the worst situation, i.e. when the TSC1031 has a positive Vos offset of
+1.1 mv, in this case the output of the TSC1031 could become saturated. To avoid this,
add a negative offset compensation of 2 mV. Then, we can deduce that the current which
must be drawn by the current source is:
Rs2
2 mV
10 Ω
The current delivered by the current source is mainly fixed thanks to the reference voltage
TL431 (2.5V) and the resistance Rc4. So,
200 μA
A possible op-amp to drive the NPN transistor is the automotive grade LMV821A (order
code LMV821AIYLT).
10/14
DocID025330 Rev 1
AN4366
6
Outcome
Outcome
If finally, the native Vos of the TSC1031 is +1.1 mV with the current source compensation,
the equivalent input offset Vos becomes -0.9 mV. If finally, the native Vos of the TSC1031
is -1.1 mV with the current source compensation, the equivalent input offset Vos becomes
-3.1 mV.
Considering the whole application, with the TSC1031 gain set at x100 and measuring a
current of 1 A through a shunt of 0.5 mΩ, the output voltage may vary from 140 mV to
360 mV. In this case, the output of the TSC1031 (used in single supply) is never saturated.
DocID025330 Rev 1
11/14
Conclusion
7
AN4366
Conclusion
A current sensing powered in single supply is able to measure low current. However, if the
voltage drop through the shunt is lower than the Vos, it might cause some output saturation
problems. In this case, it is important to compensate the Vos by using external resistances
and a current source.
The resistances must be as low as possible and must be well matched to avoid inaccurate
measurements. The current source must be well dimensioned.
For this kind of compensation, it is important to realize a calibration before starting the
measurement. Firstly, measure the output voltage with a minimum current through the
shunt, and then used this baseline value as a reference of minimum current. Figure 5 is a
suggested schematic to compensate the Vos. It avoids any output saturation for low current
measurements.
Figure 5: Suggested schematic to compensate Vos
Current source
5V
5V
Vref
TL431
2.5V
+
LMV821
-
12.5kΩ
200µA
Rshunt
10Ω
10Ω
2mV
Vos
TSC1031
Rin1
5kΩ
Rin2
5kΩ
5V
+
-
K1
+
Rg
125kΩ
K2
-
250Ω
12/14
DocID025330 Rev 1
Vout
AN4366
8
Revision history
Revision history
Table 1: Document revision history
Date
Revision
Changes
05-Feb-2014
1
Initial release
DocID025330 Rev 1
13/14
AN4366
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.
ST PRODUCTS ARE NOT DESIGNED OR AUTHORIZED FOR USE IN: (A) SAFETY CRITICAL APPLICATIONS SUCH AS
LIFE SUPPORTING, ACTIVE IMPLANTED DEVICES OR SYSTEMS WITH PRODUCT FUNCTIONAL SAFETY
REQUIREMENTS; (B) AERONAUTIC APPLICATIONS; (C) AUTOMOTIVE APPLICATIONS OR ENVIRONMENTS, AND/OR
(D) AEROSPACE APPLICATIONS OR ENVIRONMENTS. WHERE ST PRODUCTS ARE NOT DESIGNED FOR SUCH USE,
THE PURCHASER SHALL USE PRODUCTS AT PURCHASER’S SOLE RISK, EVEN IF ST HAS BEEN INFORMED IN
WRITING OF SUCH USAGE, UNLESS A PRODUCT IS EXPRESSLY DESIGNATED BY ST AS BEING INTENDED FOR
"AUTOMOTIVE, AUTOMOTIVE SAFETY OR MEDICAL" INDUSTRY DOMAINS ACCORDING TO ST PRODUCT DESIGN
SPECIFICATIONS. PRODUCTS FORMALLY ESCC, QML OR JAN QUALIFIED ARE DEEMED SUITABLE FOR USE IN
AEROSPACE BY THE CORRESPONDING GOVERNMENTAL AGENCY.
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.
© 2014 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
14/14
DocID025330 Rev 1