Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, Accuron,
dsPIC, K
EELOQ, microID, MPLAB, PIC, PICmicro, PICSTART,
PRO MATE, PowerSmart, rfPIC and SmartShunt are
registered trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
AmpLab, FilterLab, Migratable Memory, MXDEV, MXLAB,
SEEVAL, SmartSensor and The Embedded Control Solutions
Company are registered trademarks of Microchip Technology
Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, dsPICDEM,
dsPICDEM.net, dsPICworks, ECAN, ECONOMONITOR,
FanSense, FlexROM, fuzzyLAB, In-Circuit Serial
Programming, ICSP, ICEPIC, Linear Active Thermistor, Mindi,
MiWi, MPASM, MPLIB, MPLINK, PICkit, PICDEM,
PICDEM.net, PICLAB, PICtail, PowerCal, PowerInfo,
PowerMate, PowerTool, REAL ICE, rfLAB, rfPICDEM, Select
Mode, Smart Serial, SmartTel, Total Endurance, UNI/O,
WiperLock and ZENA are trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona, Gresham, Oregon and Mountain View, California. The
Company’s quality system processes and procedures are for its
PICmicro
EEPROMs, microperipherals, nonvolatile memory and analog
products. In addition, Microchip’s quality system for the design and
manufacture of development systems is ISO 9001:2000 certified.
All documentation becomes dated, and this manual is no exception. Microchip tools and
documentation are constantly evolving to meet customer needs, so some actual dialogs
and/or tool descriptions may differ from those in this document. Please refer to our web site
(www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each
page, in front of the page number. The numbering convention for the DS number is
“DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the
document.
INTRODUCTION
This chapter contains general information that will be useful to know before using the
MCP355X Sensor Application Developer’s Board. Items discussed in this chapter
include:
• Document Layout
• Conventions Used in this Guide
• Recommended Reading
• The Microchip Web Site
• Customer Support
• Document Revision History
DOCUMENT LAYOUT
This document describes how to use the MCP355X Sensor Application Developer’s
Board as a development tool. The manual layout is as follows:
• Chapter 1. “Product Overview” – Important information about the MCP355X
Sensor Application Developer’s Board.
• Chapter 2. “Hardware Description”– Includes detailed description of the
hardware for the MCP355X Sensor Application Developer’s Board.
• Chapter 3. “Firmware Description” – Includes detailed description of the
software for the MCP355X Sensor Application Developer’s Board.
• Chapter 4. “DataView” - Includes detail description of the DataView software.
• Appendix A. “Schematic and Layouts” – Shows the schematic and layout
diagrams for the MCP355X Sensor Application Developer’s Board.
• Appendix B. “Bill Of Materials (BOM)” – Lists the parts used to build the
MCP355X Sensor Application Developer’s Board
Choice of mutually exclusive
arguments; an OR selection
Represents code supplied by
user
“Save project before build”
4‘b0010, 2‘hF1
any valid filename
[options]
errorlevel {0|1}
var_name...]
void main (void)
{ ...
}
RECOMMENDED READING
This user's guide describes how to use MCP355X Sensor Application Developer’s
Board. The following Microchip documents are available and recommended as
supplemental reference resources.
MCP3550/1/3 Data Sheet, “Low-Power Single Channel 22-Bit Delta-Sigma ADCs”
(DS21950)
This data sheet provides detailed information regarding the MCP3550/1/3 device.
AN1007, “Designing With The MCP3551 Delta Sigma ADC” (DS01007)
This application note documents the design decisions associated with this device.
Microchip provides online support via our web site at www.microchip.com. This web
site is used as a means to make files and information easily available to customers.
Accessible by using your favorite internet browser, the web site contains the following
information:
• Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents,
latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program
member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices,
distributors and factory representatives
CUSTOMER SUPPORT
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor, representative or field application engineer
for support. Local sales offices are also available to help customers. A listing of sales
offices and locations is included in the back of this document.
Technical support is available through the web site at: http://support.microchip.com
This chapter provides an overview of the MCP355X Sensor Application Developer’s
Board and covers the following topics:
• What is the MCP355X Sensor Application Developer’s Board?
• What the MCP355X Sensor Application Developer’s Board Kit includes
1.2WHAT IS THE MCP355X SENSOR APPLICATION DEVELOPER’S BOARD?
The MCP355X Sensor Application Developer’s Board allows for easy system design of
high resolution systems such as weigh scale, temperature sensing, or other small
signal systems requiring precise signal conditioning circuits. The reference design
includes firmware that performs all the necessary functions including ADC sampling,
USB communication for PC data analysis, LCD display output, zero cancellation, full
scale calibration, and units display in gram (g), kilogram (kg), or ADC output units.
Figure 1-1 shows the LCD display output in kg of a high resolution system.
The MCP355X Sensor Application Developer’s Board’s purpose is to ease development of small signal sensor MCP355X applications such as weigh scales. There are
two circuits, or channels, to allow for comparison of different approaches to signal
conditioning circuits. The first channel is a low-cost, low-power signal conditioning
circuit that uses Microchip’s MCP6XX amplifiers. This circuit is intended to be a
reference design for low power, low cost MCP355X applications requiring intermediate
ranges of signal gain.
The second channel uses a precision amplifier with high gain. It is intended to be a
reference design for MCP355X circuits that can require higher resolution.
The board has jumper connections and screw terminals to connect external sensors
such as load cells or RTD temperature sensors. The board easily accomodates both
4-wire and 6-wire load cells sensor connections.
The system includes two PICmicro MCUs for firmware development and data analysis
through either an LCD display or graphically on a PC using a USB connection. A
PIC16F877 communicates with the two MCP355X channels, push-buttons and LCD
display.
For data analysis on the PC the USB PIC18F4550 is used. This device collects the
post processed PIC16F877 data and passes it via USB to the PC for display on
DataView software.
Note 1:Higher resolution systems are possible with averaging and other design approaches, table only serves as
an example. Sensor used for these results was a 200 kg external load cell. Amplifier used in Channel 1
was MCP617 device. Amplifier used in Channel 2 was CS3002. All results using MCP3551 A/D Converter.
2.2SENSOR INPUT CONNECTIONS
There are three connectors located on the right hand side of the board for external
sensor input. The first is a standard DB9 connector that goes to a dual row 10-pin
header. Jumper wires must be used to connect the output of the header to the 12-pin
dual row headers going into either of the differential gain circuits described below.
In addition, there are two 3-terminal screw connectors, AUX1 and AUX2. These
connectors go directly into the right hand side of the 40-pin dual row connector P8.
Note:Connector P6 is the input for channel 1, and P7 is the input for channel 2.
Depending on which sensor inputs (AUX1, AUX2, or the DB9 connector) are
used to connect the external sensor to either channel, jumper wires must be
connected to bring the input into either P6 or P7.
P6 and P7 can be used to easily connect either 4 or 6-wire external load cell sensors.
Figure 2-3 describes how jumpers can be used to short the “In” and “Sense” inputs for
4-wire load cell connections.
FIGURE 2-3:6-Wire and 4-Wire Load Cell connections on P6 and P7.
The MCP355X Sensor Application Developer’s Board comes with 2 “Bridge Simulator”
Boards that can be used in place of external sensors during system development.
These boards are plugged directly into P6 and P7, see Section 2.5 “Bridge Simulator
Boards” for more information.
2.3CHANNEL 1 - LOW-COST DIFFERENTIAL GAIN CIRCUIT USING MCP6XX
AMPLIFIER
Channel 1 contains a differential gain circuit using a dual amplifier PDIP socket
populated with Microchip’s MCP617 amplifier with two analog switches for offset
cancellation. The goal of the circuit is to allow for the use of an operational amplifier
with higher offset drift (which will generally mean a lower cost amplifier). The MCP617
is populated and configured to provide a differential gain of 21.
The board comes populated with R
chosen such that the voltage noise at the output of the amplifier will be approximately
10 µV
using the MCP617 amplifier will not provide any additional improvement to the system.
Application note AN1030 details the operation of this circuit and also includes data and
test results using a variety of external sensors.
, substantially above the 2.5 µV RMS noise of the MCP3551. Higher gains
FIGURE 2-4:Channel 1 Differential Gain Circuit with analog switch offset
cancellation.
2.3.1Channel 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.
Channel 2 contains a differential gain circuit using a low noise amplifier from Cirrus
Logic, CS3002. The noise allows a differential amplifier gain of 103 V/V.
EQUATION 2-1:
G12
This was chosen so that the amplifier noise would be similar to that of the MCP3551
device, maximizing the resolution of the circuit. The board comes populated with
R
=100Ω and RF = 5.1 kΩ. Higher gains can be chosen, however in this case, the
G
gain was chosen to allow for headroom near the supply rails (+5V and ground) to
handle a large variety of sensors. For more information regarding gain selection and
circuit results, refer to application note AN1030, “Weigh Scale Applications for the
MCP3551”.
U6
MCP3551
V
V
V
JP2
IN-
IN+
REF
GAINDIRECTDIRECT+
GAIN+
VREF
RC7
VDD
〈〉+=
R
------R
F
G
CS3002
+
-
R
F
-
+
P7
-SENSE
-IN
R
G
-OUT
+OUT
+IN
+SENSE
FIGURE 2-5:High Gain Circuit Using CS3002.
2.4.1Channel 2 - Voltage Reference Selection
There are three options to select voltage reference for the MCP355X device for
channel 2. This is accomplished using the 14-pin dual row header JP2. There are three
options for voltage reference evaluation on the bottom of this header.
•V
REF
• PICmicro port pin RC6-7
•V
DD
The first selection uses the stand-alone voltage reference circuit included on the board,
populated with the low noise reference LM4140 from National Semiconductor
Corporation.The second selection allows for evaluation of using the PICmicro port pins
to supply the voltage reference for the circuit. The board uses two pins of the PICmicro
microcontroller for increased drive, RC6 and RC7 of the PIC16F877. The third
selection, V
, will supply the V
DD
directly from the output of JP1, which selects the
2.4.2Channel 2 - Direct-Connect Applications (No Amplifier or Gain)
Channel 2 can also be used to evaluate the MCP355X in a direct-connect sensor
configuration. This is accomplished using the 14-pin dual row header JP2. Changing
the headers to DIRECT+ and DIRECT- will take the signal present on the channel input
header (P7) directly into the MCP355X. Figure 2-6 represents this circuit configuration
using channel 2.
R
1
C
1
V
IN
VIN-
FIGURE 2-6:A Direct-connect Weigh Scale.
VDDV
+
MCP3551
V
REF
SS
2.5BRIDGE SIMULATOR BOARDS
There are two small boards included with the MCP355X Sensor Application
Developer’s Board. These boards represent a simulation of an external wheatstone
bridge that is either at zero-scale or full-scale. These boards come populated with
resistors that have a temperature drift specification of 10 ppm/C. For the best bridge
simulation, it is recommended that the bridges be populated with very low drift resistors
with a tempco value of 0.1 ppm/C. Typical load cell bridges will exhibit this output
temperature drift. These boards can be plugged in to either P6 or P7 to assist in
eliminating any error associated with an external sensor. Figure 2-7 represents the
bridge simulator boards and how they should be connected to the MCP355X Sensor
Application Developer’s Board. Refer to Appendix A. “Schematic and Layouts” for
complete schematic.
The MCP355X Sensor Application Developer’s Board contains two PICmicro MCUs,
the PIC18F4550, which is solely used to send ADC data to DataView on the PC and
the PIC16F877 which interfaces to the LCD display. Both controllers come programmed with dedicated firmware that is described in this chapter.
3.2PIC16F877
This device comes programmed with LCD firmware to ease weigh scale or other
system design. The three push buttons F1, F2, and F3 control both the MCP3551
sampling and LCD output through the PIC16F877.
3.2.1LCD Numerical Output Display
This display will change depending on the units selected and the values that are loaded
into the zero calibrate, full-scale calibrate, and full-scale value registers. To show raw
ADC output, the unit menu is used to select A/D units. When grams (g), or kilograms
(kg) is selected, Equation 3-1 represents the algorithm and formula applied to yield an
output on the LCD display.
MCP355X SENSOR APPLICATION
EQUATION 3-1:
ADC
⎛⎞
Output
Where:
ADC
VAL
ZERO
CAL
FS
CAL
DI SPLAY_FS_VAL=1, 2, 5, 10, 20, 50, 100, 200, or 500 (value selected
Note:The ZERO
disabled. See Section 3.2.2.1 “Zero calibrate” for complete
description
The right most button F3 is the menu control button.
.
FIGURE 3-1:LCD showing the Averaging Menu. Also shown are the F1, F2
and F3 buttons.
Pressing this button will cycle through the menu options and change the functionality
of the other two buttons, F1 and F2. The LCD text above the buttons describes the
functionality for the different menus.
Here are the LCD menus that can be selected using the F3 button:
• Zero Calibrate - Enable/Disable/Hold
• Channel Select
•Units
• Averaging
• Full-Scale Value Selection
• Full-Scale Calibration
There are four different menu options that will be described in individual sections.
3.2.2.1ZERO CALIBRATE
When in this menu, the first button becomes the ZERO button. When this button is
selected, the most recent ADC value after averaging will be loaded into the ZERO
register.
Zero calibration is also enabled or disabled by pressing the ZERO button. This is
indicated by a change of the spinning character on the far top-right of the display, (i.e.:
a LINE is inserted under the spinning character when zero calibration is turned ON.)
When enabled, ZERO
is subtracted as per Equation 3-1. Refer to Figure 3-2.
CAL
CAL
FIGURE 3-2:These two icons show the presence of the zero offset
substraction in the calculation. The icon on the right has a bar underneath that
represents when zero subtraction is enabled.
In disabled mode, ZERO
direct ADC value (units = ADU), the output is simply the decimal representation of
ADC
displayed.
Pressing the HOLD button freezes the LCD display to allow for viewing in fast sampling
modes (less averaging). Pressing the HOLD button again will resume normal
operation.
3.2.2.2CHANNEL SELECT
In this menu, the user has control over which channel is being sampled. There are four
options. Pressing either F1 or F2 cycles through these options:
. If zero calibrate is enabled, then ZERO
VAL
is not subtracted per Equation 3-1. When displaying the
CAL
is subtracted before the value is
CAL
Channel 1 Normal
In this mode, the PIC16F877 samples the MCP3551 on channel 1. The LCD text above
F2 will display “1N”. In the normal mode, the analog switches on this channel are set
to the “positive” polarity. Refer to Chapter 2. “Hardware Description” for more
description on the analog switch sampling.
Channel 1 Inverted
In this mode, the analog switches set to reverse polarity, and the inverted ADC sample
is displayed on the LCD display. The LCD text above F2 will display “1I”. Refer to
Chapter 2. “Hardware Description” for more description on the analog switch
sampling.
Channel 1 Switched
In this mode, the PIC16F877 is switching back and forth between positive and reverse
polarity and the averaged value is displayed on the LCD display. The LCD text above
F2 will display “1S”. Refer to Chapter 2. “Hardware Description” for more description
on the analog switch sampling.
Channel 2
In this mode, the PIC16F877 is sampling channel 2. This channel is the high gain circuit
using amplifier CS3002. The resulting code is displayed on the LCD display.
3.2.2.3UNITS
There are three units: A/D Units (ADU), grams (g), or kilograms (kg). When in this
menu, pressing either F1 or F2 will change the text to the right of the numerical output
to the proper unit and also display the appropriate representation of the A/D sample.
3.2.2.4AVERAGING
In the averaging menu, the user can select how many samples are collected before the
value is applied to the LCD output. This averaging applies all sampling situations, i.e.
when calibrating zero, full scale, or displaying the output after calibration. The user can
select between 1 (no averaging), 2, 4, 8, or 16 averages. The output noise of the
system will be reduced by the square root of the number of averages per the equation
below.
Note:If the channel mode “Channel 1 Switching” is selected, the averaging will
actually be twice due to the positive and reverse polarity switched samples
being collected.
3.2.2.5FULL-SCALE VALUE SELECTION
This menu options loads the DISPLAY_FS_VAL register. This is to allow for proper LCD
display during system design. For example, if a system is being designed that uses
“100 grams” as the full-scale calibration weight, this menu is used to set the value “100”
into the DISPLAY_FS_VAL register. The full-scale value options are 1, 2, 5, 10, 20, 50,
100, 200, or 500.
Note:When displaying the value on the LCD display, the decimal point does not
move. This is to relax the LCD activity and keep the decimal point (and all
digits) from constantly switching location when the LCD output is
calculated.
3.2.2.6FULL-SCALE CALIBRATION
When in this menu, the second button becomes the calibrate full-scale button, labeled
OK. When this button is selected, the most recent ADC value, after averaging, will be
loaded into the FS
CAL
register.
3.3PIC18F4550
This device acts as I2C slave and passes the PIC16F877 output data from either
channel 1 or channel 2 to the DataView on the PC. All averaging and channel 1
switching that is performed by the PIC16F877 occurs before the data is passed to the
PIC18F4550 and PC.
Note:The PIC18F4550 passes data to DataView on the PC coming from the
PIC16F877. This allows a system developer to write PIC16F877 firmware
that averages or otherwise post processes ADC data and then use the PC
to view this post processed data, see section below. Refer to Figure 2-1 for
Data Flow.
DataView is a graphical data analysis tool that interfaces to many of Microchip’s
stand-alone A/D converter demonstration or evaluation boards via USB interface. Each
installation of Dataview is specific to the A/D converter and will contain one or more of
the following graphical output windows:
• Scope Plot
• Histogram
• Auxiliary Data
MCP355X SENSOR APPLICATION
DEVELOPER’S BOARD USER’S GUIDE
Chapter 4. DataView
Note:IMPORTANT! For the MCP355X Sensor Application Developer’s Board,
the USB microcontroller (PIC18F4550) is collecting post-processed data
from the PIC16F877. By pressing the push button switches on the
reference design and changing the processing that occurs on the
PIC16F877, the data shown on DataView is also changed.
4.2SCOPE PLOT WINDOW
The scope plot window graphs the A/D output as a function of sample or time. Each
consecutive sample is added to the right of the data set and when the sample size is
full, the scope plot will scroll to the left. The y-axis is displayed as the ADC code and
the x-axis is given as sample number. The sample size can be changed in the
configuration window.
The noise histogram window displays the ADC output in histogram form, building the
number of occurrences in each bin with each consecutive sample. The difference
between each bin from the mean in units of LSB is given as the y-axis. The sample size
can be changed in the configuration window.
FIGURE 4-2:Noise Histogram Window.
4.4AUXILIARY DATA WINDOW
The auxiliary data window shows calculated data based on the current sample size.
The mean of the sample set is given in both LSB and PPM. The standard deviation or
RMS output noise is given in units PPM. The overflow bits of the MCP3551 are also
monitored and the overflow bits are also given for both overflow high and overflow low
situations.
The sample size and polling interval of the USB interface can be changed to
accommodate customized firmware on the PICmicro microcontroller side. The units of
millisecond, seconds, minute, hour or day can be used to change the functionality of
the system. This allows the device to be used as a “Data Logger”. Note that if the polling
interval is shorter than the sampling rate on the hardware size, duplicate data will be
included in the sample set.