Microchip Technology AC164120 User Manual

Page of 36
 2004 Microchip Technology Inc.
DS51476A-page 21
SIGNAL ANALYSIS PICtail™
DAUGHTER BOARD USER’S GUIDE
Chapter 3.  Lesson Projects
3.1
INTRODUCTION
The Signal Analysis PICtail Daughter Board can capture a variety of DC and AC signals 
from the RC0/AN4 I/O port pin of the PIC16F684 using the internal 10-bit ADC. Ensure 
that the applied signal does not exceed 5V peak-to-peak. If the signal is DC, ensure 
that the voltage levels do not fall below 0V or exceed +5V. If the signal is AC, DC 
decouple the signal using a decoupling capacitor and ensure that the signal level does 
not exceed the DC limits stated above. Lesson 1 demonstrates how a DC signal can 
be displayed from a thermistor. Lesson 2 demonstrates how an AC signal can be 
displayed from a photodiode.
In addition to capturing analog signals, the Signal Analysis PICtail Daughter Board can 
generate low frequency sine waves from Pulse Width Modulated (PWM) signal from 
the ECCP module. I/O port pin RC5 is connected to a low-pass RC filter (R1 and C4) 
and made available as a test point on the edge of the PCB. Lesson 3 demonstrates 
how a 125 Hz sine wave can be generated.
3.2
HIGHLIGHTS
The following lessons are discussed in this chapter:
• Lesson 1 – Thermistor
• Lesson 2 – Photodiode
• Lesson 3 – Pulse Width Modulated Generated Sine Wave
3.3
LESSON 1 – THERMISTOR
A thermistor is a resistor that changes resistance in response to temperature changes. 
Some have a positive temperature coefficient where the resistance increases with 
temperature and others have a negative coefficient. For temperature measurement 
purposes, the Negative Temperature Coefficient (NTC) versions are more linear.
The simplest configuration is shown in Figure 3-1. It is a resistor divider network where 
the thermistor and a second resistor are connected in series between ground and a 
voltage reference. The voltage between the resistors varies with the temperature and 
can be measured via an A2D Converter. Also, this configuration has the added benefit 
that voltage increases with temperature.
The voltage at the center is given by ADC counts = 1024 * R/(R+Rt). In this example, 
the thermistor specified for 10 k
Ω at 25C. The bottom resistor is chosen to be 3.3 kΩ. 
That means 254 ADC counts correlates to 25C. Since the ADC is referenced to 5V 
(nominal) 254 counts * 5/1024 = 1.241V.
Start the PICkit 1 Signal Analysis PC Application. Select the Real Time button, click on 
the Strip Chart icon, and then click Go. By changing the temperature of the thermistor, 
the response can be observed in real-time on the strip chart display. An example 
screen capture is shown in Figure 3-2.
For more information about thermistors, see Microchip Application Notes AN685, 
AN689, AN867 and AN897, available on the PICkit 1 CD-ROM and on the Microchip 
web site: www.microchip.com.