PIC16F690DM-PCTLHS Microchip Technology, PIC16F690DM-PCTLHS Datasheet

BOARD DEMO PICTAIL HUMIDITY SNSR

PIC16F690DM-PCTLHS

Manufacturer Part Number
PIC16F690DM-PCTLHS
Description
BOARD DEMO PICTAIL HUMIDITY SNSR
Manufacturer
Microchip Technology
Series
PICtail™r

Specifications of PIC16F690DM-PCTLHS

Sensor Type
Humidity
Sensing Range
1 ~ 99% RH
Interface
Analog
Voltage - Supply
5V
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
MCP6291, PIC16F690
Processor To Be Evaluated
MCP6291 and PIC16F690
Interface Type
ICSP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With
AC162061 - HEADER INTRFC MPLAB ICD2 20PIN
Sensitivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Lead free / RoHS Compliant
INTRODUCTION
Target Audience
This application note is intended for hardware and
firmware design engineers that need to accurately
detect small capacitance values.
Goals
• Detect small capacitances (e.g., 0.5 pF to 6.5 nF)
• Use minimal number of external components
• Give simple firmware solution
• Highlight design tradeoffs and alternatives
Description
This application note shows how to use a PICmicro
microcontroller and minimal external circuitry to detect
small capacitances. The design is based on an opera-
tional amplifier (op amp) integrator. A capacitive
humidity sensor is used to illustrate this type of
application.
The design is measured to verify the theory and design
choices. Alternatives and modifications to this design
are briefly discussed.
References to documents that treat these subjects in
more depth and breadth have been included in the
“References” section.
The appendices give detailed information that supports
the text of this application note.
Related Demo Board
The measurements for this application note were made
on the Humidity Sensor PICtail™ Demo Board, which
is discussed in the user’s guide (DS51594) [15]. This
board is further described by:
• Order Number: PIC16F690DM-PCTLHS
• Assembly Number: 102-00084R1
© 2005 Microchip Technology Inc.
Detecting Small Capacitive Sensors Using the MCP6291 and
Author:
Kumen Blake and Steven Bible
Microchip Technology Inc.
PIC16F690 Devices
®
INTEGRATOR SOLUTION
This section describes a design that accurately
measures small capacitances. It uses dual slope
integration to measure the sensor’s capacitance. Using
an integrator for measuring small capacitive sensors
has three main advantages:
• Any sensor parasitic capacitance (i.e., case-to-
• The parasitic capacitance in parallel is much
• The measured waveform has a constant slope,
Block Diagram
Figure 1 shows the block diagram of the integrator
solution. The “Square Wave Source” voltage (V
converted to a square wave current (I
passed to an integrator comprised of an op amp and
the sensor capacitor (C
voltage triangle wave (V
C
V
voltage (V
The “Magnitude Control” firmware routine changes the
polarity of V
V
firmware routine counts the time elapsed for V
from V
The “Calculations” firmware routine calculates C
then the relative humidity (RH) from that capacitance.
SEN
RH
SEN
ground stray) is forced to the correct voltage by
the op amp.
smaller than other methods.
which improves the timing accuracy.
. The “Threshold Crossing Detector” tells when
by the desired amount. The “Timing Count”
is above or below two reference voltages: a lower
RL
to V
RL
INT
) and a higher voltage (V
RH
so that V
(t
1
), and to go from V
AN1016
SEN
SEN
SEN
). The “Integrator” outputs a
) whose slope depends on
goes past both V
RH
DS01016A-page 1
INT
).
RH
). I
to V
INT
SEN
RL
RL
is then
INT
to go
and
(t
SEN
) is
2
).

Related parts for PIC16F690DM-PCTLHS

PIC16F690DM-PCTLHS Summary of contents

Page 1

... The measurements for this application note were made on the Humidity Sensor PICtail™ Demo Board, which is discussed in the user’s guide (DS51594) [15]. This board is further described by: • Order Number: PIC16F690DM-PCTLHS • Assembly Number: 102-00084R1 © 2005 Microchip Technology Inc. PIC16F690 Devices ...

Page 2

... INT . SEN will have a constant positive SEN INT DD V – V INT CM = ---------------------------- - R INT I INT = ------------ - , I is constant INT C SEN V – V INT CM = ---------------------------- - , V is constant INT R C INT SEN is set to one of two levels: REF, (0.125V ), and (0.500V ). V was © 2005 Microchip Technology Inc. 1 ...

Page 3

... INT GBWP Where amp’s Gain Bandwidth Product GBWP To maintain accuracy, the op amp feedback loop needs sufficient loop-gain. This translates to the following requirement SEN © 2005 Microchip Technology Inc. EQUATION 4: goes SEN Where GBWP = LG For instance, given a 0.5% accuracy requirement, and ...

Page 4

... Humidity Sensor project 80 90 100 These files can be downloaded from the Microchip web site (www.microchip.com); and are contained in the 00084R1.zip file. = +25°C. A SEN to a known point before SEN when starting then to RH. SEN © 2005 Microchip Technology Inc. ...

Page 5

... V ), using the internal RL RH ADC, or calibrate the entire circuit’s errors (including temperature drift). © 2005 Microchip Technology Inc. Capacitance Module Table 2 shows the algorithm for the capacitance module, and includes the PICmicro microcontroller’s SEN pin states. The pin assignments on the Humidity Sensor PICtail™ ...

Page 6

... They can be quite accurate with proper calibration, and they can be either simple or complicated. DD_DIG INT INT INT C V SEN SEN 100 nF R CM1 MCP6291 R CM2 100 nF Op Amp Integrator Circuit is the sensor’s case-to-ground para- should be placed chosen to minimize the effort to . SEN © 2005 Microchip Technology Inc. ...

Page 7

... Oscillator frequency Note that when we subtract V RL comparator’s offset voltage is cancelled (because it is constant). © 2005 Microchip Technology Inc. The op amp’s gain-bandwidth product can have a significant effect on the errors for small C see Equation 4. The smaller C error is. Errors in Calculating C The parasitic capacitance C about 0 ...

Page 8

... N/A 0.5 pF 1.6% ±0.1 pF ±0.3% 0.25% 1.5% ±0.05 pF ±0.3% — ±3% — ±1% — ±0.01% 2 (“Error in k” ’s contribution to the B_OA – has a nominal RH RL © 2005 Microchip Technology Inc. ...

Page 9

... The measurements were made on the Humidity Sensor PICtail™ Demo Board, which is discussed in the user’s guide (DS51594) [15]. This board is further described by: • Order Number: PIC16F690DM-PCTLHS • Assembly Number: 102-00084R1 FIGURE 7: V and V INT ...

Page 10

... I ratiometric, INT INT is ratiometric SEN and and V ) need and V need RH RL range is more accurate than the REF range is V – 1.5V, CMR DD /2) when DD when DD = 0.125V RL in the lower CV range. REF DD ) and to the board. REF © 2005 Microchip Technology Inc. DD ...

Page 11

... Series Microcontrollers”, John Day and Steven Bible; Microchip Technology Inc., 2004. [12] MCP6291/2/3/4/5 Data Sheet, “1.0 mA, 10 MHz give detailed Rail-to-Rail Op Amp,” Microchip Technology Inc., DS21812, 2004. [13] PIC16F685/687/689/690 Data Sheet, “20-Pin Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology”, Microchip Technology Inc., DS41262, 2005. [14] PIC16C745/765 Data Sheet, “ ...

Page 12

... Microchip Technology Inc. ...

Page 13

... 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. ...

Page 14

... Fax: 886-3-572-6459 Taiwan - Kaohsiung Tel: 886-7-536-4818 Fax: 886-7-536-4803 Taiwan - Taipei Tel: 886-2-2500-6610 Fax: 886-2-2508-0102 Thailand - Bangkok Tel: 66-2-694-1351 Fax: 66-2-694-1350 © 2005 Microchip Technology Inc. EUROPE Austria - Wels Tel: 43-7242-2244-399 Fax: 43-7242-2244-393 Denmark - Copenhagen Tel: 45-4450-2828 Fax: 45-4485-2829 France - Paris Tel: 33-1-69-53-63-20 ...

Related keywords