Share this

Design of an ARM-based thermistor thermometer

2026-04-06 07:15:24 · · #1
1. Introduction With the continuous development of semiconductor technology, thermistors, as a new type of temperature-sensing element, are increasingly widely used. They possess advantages such as small size, high sensitivity, light weight, low thermal inertia, long lifespan, and low cost. Traditional thermistor thermometers mostly employ a common microcontroller (MCS-51 series) + A/D converter and LED display module in their hardware, resulting in numerous discrete components, high power consumption, complex design, and difficulty in debugging. The software also often uses lengthy and cumbersome assembly language, leading to low design efficiency, poor portability, and unreliable performance. Currently, the application of embedded systems has entered a stage of parallel development of high-end and low-end technologies, marked by the development of 32-bit microcontrollers. ARM (Advanced RISC Machines) is a widely used 32-bit microprocessor core in embedded systems, offering advantages such as small size, low power consumption, high integration, convenient hardware debugging, and portable operating systems. This provides the necessary conditions for the development of intelligent instruments towards portability, intelligence, and microcomputer integration. Due to the rapid development of electronic technology, the cost-effectiveness of electronic components is constantly improving. This paper uses the 32-bit ARM7 TDMI-S microprocessor core LPC2142 as the control core, utilizing its built-in A/D converter and SPI interface to control the LED display driver MC14489 for real-time temperature display. 2. Thermostat Temperature Conversion Principle A thermistor is a type of temperature sensor composed of ceramic-like semiconductors. Unlike ordinary resistors, thermistors (NTCs) have a negative resistance-temperature characteristic, meaning their resistance decreases as temperature increases. Figure 1 shows the characteristic curve of a thermistor. The resistance-temperature characteristic curve of a thermistor is an exponential curve with significant nonlinearity, therefore linearization is necessary during use. While linearization can improve the thermistor's characteristic curve, it is complex. Therefore, in general applications with less stringent requirements, it is often assumed that temperature and resistance have a linear relationship within a certain temperature range to simplify calculations. Thermistors are used to sense temperature. A constant current is applied to the thermistor, and a voltage is measured across its terminals. The temperature can then be calculated using the following formula: T is the measured temperature; T0 is a temperature parameter related to the thermistor's characteristics; K is a coefficient related to the thermistor's characteristics; VT is the voltage across the thermistor. Based on this formula, if the voltage across the thermistor can be measured, and the parameters T0 and K are known, the ambient temperature of the thermistor, i.e., the measured temperature, can be calculated. This transforms the relationship between resistance and temperature into a relationship between voltage and temperature. The main task of designing a digital resistance thermometer is to convert the voltage value across the thermistor into a digital value via an A/D converter, send it to the microcontroller, calculate the temperature value using software, and then perform display, printing, and other processing. 3 Hardware Circuit Design In today's rapidly developing electronic technology, the prices of some powerful components are constantly decreasing, improving their cost-effectiveness and expanding their application areas. This paper uses the 32-bit ARM microprocessor core LPC2142 instead of the traditional 8051 microcontroller as the control core for A/D conversion and real-time temperature display. Figure 2 shows the structural schematic of the entire system. A thermistor NTC is connected in series with a common resistor R, and then connected to a +5V power supply. The voltage across RT is taken and sent to the AIN1 (P0.28 pin) channel of the microcontroller LPC2142 for A/D conversion. The conversion start mode and the selection of the conversion channel can be achieved by setting the ADC control register ADC0DR. The conversion result is output to the LED display driver MC14489 through a synchronous, full-duplex serial SPI interface for real-time temperature display. 3.1 Introduction to the ARM Microcontroller LPC2142 The ARM 7 TDMI-S core is a general-purpose 32-bit microprocessor core, using a von Neumann architecture, and features high performance and low power consumption. The ARM architecture is designed based on the Reduced Instruction Set Computer (RISC) principle, and the instruction set and related decoding mechanism are much simpler than those of Complex Instruction Set Computers. The ARM 7 TDMI-S processor uses pipelined technology, allowing all parts of the processing and storage system to operate continuously. This makes it very easy to achieve high throughput and real-time interrupt response using a small, inexpensive processor core. The LPC2142 is a microcontroller based on a 3Z/16-bit ARM7TDMI-S CPU that supports real-time emulation and embedded tracing, with 64 kB of high-speed FLASH memory and 16 kB of on-chip SRAM. A 128-bit wide memory interface and a unique accelerator interface enable 32-bit code to run at the highest clock frequencies. Applications with strict code size controls can use 16-bit Thumb mode to reduce code size by more than 30% with minimal performance loss. The LPC2142 has an internal 10-bit successive approximation A/D converter with the following main features: (1) 6 pins multiplexed as input pins; (2) Power-down mode; (3) Measurement range 0V to Vref (usually 3V, not exceeding VDDA voltage); (4) Each converter contains a programmable divider that can adjust the clock to 4.5 MHz (maximum) required for successive approximation conversion. Thus, the 10-bit conversion time is greater than or equal to 4.55μs; (5) Burst conversion mode for one or more inputs; (6) Conversion can be triggered by direct start, input transition, or timer matching signal; The LPC2142 also has a hardware SPI (Serial Peripheral Interface) interface. It is a synchronous, full-duplex serial interface with a maximum data bit rate of 1/8 of the clock rate, and can be configured as a master or slave. 3.2 LED display driver management chip MC14489 The MC14489 is a serial interface LED display driver management chip manufactured by Motorola Corporation of the United States. Its input terminals are connected to the system's main CPU via only three I/O lines to receive serial data to be displayed. The output terminals can directly drive a seven-segment LED display or indicator lights. The MC14489 integrates all the circuitry required for data reception, decoding, scanning output, and display driving; only an external current-setting resistor is needed to control the high brightness of the LED display. Each MC14489 chip can display in any of the following ways: 5-digit LED display with a decimal point; 4.5-digit display with a decimal point and sign; 25 indicator lights; or 5.5-digit display. The chip's built-in decoder circuit can output seven-segment numbers 0-9, hexadecimal letters A-F, and 15 letters and symbols. Figure 2 shows an example of a 5-digit LED display constructed using a single MC14489. As shown in the figure, the display circuit constructed using the MC14489 requires no current-limiting resistors or additional inverter or driver circuits, making the circuit design very simple. The MC14489 chip employs a special design technique to ensure that its power supply pins exhibit minimal spikes and low EMI (electromagnetic interference) even under high current operation. 4. System Software Design As briefly described above regarding the temperature conversion principle of the thermistor, the thermistor characteristic curve is an exponential curve with significant nonlinearity. Since nonlinear processing is complex, a simplified approach can be taken for the less demanding design requirements of this paper. 4.1 Program Design Flowchart Due to space limitations, only the program design flowchart is provided. The flowchart of the entire program is shown in Figure 3. 4.2 Temperature Calculation Program In the formula T = T0 - KVT, the coefficient K is a very small number. For ease of calculation, the product of K multiplied by 256 and VT is taken, i.e., 256 × K × VT. After multiplication, only the high 8 bits of the product are taken, discarding the low 8 bits, which cancels out the effect of the 256-fold increase in the coefficient K, resulting in the correct result. Furthermore, as can be seen from the resistance-temperature characteristic curve of the thermistor in Figure 1, the linear relationship between resistance and temperature is good within the temperature range of +10 to 150℃. This temperature range is usually taken as the effective temperature range. When the temperature exceeds this range, all digits of the digital tube are displayed as an indication. Since the effective temperature range does not exceed 150℃, the temperature is displayed using a 3-digit digital tube, with the display format: AD XXX, where XXX is the temperature value. In Figure 2, LED1 and LED2 only display the characters A and D, while the following three digital tubes, LED3, LED4, and LED5, display the temperature value. 5 Conclusion Using an SPI serial interface and an MCI4489 management chip to construct the display driver circuit of an intelligent instrument can significantly improve the system's performance-price ratio. This paper simplifies the characteristics of the thermistor to a linear form when high accuracy is not required, and uses the designed circuit to measure the temperature within the range of +10 to 150℃, achieving good results. The following points need to be noted during the entire design process: (1) The LPC2142 microcontroller has independent analog power supply pins VDDA and USSA. In order to reduce noise and error probability, the analog power supply and digital power supply should be isolated by a 10μH inductor. (2) The selection of the A/D conversion reference voltage Vref should meet the requirements of measurement accuracy. If you want to improve the A/D conversion accuracy, you generally use a reference source chip to provide the reference voltage. The TL431 is a low-noise three-terminal adjustable shunt reference source with good thermal stability (temperature coefficient is 30×10-6/℃). This paper uses this reference source chip to provide the reference voltage. (3) Since the LPC2142 microcontroller in this system is used as an SPI master, its P0.7 pin SSEL should be connected to a 10 kΩ pull-up resistor.
Read next

CATDOLL 148CM Christina Silicone Doll

Height: 148 Silicone Weight: 33kg Shoulder Width: 34cm Bust/Waist/Hip: 70/58/82cm Oral Depth: N/A Vaginal Depth: 3-15cm...

Articles 2026-02-22