English
Language : 

AN839 Datasheet, PDF (2/5 Pages) Silicon Laboratories – Novel Current-Sense Measurement with Automatic Offset Correction
AN839
Current used by Cypress CY8C38
8µA (average, polling)
Current used by the Current Sense Amplifier
860 nA
The accuracy of the circuit is extremely good and is generally limited only by the accuracy of the resistors used. 1%
resistors yielded an error of no more than 1 µA.
Op amp input offset voltages need to be considered carefully in this circuit. The TS1001 op amp is specified with +/
-3mV maximum input offset voltage at 25ºC, which corresponds to +/-3mA of error. Another consideration is that
Q1 exhibits drain-source leakage current of a few 10s of nanoamps at 25C, but this can approach 1µA over the
commercial temperature range. Since the current through Q1 is effectively controlled by the op amp loop;
therefore, any drain-source leakage from Q1 appears as a current floor and this generates a corresponding
minimum voltage output across R3 below which current cannot be measured until the op amp “takes over” at
higher measured currents. Therefore, normal methods of removing the current sense amplifier offset by subtracting
the zero-load voltage at V_iload will not work, since the offset voltage due to the op amp’s VOS and the current
floor from Q1’s drain-source leakage cannot be separated.
Therefore, the offset correction scheme utilizing Q1 and R7 is implemented. Amplifier input offset voltage may be
calibrated out using the principal of making two measurements of the same parameter at the two gain settings. The
offset voltage then can be found as:
where Viload_G1 and Viload_G2 are the measurements made with low range and high range mode, respectively,
and where:
In this case, RG1 = 500 and RG2 = 100, effectively providing two scales of 100 µA and 500 µA full scale,
respectively. The CY8C38 Microcontroller Code for Offset-Voltage-Corrected Current-Sense Amplifier follows:
/*******************************************************************************
* File Name: main.c
*
* Version: 1.0
*
* Description:
* This is source code for the Current Sense Amplifier
*
*
*******************************************************************************/
#include
#include
/*******************************************************************************
* Function Name: main
********************************************************************************
* Target Device:
* CY8C38 processor
*
*******************************************************************************/
void main()
{
int32 ADCResult;
float Iin;
float Iin_corrected;
char OutputString[32];
2
Rev. 1.0