Terms and Definitions
References
For related documents and software, please visit:
https://www.dialog-semiconductor.com/advanced-analog-products
Download our free GreenPAK Designer software [1] to open the .gp files [2] and view the proposed circuit design. Use the GreenPAK development tools [3] to freeze the design into your own customized IC in a matter of minutes. Dialog Semiconductor provides a complete library of application notes [4] featuring design examples as well as explanations of features and blocks within the Dialog IC.
- GreenPAK Designer Software, Software Download and User Guide, Dialog Semiconductor
- AN-CM-308 Analog Front End for Pressure Sensor.gp, GreenPAK Design File, Dialog Semiconductor
- GreenPAK Development Tools, GreenPAK Development Tools Webpage, Dialog Semiconductor
- GreenPAK Application Notes, GreenPAK Application Notes Webpage, Dialog Semiconductor
- SLG47004, Datasheet, Dialog Semiconductor
Author: Vladyslav Kozlov
Introduction
In the following application note the SLG47004 is used as the analog front-end (AFE) for a Wheatstone bridge pressure sensor. Two configurable OpAmps and one internal OpAmp, all within the SLG47004 are used to create an instrumentation amplifier. Digital rheostats RH0 and RH1 of the SLG47004 are used to tune the gain of the AFE and to compensate offset voltages of sensor and OpAmps. Also, the trim procedure helps to minimize an error caused by mismatch between external resistors. The Auto-Trim function of the SLG47004 simplifies the process of gain tuning and offset compensation and allows saving hardware resources, as well as minimize the cost of the AFE.
The SLG47004 allows two different ways of interfacing ADCs with and without internal reference sources:
- In the case when an external ADC has a separate analog reference pin, the common way is to supply all analog blocks (sensor, ADC, DAC for compensating offset) from one voltage source. The measurements are ratiometric. Variations in supply voltage don’t affect accuracy.
- In the case when an ADC has an internal reference source only, the supply voltage for the sensor and DAC must be stable and constant. That’s why, for this case, an internal buffered Vref of the SLG47004 must be used.
AFE Without Internal Voltage Reference Source
Hardware Setup of AFE Without Internal Voltage Reference
Figure 1 shows a schematic of the analog front end for MCU with ADC, which has an external analog reference option. Sensor, ADC reference, DAC (Rdiv1, RH0, Rdiv2 divider for offset compensation), and Chopper ACMP reference are powered from one voltage source: Van. Characteristics of the components can be found in Table 1. A pressure sensor from Honeywell (NSCSDRN060MD) is used in this example.

In Figure 1 Van is the supply voltage for analog components. Van is filtered VDD voltage. The output of the sensor with no pressure is equal to (Van/2 ± Vos_bridge), where Vos_bridge is the bridge offset voltage. Since the force to the sensor can be applied in both directions, the output of the sensor can be higher or lower than zero point (Van/2 ± Vos_bridge). So the AFE must amplify the output signal differentially between the sensor zero point and its actual output.
The optional Cf capacitance is needed to cancel the switching noise of digital rheostats. The value of Cf can be changed.
The output voltage of AFE is:

where

Rf – are user-defined resistors, Rf = 200 KΩ and 0.5% tolerance in the current project;
Rg – is user-defined gain resistor;
Vref – is the reference voltage for the instrumentation amplifier.
Precision Characteristics of Components
Precision characteristics of the components are shown in Table 1.
Parameter |
Description |
Value |
Unit |
Sensor Characteristics
|
|||
ΔP |
Pressure Range |
±6.0 |
kPa |
KVout
|
Full Scale Span Coefficient |
±2.46 (min), ±2.60 (typ), ±2.8 (max)
|
mV/V |
Kos_out
|
Null Offset Coefficient |
±0.075 |
mV/V |
Sensor Characteristics at 3.3 V DC
|
|||
ΔVout
|
Output Voltage Span |
±8.1 (min), ±8.58 (typ), ±9.2 (max)
|
mV |
Vos_bridge
|
Null Offset |
±0.248 (max) |
mV |
dVos_bridge/dT
|
Offset Temperature Drift (T = 0 to 50 °C)
|
±0.6 (max) |
%FSS |
OpAmps Characteristics
|
|||
VosOpAmp |
Input Offset Voltage |
1.0 (max) |
mV |
dVosOpAmp/dT |
Offset Drift with Temperature
|
5 (max) |
µV/°C |
ΔRint
|
Mismatch Between Internal R1, R2, R3, R4 Resistors
|
0.05 |
% |
Digital Rheostats Characteristics
|
|||
RH1, RH2 |
Digital Rheostats Resistance |
80 (min), 100 (typ), 120 (max)
|
kOhm |
Ntaps
|
Number of Taps |
1024 |
|
fChACMP
|
Chopper Comparator Switching Frequency
|
10 |
kHz |
VCh_offset
|
Chopper Comparator Offset when Set is Active
|
300 (max) |
µV |
DNL |
Differential Non-Linearity (max)
|
1 |
LSB |
αR(T) |
Nominal Resistance Temp Coefficient
|
100 |
ppm/°C |
HD Buffer Characteristics
|
|||
Vos_HD_Buf
|
HD Buffer Offset |
±3 (max), T = 25 °C |
mV |
ΔVOUT(I)
|
HD Buffer Load Regulation at ILoad =
2mA
|
2 |
mV |
External Resistors Characteristics
|
|||
ΔRext
|
Resistors Tolerance |
0.5 and 1 |
% |
αRext(T)
|
Resistance Temp Coefficient |
50 |
ppm/°C |
Internal GreenPAK Design and Macrocells Configurations
Internal Design of the Project
Figure 2 shows the internal design of the project in GreenPAK Designer Software.

OpAmps Configurations
OpAmps configurations are shown in Figure 3.

Chopper ACMP Configuration
Channel0 of Chopper ACMP is used for offset correction. Channel1 of Chopper ACMP is used for tuning gain of AFE. Chopper ACMP configuration is shown in Figure 4.

Digital Rheostats Configurations
Digital Rheostats configurations are shown in Figure 5.

LUT Configuration
LUT configuration is shown in Figure 6.

Temperature Sensor Configuration
The temperature sensor configuration is shown in Figure 7.

Oscillator0 and I2C Macrocells Configurations
Oscillator0 and I2C Macrocells use default configurations.
GPIOs Configurations
GPIOs configurations are shown in Figure 8.

Gain Resistor Calculation
To calculate the value of the gain resistor Rg the minimum and maximum gain of the instrumentation amplifier must be assessed. Considering the possible output span of the sensor Van·KVout (from 8.12 mV to 9.24 mV for Van = 3.3 V), the gain of AFE can be found from the equation:

where Gain_ref_ChopACMP – is the reference voltage of ChopperACMP for gain tuning (see Channel1 In- reference source of Chopper ACMP, Section 4.3.3). Gain_ref_ChopACMP = VDDA*(3/64) or 0.155 V for Van = 3.3 V.
For the schematic shown in Figure 1 VDDA = Van. So, the equation (2) can be rewritten as

or

From equation (3) it’s seen that variations in Van voltage don’t affect the gain of system:

Now it’s possible to build the graph for the function Gain = f(n), where n – is the code of the rheostat from 1 to 1024:

Note that the chip to chip variation of RH maximum resistance is from 80 kΩ to 120 kΩ. The 80 kΩ value should be used for gain resistor calculation.
By varying the value of Rg it’s possible to match the span of AFE gain from Gain_min to Gain_max, see Figure 9. If there is no Rg value to match the desired range, then Rf value should be increased. For the current schematic Rf = 200 kΩ and Rg = 2.61 kΩ.

Vref Divider Resistors Calculation
To calculate the values of DAC resistors (Rdiv1, RH0, Rdiv2 divider) the maximum range of Vref (Vcomp value) should be calculated. Considering the biggest possible gain of the AFE (Gain_max = 184.2) and the biggest possible input offset (see Figure 10):

the Vref can be changed by the value of Vcomp:

To find the value of Rdiv1, Rdiv2, the next equation system should be solved:

where RH0max – maximum resistance of the rheostat, in the worst case RH0max = 80 kΩ;
Van – is the voltage applied to the divider.
For the current schematic the nearest standard values of resistors are Rdiv2 = 75 kΩ, Rdiv1 = 46.4 kΩ.
Offset Error Sources and Offset Compensation
To set zero point for the AFE (zero pressure) the voltage from divider (Rdiv1, RH0, Rdiv2) is used. The output from the divider must be connected to the instrumentation amplifier through the buffer to eliminate the impact of DAC output resistance.
By changing the value of RH0 not only sensor offset, but OpAmps input offset voltages can be compensated. See the equation below.
Let’s add offset voltages to the equation (1):

where VosOpAmp0, VosOpAmp1, Vos_IntOpAmp – are input offset voltages of the SLG47004 amplifiers;
Vos_Input_Buffer – is buffer input offset voltage;
Vosbridge – is offset voltage of the sensor;
Vcm_error – is common-mode voltage error caused by inequality of internal R1, R2, R3, R4 resistors, and external Rf resistors. This voltage will be compensated after the trim procedure.
Vcomp – is the shift voltage from the divider for offset voltages compensation.
Note that signs of offset voltages were selected to show the worst-case error, see Figure 10.

Tuning Gain of AFE
Since the sensors span can be in the range from ±8.1 mV to ±9.2 mV for Van = 3.3 V, the gain of the instrumentation amplifier must be tuned to cover the full output range of the AFE.
The linear output swing of the SLG47004 OpAmps is from GND + 100 mV to VDD - 100 mV. It’s proposed to use the output range from VDDA*(32/64) to (VDDA - VDDA*(3/64)) for positive sensor output and from VDDA*(32/64) to VDDA*(3/64) for negative sensor output. VDDA*(3/64) is the threshold for internal Chopper ACMP, which is used for gain tuning. VDDA*(3/64) = 0.155 V for VDDA = 3.3 V.
Algorithm for Tuning Gain and Compensating Offset of the System
The initial value of RH0 and RH1 are 100 KΩ (80 KΩ in the worst case), code = 1024.
- 1st step: offset compensation. Load the sensor with zero load (no load). Send to the SLG47004 I2C command to set the Virt Input0 (pulse to Set0 input of PT0 block) to logic High level. This will start the Auto-Trim procedure for RH0. Then I2C master should clear the Virt Input0 of the SLG47004, which is connected to Set0 input. During the Auto-Trim procedure the SLG47004 changes the value of RH0 until the output voltage of AFE reaches VDDA/2. After the end of the Auto‑Trim procedure (logic level of Idle/nActive output of PT block becomes High) the system is ready for the next step.
- 2nd step: gain tuning. Load the sensor with a defined load. Send to the SLG47004 I2C command to set Virt Input1 (pulse to Set1 input of PT block) to logic High level. This will start the Auto-Trim procedure for RH1. Then I2C should clear the Virt Input1 of the SLG47004, which is connected to Set1 input. During this Auto-Trim procedure the SLG47004 changes the value of RH1 until the output voltage of AFE reaches (VDDA*(3/64)). After the end of the Auto-Trim procedure (logic level of Idle/Active output of PT block becomes High) the system is ready for the next step.
- 3rd step: offset compensation. This step is the same as the 1st step.
Optionally, if higher accuracy is required, the User can add more offset/gain calibration steps considering the following limitations:
- The Auto-Trim procedures of total offset compensation and system gain error must be done iteratively starting and finishing with the total offset compensation.
- Total system offset (sensor offset + OpAmp1 offset + OpAmp2 offset) must not be greater than Vsensor_output_range/2.
Expected Gain errors after each tuning iteration are shown in Table 2.
Gain |
Gain Error, % |
|
---|---|---|
Etalon gain |
174.2 |
- |
1st iteration (offset trim, then gain
tuning)
|
170.9 |
1.89% |
2nd iteration (offset trim, then gain
tuning)
|
173.4 |
0.49% |
3rd iteration (offset trim, then gain
tuning)
|
174.4 |
0.09% |
After the 3rd iteration the gain error is associated with the step error of digital rheostat.
Offset Compensation Accuracy
Assume that the Auto-Trim is done at temperature = 25 °C. The gain of the instrumentation amplifier is 273.3, RH resistance is 100 kΩ for code = 1024. Table 3 shows the accuracy of setting zero point (offset compensation).
Parameter |
Value, V |
Error in % of output sensor range
|
---|---|---|
Step near set point (Vout[NRH0] – Vout[NRH0-1])
(Note 1) |
0.0006 |
0.04 % |
Step near set point considering rheostat DNL
(Note 2) |
0.0012 |
0.08 % |
Step error considering DNL and ACMP offset
(Note 3) |
0.0015 |
0.1 % |
Note 1 minimum achievable error of the Auto-Trim system is one trim step (± 1 of digital rheostat code, see Figure 11).
Note 2 Multiply ‘Step near set point’ value (Vout[NDR]- Vout[NDR-1]) by 2 (DNL error).
Note 3 Add the typical Chopper ACMP offset of 300 µV to the previous value.

In the case of 10-bit ADC, the maximum error of the trimmed system is:

Please note that this error value is independent of Van voltage.
AFE with Internal Voltage Reference Source
Hardware Setup of AFE with Internal Voltage Reference
The SLG47004 allows powering all analog components of the AFE (sensor, DAC, and reference for Chopper ACMP) from an internal voltage source, see Figure 12. For this purpose, the SLG47004 has a special high drive buffer (HD Buffer macrocell).

Precision Characteristics of Sensor at 2.048 V Supply Voltage
Characteristics of the pressure sensor at 2.048 V supply voltage are shown in Table 4. All other precision characteristics from Table 1 remain unchanged.
Parameter |
Description |
Value |
Unit |
---|---|---|---|
ΔP |
Pressure Range |
±6.0 |
kPa |
KVout
|
Output Voltage Span |
±5.04 (min), ±5.32 (typ), ±5.73 (max)
|
mV |
Kos_out
|
Null Offset |
±0.154 (max) |
mV |
dVos_bridge/dT
|
Offset Temperature Drift (T = 0 to 50 °C)
|
±0.6 (max) |
%FSS |
Internal Macrocells Configurations
HD Buffer and OpAmp0 Vref Configurations
The HD Buffer shares the voltage reference with OpAmp0 Macrocell. Note that Vref can be connected (or disconnected) to OpAmp0 or HD Buffer macrocells independently. The configurations of HD Buffer and OpAmp0 Vref are shown in Figure 13.

Chopper ACMP Configuration for AFE with 2.048 V Voltage Reference
Chopper ACMP configuration is shown in Figure 14.

Gain Resistor and DAC Divider Calculations for AFE with 2.048 V Voltage Reference
Considering the output span of the sensor (from 5.04 mV to 5.73 mV at Van = 2.048 V), the output voltage range of AFE must be


Using equation (3),

Gain resistor Rg = 1.33 kΩ, Rf = 100 kΩ. The range of offset compensation is Vcomp = ±(177.9*0.00215) = 0.382 V. The divider resistors Rdiv1 = 21.3 kΩ, Rdiv2 = 46.4 kΩ. The offset of the HD Buffer is 3 mV.
Software Simulation and Hardware Prototype Testing
Figure 15, Figure 16, Figure 17, and Figure 18 show the Auto-Trim process. Figure 15, Figure 16, and Figure 17 show the case when the duration of the pulse at Set input of RH is shorter than the duration of the Auto-Trim process. For this case, the stop condition for the Auto-Trim process is after the 2nd time there is a change at Up/Down input at the rising edge of the Clock input. Please refer to the datasheet to get more information about the Auto-Trim process.
If the User holds the Set input at high level, the Auto-Trim system will continue to operate and the output will follow the reference point, see Figure 18.
The maximum time of the first Auto-Trim iteration is RH_code/fAuto-Trim = 511/2048 = 250 ms.




Conclusions
The application note describes the design procedure of the analog front-end for a Wheatstone bridge pressure sensor. A unique Auto-Trim feature of the SLG47004 is used to compensate for the offset of operational amplifiers and sensor, and to tune the gain of the AFE.
It was shown how to calculate gain and DAC resistors to cover the full output range and full trim range of the instrumentation amplifier.
To achieve the best precision, it's recommended to use iterative procedures of offset compensation and then gain tuning. The first and last procedure should be offset compensation. Practical results show that the best precision is achieved after the 3rd iteration. For the sensor and AFE described in this application note, the gain and offset errors after the Auto-Trim procedures are ≈0.1% of the sensor range.