Tutorial 1
Tutorial 1
50 Type K Thermocouple
45
Key Words and Phrases 40
35
• Op Amp 30
25
• Temperature 20
15
• Thermal Gradient 10
Thermo
5
• Thermocouple Junction 0
-5
• Thermoelectric Voltage -10
-300
-200
-100
0
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
1400
• IC Sockets
• Contact Potential Thermocouple Temperature (°C)
RG RF
VIN VOUT
VDD
RN
C1
U1
Constant
Heat Source Temperature
Contour
Lines
VIN RF U1 VDD
RG
RN C1
VOUT
R1A EQUATION 3:
VTHy R1B
G N = 1 + RF R G
R1A VTHy VOUT = V IN + V THx G N – V THx G N – 1 + V THx
R1B = V IN G N + 2V THx
Where:
R1A = R1B = 2R1 When the gain (GN) is high, the thermoelectric
voltage’s contribution to the output error is relatively
FIGURE 10: Parallel Resistor small. This layout may be good enough in that case.
Substitution. Notice that the cancellation between RN and RG is
critical.
NON-INVERTING AMPLIFIER We have a better layout shown in Figure 13.
Figure 11 shows a non-inverting amplifier. We will start Recognizing that subtracting the last term in the VOUT
with the layout in Figure 12 (previously shown in equation (middle equation in Equation 3) completely
Figure 6). The resistor RF is horizontal so that all of the cancels the thermoelectric voltages, the resistor RF
thermoelectric voltages may be (hopefully) cancelled. was oriented in the reverse direction.
The model shows how the thermoelectric voltages
modify the circuit. VDD
RF U1
RG
U1 RN C1
VDD VIN
VIN
C1 VOUT
RN
C1
VOUT VDD
RG RF VIN U1
RN VTHx
FIGURE 11: Non-inverting Amplifier.
VOUT
RG V RF V
THx THx
RN
U1B
VOUT–
VIN+
VIN–
TEMPERATURE
There are many ways to measure temperature [4, 5, 6].
We could use thermocouples, RTDs, thermistors,
diodes, ICs or thermal imagers (infrared cameras) to
measure the temperature.
Figure 21 shows a circuit based on the MCP9700 IC
+25.1°C +26.1°C +26.3°C temperature sensor. Because all of the components
(T = +1.0°C) draw very little current, their effect on PCB temperature
will be minimal. There is enough filtering and gain to
FIGURE 20: Example of Mismatching the make VOUT easy to interpret. This circuit can be built on
Component Sizes. a very small board of its own, which can be easily
placed on top of the PCB of interest.
VDD = 5.0V
U1 100 nF
C1 MCP9700
1.0 µF
Temp.
Sensor TPCB
R1
100 kΩ
VDD C4
100 nF
VDD
U2
R2 MCP6041
113 kΩ
VOUT
R3 R4 R5 R6
12.4 kΩ 100 kΩ 1.00 MΩ 1.00 kΩ
C2
1.0 µF C3
22 nF
EQUATION 7:
VOUT = 500 mV + T PCB 100 mV/C
VIN
RS
VS
FIGURE 29: Equivalent Circuit for Unity FIGURE 31: Equivalent Circuit for Non-
Gain Buffer with Guard Ring. inverting Amplifier with Guard Ring.
One example of an application that sometimes uses
Transimpedance Amplifier
unity gain op amps are pH meters. In that case, how-
ever, both VIN and RN are located off the PCB; the Figure 32 shows a photo-diode at the input of a
guard ring only needs to surround U1’s non-inverting transimpedance amplifier, with a guard ring. This guard
input. ring is biased at ground; it protects (surrounds) the op
amp’s inverting input (and all top metal connected to it)
Non-inverting Gain Amplifier on the PCB surface. RF is high valued for the DC gain
Figure 30 shows a non-inverting gain amplifier with a (VOUT/ID1).
guard ring. This guard ring is biased by VOUT, RF and
RG; it protects (surrounds) the op amp’s non-inverting VDD
input (and all top metal connected to it) on the PCB RF U1
surface. RF and RG are low impedance, to drive the
guard ring properly. RN is a low valued resistor that CF
cancels thermojunction voltage effects, but has little C1
effect on bias current errors (e.g., IBRN << ±1 mV). D1
VOUT
RF CF
VDD
U1 RF
RG
VOUT
ID1
VIN C1 VDD
RN U1 C1
VOUT D1
VDD C1
FIGURE 32: Photo-diode and
VIN U1 Transimpedance Amplifier, with Guard Ring.
RN The parasitic resistances are connected as shown in
Figure 33. Similar to the Non-inverting Gain Amplifier in
VOUT the last section, U1’s offset voltage (VOS) is across RP1,
RG RF which greatly reduces its leakage current. The other
parasitic resistances are connected to ground; they do
FIGURE 30: Non-inverting Gain Amplifier not affect the performance. The leakage current is
with Guard Ring. typically reduced by a factor of about 1000.
Top Trace
CF RP2
RP1
RF RP1
VOUT
ID1
VDD Bottom Trace
U1 C1 FIGURE 34: Equivalent Circuit for
D1
Parallel Traces, Opposite Surfaces.
RP3
Any two metal areas on the PCB (on a surface or buried
in an inner layer), at different potentials, will have a
FIGURE 33: Equivalent Circuit for Photo- leakage current between them. The value of the
diode and Transimpedance Amplifier, with Guard parasitic (bulk) resistance depends on:
Ring. • The geometry of the areas
- The distance between
Guard Rings on Both PCB Surfaces
- The cross sectional area seen by the current
For op amps in through-hole packages (e.g., PDIP),
• Nearby metal objects (e.g., a guard ring) that
guard rings are needed on both top and bottom
modify the current flow path
surfaces. The same design principles apply to both
surfaces. • The volume resistivity (ρV)
- Dielectric material
Any jumper traces (via to other surface, trace and via
back to the original surface), connected to traces with - Exposure to chemicals (e.g., water)
guard rings, also need guard rings around the jumper The following discussion shows simple techniques to
traces. It is better, when possible, to avoid jumper minimize these leakage currents. See Appendix B:
traces for critical nodes. “PCB Parasitic Resistance” for ways to estimate bulk
leakage currents.
PCB Bulk Leakage
SEPARATION
The dielectric material used in a PCB (e.g., FR4) is an
Moving traces to the surfaces, from inner layers,
insulator. Its resistance to leakage currents through the
increases the distance between them (e.g.,
bulk (the dielectric) is described by its volume resistivity
Example 1).
(ρV). ρV values vary considerably, depending on the
dielectric and on ambient conditions. Example 2 shows two parallel traces, with a distance
separating them. This extra distance increases the
Usually, bulk leakage currents are much smaller than
parasitic resistance.
surface leakage currents; they can be neglected in
many designs. Designs that minimize surface leakage
currents, however, may be affected by bulk currents. EXAMPLE 2: TWO PARALLEL TRACES,
WITH OFFSET
Example 1 shows one example of how bulk leakage
currents occur. Two traces run in parallel and are Top View
separated by the dielectric. The leakage current
between the traces, flowing through the dielectric, is
modelled by a parasitic resistor (see RP1 in Figure 34).
Top View
GUARD RINGS
Example 4 shows a trace on the left (node 1), a guard
ring (node 2) and a sensitive trace (node 3). The guard RPB1 RPB3 RPB5 RPB7
ring provides a low resistance path that redirects some V1 V3
of the current between node 1 and node 3 to itself. RPB2 RPB4 RPB6 RPB8
RPB2 in Figure 35 acts as an attenuator to the input
voltage (V1). When V2 ≈ V3, the parasitic current (into
V3) is significantly reduced.
V2 (guard plane)
EXAMPLE 4: TWO PARALLEL TRACES, FIGURE 36: (Lumped) Equivalent Circuit
WITH GUARD RING for Two Parallel Traces, With Guard Plane.
Top View
DIELECTRIC MATERIAL
Changing the dielectric material changes its bulk
resistivity (ρV) and susceptibility to humidity. For
designs that need exceptional performance, this is an
option worth exploring.
MOISTURE CONTROL
When a dielectric is exposed to moisture for an
extended period of time, it can become wet. This
End View Side View
reduces its bulk resistivity (ρV).
Measures to control exposure to moisture reduce this
effect. One possibility is the use of coatings.
15
16
17
11 13 12
19
14
N/C
VDD
FIGURE A-1:
VDD
DS01258B-page 20
U1
APPENDIX A:
1 28
AN1258
MCLR/VPP/RE3 RB7/KBI3/PGD
VDD R5
2 27 10K
VOUT RA0/AN0 RB6/KBI2/PGC
C11 3 26
0.1UF VSHIFT RA1/AN1 RB5/KBI1/PGM ALERT
U3 R14 U2 VDD
4 RA2/AN2/VREF–/CVREF 25
1.0K VREF CVREF RB4/AN11/KBI0
1 VDD SDA 5 VOUT 2 VDD
SDA 5 24
2 3 VDD C5 RA3/AN3/VREF+ RB3/AN9/CCP2/VPO
VSS VSS R1
3ALERT SCLK4
SCL VIN 1uF 6 23 10K
R16 1 RA4/TOCKI/C1OUT/RCV RB2/AN8/INT2/VMO R2
ALERT R15
MCP1541 7 22
RA5/AN4/SS/HLVDIN/C2 RB1/AN10/SCK/SCL
C9 10K SCL
1.0K MCP9800_SOT23-5 1.0K C12
0.1uF 22pF 8 VSS 21
RB0/AN12/SDI/SDA SDA
9 VDD
Y1 OSCI/CLKI VDD 20
20 MHz 10
OSC2/CLKO/RA6 VSS 19 C1
11 18 0.1UF
RC0/T1OSO/T13CKI RC7/RX/DT/SDO
C10 12 17
22pF RC1/T1OSI/CCP2/UOE RC6/TX/CK
13 16
RC2/CCP1 RC5/D+/VP
14 15
VUSB RC4/D–/VM
C8
REFERENCE DESIGN)
0.47uF
PIC18F2550–SOIC28
VDD R3 L1
1 OHM 10uH
N/C
1 2 3 4 5
VDD C3 R4 9
C2 C4 6
1uF 10uF 10uF 100K 10 11
U4 C14 J3
0.1UF 8 7
1 VOUT VDD
C13
J1 U5 0.1UF 2nd Order RC
THERMO_CONN Low-Pass Filter
1 NC NC 8
R6 100 2 VIN– 7 VOUT2
VDD
3 6 R12 R13
VIN+ VOUT VOUT
R7 100 4 5 499 499
VSS NC
C6 C7
MCP6V01_SOIC 0.1uF
VOUT1 0.1uF
R10 R11
5.6K 100K
VREF
VREF
V2
R2
R1
V0 V1
V3
R3
R4
V4
EQUATION B-1:
R1 = ρS ∆x / ∆y, for surface calculations
= ρV ∆x / (∆y ∆z), for bulk calculations
Where:
ρS = Local Surface Resistivity (MΩ)
ρV = Local Bulk Resistivity (MΩ cm)
∆x = grid spacing in the x-direction
∆y = grid spacing in the y-direction
∆z = z-dimension (common to all objects)
EQUATION B-2:
V0 = (V1/R1 + V2/R2 + V3/R3 + V4/R4)
/ (1/R1 + 1/R2 + 1/R3 + 1/R4)
= (V1 + V2 + V3 + V4) / 4, all Rs equal
• 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.
ISBN: 978-1-62076-404-6
QUALITY MANAGEMENT SYSTEM Microchip received ISO/TS-16949:2009 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
CERTIFIED BY DNV Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
== ISO/TS 16949 ==
are for its PIC® MCUs and dsPIC® DSCs, KEELOQ® code hopping
devices, Serial 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.