super_star

CN0153

Build a USB-based temperature monitor using the ADuC7122 precision analog microcontroller and an external thermistor

 
Overview

Circuit functions and advantages

This circuit shows how to use the ADuC7122 precision analog microcontroller in a precision thermistor temperature monitoring application . The ADuC7122 integrates a multi-channel 12-bit SAR ADC, 12 12-bit DACs, 1.2 V internal reference, ARM7 core, 126 kB Flash, 8 kB SRAM, and various digital peripherals such as UART, timers, SPI, and two I 2 C interface, etc. It is connected to a 4.7 kΩ thermistor.

The ADuC7122 is packaged in a small 7 mm × 7 mm, 108-pin BGA package, so the entire circuit can be placed on a very small PCB, further reducing cost.

Thermistors are temperature-sensitive, low-cost resistors that function similarly to RTDs and are constructed of solid semiconductor materials with either a positive or negative temperature coefficient. Thermistors are inexpensive, highly sensitive, and can detect subtle temperature changes that cannot be observed with RTDs or thermocouples. However, the thermistor has highly nonlinear characteristics; therefore, it can only be applied over a very narrow temperature range without linearization techniques. Circuit linearization techniques can be implemented in software, but this is beyond the scope of this article.

Despite its powerful ARM7 core and high-speed SAR ADC, the ADuC7122 is a low-power solution. When the ARM7 core is operating at 326.4 kHz, the main ADC is active, and the external temperature sensor is measured, the typical power consumption of the entire circuit is 7 mA. The ADC and/or microcontroller can be shut down between temperature measurements, further reducing power consumption.

Figure 1. ADuC7122 interfaced with a thermistor for use as a temperature monitor (schematic diagram, all connections not shown)

 

Circuit description

The circuit shown in Figure 1 is powered entirely through the USB interface. Using the ADP3333 3.3 V low dropout linear regulator , the 5 V power supply provided by the USB interface can be adjusted to 3.3 V, thereby providing the DVDD voltage to the ADuC7122. The ADuC7122's AVDD supply is additionally filtered as shown. A filter is also placed at the input of the linear regulator to filter the USB power supply.

The following features of the ADuC7122 are used in this application:

  • 12-bit SAR ADC
  • ARM7TDMI® Core: The powerful 16/32-bit ARM7 core integrates 126 kB of Flash and SRAM memory to run user code, configure and control the ADC, perform analog-to-digital conversion processing of signals from the thermistor sensors, and control Communication via UART/USB interface.
  • UART: UART is used as a communication interface with the PC host.
  • Two external switch buttons (not shown) are used to force the device into flash boot mode: by holding DOWNLOAD low while toggling the RESET switch, the ADuC7122 will enter boot mode instead of normal user mode. In boot mode, the internal flash memory can be reprogrammed via the USB interface using the I2CWSD tool.
  • BUF_VREF: The bandgap reference voltage source is also connected to the BUF_VREF1 and BUF_VREF2 pins through buffers and is used as a reference voltage source for other circuits in the system. These pins require a capacitor of at least 0.1 μF to reduce noise.

The thermistor used in this circuit is a 4.7 kΩ resistor, model NCP18XM472 . It comes in a 0603 surface mount package. At 25°C, the thermistor used in the circuit of Figure 2 has the following characteristics: β = 3500 (the β parameter describes the relationship between resistance and temperature), resistance (R 25 ) = 4.7 kΩ.

The USB interface of ADuC7122 is implemented through FT232R UART to USB, which directly converts USB signals into UART protocol.

In addition to the decoupling shown in Figure 1, the USB cable itself should use ferrite beads for enhanced EMI/RFI protection. The ferrite beads used in this circuit are Taiyo Yuden BK2125HS102-T , which has an impedance of 1000 Ω at 100 MHz.

This circuit must be built on a multilayer circuit board with a large area ground plane. For optimal performance, proper layout, grounding, and decoupling techniques must be used (refer to Tutorial MT-031 , Tutorial MT-101 , and ADuC7122 Evaluation Board Layout ).

The input thermistor circuit in Figure 2 is designed to produce accurate temperature measurements from 0°C to 90°C. Please note that this system does not include temperature correction. This circuit contains a simple thermistor circuit that does not provide circuit linearization. If linearization is used, it can operate over a wider temperature range, although this reduces the sensor's resolution.

Figure 2. Implementing a simple temperature sensor circuit using the ADuC7122

 

The circuit shown in Figure 2 uses a voltage divider configuration, so the ADC result D can be converted into the resistance measurement result of RTH (thermistor). The calculation formula is as follows:

CN0153_image1

Once the resistance of the thermistor is calculated, the Steinhart-Hart equation can be used to determine the current temperature of the sensor.

The ADuC7122 determines the sensor temperature using the following formula:

CN0153_image2

in:

T 2 = unknown temperature
T 1 = 298K
β = beta parameter of the thermistor at 298K or 25°C, β = 3500
R 25 = resistance value of the thermistor at 298K or 25°C, R 25 = 4.7 kΩ
R TH = The resistance value of the thermistor at an unknown temperature calculated by the above formula

Figure 3 shows the response of the ADuC7122 as a function of temperature to the thermistor sensor shown in Figure 2.


Code description 

The source code and HyperTerminal configuration files used to test this circuit can be downloaded (zip file) from: www.analog.com/CN0153_Source_Code .

The UART is configured for baud rate 9600, 8 data bits, no polarity, and no flow control. If this circuit is directly connected to the PC, you can use a communication port viewing program such as "HyperTerminal" to view the results sent by the program to the UART (please refer to Figure 4). The source code is accompanied by comments for easy understanding and use. Code can be compiled and tested using the Keil μVision 3 application.

Figure 3. ADuC7122 thermistor sensor measured output (converted to V) versus temperature using ADC0

 

参考设计图片
×

Blockdiagram

 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-11 03:38:15
  • The mobile phone signal is suddenly bad, why?
  • Experience with several mobile operating systems
  • Buying TQ210 means buying a tablet solution at the price of a development board
  • RFID Entrepreneurship
  • How to save the default number of compilation threads in Vivado
  • Stability test for domestic wireless IoT IC

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号