CN0153

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Circuit Note

CN-0153
Devices Connected/Referenced
Circuit Designs Using Analog Devices Products ARM7-Based Microcontroller with
Apply these product pairings quickly and with confidence. ADuC7122 12-Bit, 1 MSPS SAR ADC, VDAC,
For more information and/or support call 1-800-AnalogD and PWM
(1-800-262-5643) or visit www.analog.com/circuit.
ADP3333 3.3 V Output Linear Regulator

USB Based Temperature Monitor Using the ADuC7122 Precision Analog


Microcontroller and an External Thermistor

CIRCUIT FUNCTION AND BENEFITS


This circuit shows how the ADuC7122 precision analog temperature coefficient. Thermistors are inexpensive and have
microcontroller can be used in an accurate thermistor high sensitivity. They detect small variations in temperature,
temperature monitoring application. The ADuC7122 integrates which could not be observed with an RTD or a thermocouple.
a multichannel 12-bit SAR ADC, twelve 12-bit DACs, a 1.2 V However, thermistors are highly nonlinear; thus, they are
internal reference, as well as an ARM7 core, 126 kB flash, 8 kB limited to applications with very narrow temperature ranges if
SRAM, and various digital peripherals, such as UART, timers, linearization techniques are not applied. Circuit linearization
SPI, and two I2C interfaces. The ADuC7122 is connected to a techniques can be accomplished in software; however, that will
4.7 kΩ thermistor. not be discussed here.

Due to the small form factor of the ADuC7122 (7 mm × 7 mm, Despite the powerful ARM7 core and high speed SAR ADCs,
108-ball BGA package) the entire circuit will fit on an extremely the ADuC7122 still provides a low power solution. With the
small PCB, thus further reducing cost. ARM7 core running at 326.4 kHz and the primary ADC active
and measuring the external temperature sensor, the entire
Similar in function to an RTD, thermistors are low cost circuit typically consumes 7 mA. Between temperature
temperature sensitive resistors and are constructed of solid measurements, the ADC and/or the microcontroller can be
semiconductor materials, which exhibit a positive or negative switched off to further save on power consumption.

3.3V
USB HEADER
FERRITE ADP3333-3.3 FERRITE
BEAD* BEAD* 10Ω 3.3V
5V IN OUT

D– 4.7µF 4.7µF 4.7µF


0.1µF 0.1µF

D+
FT232QN
GND RxD AVDD DVDD
0.1µF BUF_VREFx
SHIELD TxD 4.7kΩ 0.1µF
FERRITE THERMISTOR ADuC7122
BEAD* ADC0 VREF 1.2
4.7kΩ, 0.1%
VREF 1.5
RxD
P1.0/SIN
P1.1/SOUT 0.47µF 0.47µF
TxD
09004-001

*1kΩ @ 100MHz TAIYO YUDEN BK2125HS102-T

Figure 1. ADuC7122 Used As a Temperature Monitor Interfaced to a Thermistor (Simplified Schematic, All Connections Not Shown)

Rev. 0
“Circuits from the Lab” from Analog Devices have been designed and built by Analog Devices
engineers. Standard engineering practices have been employed in the design and construction of
each circuit, and their function and performance have been tested and verified in a lab environment
at room temperature. However, you are solely responsible for testing the circuit and determining its
suitability and applicability for your use and application. Accordingly, in no event shall Analog One Technology Way, P.O. Box 9106, Norwood, MA 02062-9106, U.S.A.
Devices be liable for direct, indirect, special, incidental, consequential or punitive damages due to Tel: 781.329.4700 www.analog.com
any cause whatsoever connected to the use of any“Circuit from the Lab”. (Continued on last page) Fax: 781.461.3113 ©2010 Analog Devices, Inc. All rights reserved.
CN-0153 Circuit Note
CIRCUIT DESCRIPTION
The circuit shown in Figure 1 is powered entirely from the USB The input thermistor circuit in Figure 2 is designed to produce
interface. The 5 V supply from the USB is regulated to 3.3 V accurate temperature measurements from 0°C to 90°C. Note
using the ADP3333 3.3 V low dropout linear regulator. The that this system contains no temperature calibration. This
regulated 3.3 V supplies the DVDD voltage to the ADuC7122. circuit contains a simple thermistor circuit that does not
The AVDD supply to the ADuC7122 has additional filtering as contain circuit linearization. If this circuit employed
shown. A filter is also placed on the USB supply at the input of linearization techniques, it could function over a broader range
the linear regulator. of temperatures; however, this would decrease the resolution of
the sensor.
The following features of the ADuC7122 are used in this
application:
VREF
• 12-bit SAR ADC
VREF
• ARM7TDMI® core: The powerful 16-/32-bit ARM7 RTH
core with integrated 126 kB flash and SRAM memory 4.7kΩ @ 25°C

runs the user code that configures and controls the VADC 12-BIT ADC
ADC, processes the ADC conversions from the
R
thermistor sensor, and controls the communications

09004-002
4.7kΩ
over the UART/USB interface. AGND
• UART: The UART was used as the communication AGND
interface to the host PC.
Figure 2. Simple Temperature Sensor Circuit Implemented
• Two external switches\buttons (not shown) are used with the ADuC7122
to force the part into its flash boot mode: By holding
DOWNLOAD low and toggling the RESET switch,
the ADuC7122 will enter boot mode instead of The circuit in Figure 2 is setup in a voltage divider configuration.
normal user mode. In boot mode, the internal flash This will allow us to transform the ADC result, D, into a
may be reprogrammed through the I2CWSD tool measurement of the resistance of RTH (thermistor) using the
utilizing the USB interface. following formulas:
• BUF_VREF: The band gap reference also connects VADC = VREF × [R/(R + RTH)]
through buffers to the BUF_VREF1 and the
D = 2N × (VADC / VREF)
BUF_VREF2 pins, which can be used as a reference for
other circuits in the system. A minimum of 0.1 µF RTH = R × [(2N/D) – 1]
capacitor should be connected to these pins to reduce Once the resistance of the thermistor has been calculated, the
noise. Steinhart-Hart equation can be used to determine the current
temperature of the sensor.
The thermistor used in the circuit is a 4.7 kΩ resistor, model
number NCP18XM472. It is available in a 0603 surface-mount Using the following formula the ADuC7122 is able to determine
package. The thermistor used in the circuit in Figure 2 has the the sensor temperature:
following specifications at 25°C: β = 3500 (the β parameter (T1 × β )
describes resistance as a function of temperature), resistance R
ln 25 R 
(R25) = 4.7 kΩ T2 =  TH 
β
− T1
The USB interface to the ADuC7122 is implemented with R
ln 25 R 
an FT232R UART to USB transceiver, which converts USB  TH 

signals directly to the UART protocol. where:


In addition to the decoupling shown in Figure 1, the USB cable T2 = unknown temperature
itself should have a ferrite for added EMI/RFI protection. T1 = 298K
The ferrite beads used in the circuit were Taiyo Yuden,
BK2125HS102-T, which have an impedance of 1000 Ω at β = β parameter of the thermistor @ 298K or 25°C. β = 3500
100 MHz. R25 = resistance of thermistor @ 298K or 25°C. R25 = 4.7 kΩ

The circuit must be constructed on a multilayer PC board with RTH = resistance of thermistor @ unknown temperature as
a large area ground plane. Proper layout, grounding, and calculated by formula above
decoupling techniques must be used to achieve optimum
performance (see Tutorial MT-031, Tutorial MT-101, and the
ADuC7122 Evaluation Board layout).
Rev. 0 | Page 2 of 4
Circuit Note CN-0153
Figure 3 plots the response of the ADuC7122 to the thermistor COMMON VARIATIONS
sensor detailed in Figure 2 over temperature. The ADP3333 (3.3 V) can be replaced with the ADP120 (2.5 V),
2.5 which has a wider operating temperature range (−40°C to
+125°C) and consumes less power (typically 20 μA vs. 70 μA)
but has a lower maximum input voltage range (5.5 V vs. 12 V).
2.0
Note that the ADuC7122 can be programmed or debugged via
ADC CONVERSION RESULT (V)

a standard JTAG interface. For a standard UART to RS-232


1.5 interface, the FT232R transceiver could be replaced with a
device such as the ADM3202, which requires a 3 V power
1.0 supply.
The thermistor circuit described here can be adapted to operate
0.5 with other precision analog microcontrollers, such as the
ADuC7020 series, the ADuC7023, and the ADuC7061 series.
0

09004-003
–20 –10 0 10 20 30 40 50 60 70 80 90 100 110
TEMPERATURE (°C)
LEARN MORE
Source code zip file: www.analog.com/CN0153_Source_Code
Figure 3. ADuC7122 Thermistor Sensor Measured Output
(Converted to Volts) with ADC0 vs. Temperature ADIsimPower Design Tool. Analog Devices.
CN-0075 Circuit Note, USB Based Temperature Monitor Using
CODE DESCRIPTION the ADuC7061 Precision Analog Microcontroller and an
The source code and a HyperTerminal configuration file used External RT. Analog Devices.
to test the attached circuit can be downloaded as a zip file at Kester, Walt. Sensor Signal Conditioning. Chapter 7,
www.analog.com/CN0153_Source_Code. “Temperature Sensors.” 1999. Analog Devices.
The UART is configured for a baud rate of 9600, 8 data bits, no Kester, Walt. Sensor Signal Conditioning. Chapter 8, “ADCs for
parity, no flow control. If the circuit is connected directly to a Signal Conditioning.” 1999. Analog Devices.
PC, a communication port viewing application such as
Looney, Mike. RTD Interfacing and Linearization Using an
HyperTerminal can be used to view the results sent by the
ADuC706x Microcontroller, AN-0970 Application Note.
program to the UART. See Figure 4. The source code is
Analog Devices.
commented to make it easier to understand and manipulate.
The code was compiled and tested using the Keil µVision 3 MT-031 Tutorial, Grounding Data Converters and Solving the
application. Mystery of "AGND" and "DGND," Analog Devices.
MT-101 Tutorial, Decoupling Techniques, Analog Devices.
Data Sheets and Evaluation Boards
ADM3202 Data Sheet
ADP120 Data Sheet
ADP3333 Data Sheet
ADuC7020 Data Sheet
ADuC7020 Evaluation Board and Tools
ADuC7023 Data Sheet
ADuC7023 Evaluation Board and Tools
ADuC7061 Data Sheet
ADuC7061 Evaluation Board and Tools
ADuC7122 Data Sheet
ADuC7122 Evaluation Board
Figure 4. Output of HyperTerminal Communication Port Viewing Application

Rev. 0 | Page 3 of 4

You might also like