User manual

MCP355X Sensor Application Developer’s Board User’s Guide
DS51609A-page 10 © 2006 Microchip Technology Inc.
FIGURE 2-4: Channel 1 Differential Gain Circuit with analog switch offset
cancellation.
2.3.1 Channel 1 Analog Switches and Offset Drift Cancellation
The analog switches are used with the amplifier to swap the sources driving the load
cell, effectively cancelling any offset or offset drift. One conversion is performed with
the load cell driven “normally” and a second while it is driven in an “inverted”
configuration. The result of the second conversion is inverted and added to the result
from the first and an average of the two is computed (computing the average is a simple
shift operation for the microcontroller). This technique effectively cancels the offset of
the amplifiers as well as the ADC. An offset residue will exist if the any of the offsets
change between conversions. This is unlikely to happen unless the temperature
changes rapidly after the first conversion. The offset of the sensor is not affected by this
technique.
The firmware included with this developer’s board performs this process when
“Channel 1” is selected using the push button switches.
This process is described here:
1. Stop the output drive by configuring the outputs of the PICmicro MCU that drive
the load cell as low.
2. Control the analog switches and switch the ground of the MCP3551 to the
“bottom” of the load cell and the reference of the MCP3551 to the “top” of the load
cell.
3. Start the output drive by configuring the output of the PICmicro MCU that drives
the “top” of the load cell as high.
4. Perform a conversion and save the result.
5. Stop the output drive by configuring both outputs of the PICmicro MCU that drive
the load cell as low.
6. Control the analog switches and switch the ground of the MCP3551 to the “top”
of the load cell and the reference of the MCP3551 to the “bottom” of the load cell.
7. Start the output drive by configuring the output of the PICmicro MCU that drives
the “bottom” of the load cell as high.
8. Perform a conversion, invert the result, add to the first conversion, divide by two,
and save the result as the actual reading.
-SENSE
-IN
-OUT
+OUT
+IN
+SENSE
P6
+
-
+
-
MCP3551
V
REF
V
SS
V
IN-
V
IN+
SPI
Switch Control From PIC16F877
R
G
R
F
MCP6XX Socket U9
U7
U8
U5
Analog Switch
Analog Switch