Design of wireless temperature measurement system based on C8051 and Atmegal6

Publisher:科技奇才Latest update time:2011-06-29 Keywords:C8051 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

At present, temperature measurement has been widely used in various fields such as steel, metallurgy, industrial welding, wave soldering, reflow soldering, etc. The temperature to be measured in these applications is very high and the measurement environment is very harsh. Traditional wired temperature measurement devices are either not applicable or subject to many restrictions in such temperature measurement environments. This requires the development of wireless temperature measurement systems. Such systems must be able to withstand harsh environments, have high measurement accuracy and temperature acquisition speed, and be able to be received by the host computer at a long distance.

According to the needs of the above industrial production, this paper has developed a wireless temperature measurement system. The system uses K-type thermocouples as temperature sensing elements, with a large temperature measurement range, and is suitable for high-temperature fields such as wave soldering and reflow soldering. In addition, this system has an independent temperature compensation circuit, which solves the problem of slow temperature acquisition speed of some integrated temperature compensation chips and improves the sensitivity of temperature measurement. Since this system is wirelessly transceiver and uses CCl000 as a wireless communication chip, the host computer can receive data at a certain distance and monitor in real time. In addition, this system also has the function of real-time data recording, and can save the data when there is an obstacle in wireless communication, and then read it out by the host computer software after the temperature acquisition is completed.

1 System Hardware Design

This system uses the SOC chip C805lF020 as the main control chip. This single-chip microcomputer uses a 25MIPS 8051 CPU pipeline instruction structure, with 64 KB Flash program memory on the chip, 256 KB+4 KB on-chip RAM and two external RAM expansion interfaces, 5 16-bit timers and JTAG non-intrusive in-system debugging. As a system on a chip, C8051F020 has rich and powerful peripherals. Its AD converter has 12 bits, which can effectively improve the input acquisition accuracy of thermocouples.

In addition, the purpose of using Atmegal6 is to improve the acquisition speed of the system, thereby improving the sensitivity of temperature measurement. Short-distance wireless communication is completed through CCl000. The FLASH chip can store temperature data for reading when wireless communication fails. After conversion by CP2102, C8051F020 can communicate with the host computer through the USB port. The hardware structure block diagram of this system is shown in Figure 1.

Hardware structure diagram of this system

1.1 System control module centered on C8051F020

This module includes C805lF020 control module, FLASH storage module, and CP2102 communication module. When the system is in the sending state, C805lF020 is used to collect the input analog signal of the thermocouple, and convert the collected signal into a digital signal through a 12-bit AD converter. Then C805lF020 looks up the data in a table, converts it into temperature data, processes and packages the data. Finally, the data is written into the FLASH chip and sent to Atmegal6 through the serial port.

When the system is in the waiting state, it will communicate with the host computer through the IJSB interface. CP2102 can complete the conversion between the serial port and the USB interface. If the system receives a command from the host computer to read data, C805lF020 will read the data from the FLASH chip, then send it out through the serial port, and then enter the host computer through the USB interface through CP2102.

1.2 Wireless transmission module centered on CCl000

The wireless transmission module includes CCl000, Atmegal6 and antenna. CCl000 is an ideal ultra-high frequency single-chip transceiver communication chip manufactured under 0.35μm CMOS process based on Chipcon's SmartRF technology. The operating frequency band of CCl000 is 315, 433, 868 and 915 MHz. It is easy to program it to work in the range of 300~1000 MHz. AVR microcontroller Atmegal6 can be used to complete the initialization of CCl000 and communicate with CCl000, and also maintain communication with the main control chip C8051F020. When the system is in the sending state, Atmegal6 receives the data packet sent by C8051F020 and sends it out through CC1000 . [page]

1.3 Temperature acquisition module based on thermocouple

This module includes a voltage temperature sensor TMP35 and a K-type thermocouple. The working principle of the thermocouple is to generate a potential difference based on the temperature difference between the hot end and the cold end. Since the temperature of the cold end is often not 0°C during actual measurement, the thermocouple must be temperature compensated. The thermocouple temperature compensation formula is as follows:

E(t, 0) = E(t, t0) + E(t0, 0)

Among them, E(t0,0) is the actual measured electromotive force, t represents the hot end temperature, t0 represents the cold end temperature, and 0 represents 0°C. In the field temperature measurement, since the cold end temperature of the thermocouple is generally not 0°C, but varies within a certain range, the measured thermoelectric potential is E(t, t0). If you want to measure the thermoelectric potential E(t, 0) corresponding to the actual measured temperature, you must compensate for the compensation potential E(t0, 0) required for the cold end not being 0°C. Moreover, the characteristics of the compensation potential changing with the cold end temperature must be consistent with the thermoelectric characteristics of the thermocouple, so as to obtain the best compensation effect.

Figure 2 shows a schematic diagram of a temperature compensation circuit. In the figure, the temperature sensor TMP35 performs the temperature compensation work very well. The voltage output by TMP35 is first divided by resistors and then amplified by an amplifier, which is E(t0, O) corresponding to the K-type thermocouple.

Schematic diagram of temperature compensation circuit

2 System Software Design

The software design of the transmitter board mainly includes the main control module program based on C8051F020 and the wireless transmitter module program centered on Atmegal6. The main control program module mainly completes temperature acquisition, data processing, sending data to the wireless transmitter module, saving test temperature data, and communicating with the host computer. The wireless transmitter program module is mainly responsible for initializing CC1000, receiving data packets from C805lF020 in the waiting state, and sending them through CC1000.

2.1 Main control module program design

The main function of the main control module program is to sample the input analog signal of the thermocouple, and then look up the table to convert the table data into temperature data and package it. When the sending flag is allowed, it is written into FLASH for storage and sent to Atmegal6 through the serial port. The system software module flow chart is shown in Figure 3.

System software module flow chart

[page]

After power-on reset, the system should first initialize the functional modules of C8051F020, including serial port 0, serial port 1, AD converter, counters TO, T1, T2 and interrupt program. The system samples the input signal once every 50 ms through a 12-bit AD converter, and converts the sampled signal into temperature data by looking up the table. Then add the frame header, frame footer and check bit to the data. Finally, several frames of data are packed into a data packet.

When the send flag is enabled, C805lF020 writes the data packet into the FLASH chip AT45DB041D every 50 ms and sends the data packet to Atmegal6 through the serial port.

2.2 Wireless Transmitter Module Programming

The main function of the wireless transmission program is to initialize CCl000 through Atmegal6, receive data from C805lF020, and send it out by CCl000. The flow of the wireless transmission program is shown in Figure 3 (b).

When designing the program of the wireless transmitter module, the port initialization, TO and T1 initialization, serial port initialization and interrupt program should be completed through Atmegal6 first, and CC1000 initialization programming should be performed. Then, Atmegal6 enters the loop waiting. When it is confirmed that the data is received, it is confirmed that the data is valid, and then CC1000 is woken up and the data packet is sent out.

3 System Performance Analysis

The characteristic of this temperature measurement system is that it uses dual CPU and independent temperature compensation circuit, which effectively improves the speed of temperature acquisition and thus improves the sensitivity of measuring temperature changes. Actual tests show that the measurement accuracy of this system is 0.5% and the temperature acquisition speed is 50 ms.

The independent temperature compensation circuit used in this system uses the voltage temperature sensor TMP35 as the temperature compensation element. After the input electromotive force of the thermocouple is temperature compensated, it is further amplified by the precision rail-to-rail operational amplifier OP747 and then input to the AD converter of C8051F020. This can avoid the speed limitation problem caused by the use of some integrated thermocouple temperature compensation chips.

This system uses C8051F020 as a new generation of SOC chip, which has rich and powerful peripherals. It has 2 AD converters, of which ADO has 12-bit accuracy, so it can effectively ensure the accurate collection of temperature signals.

The dual CPU structure C805lF020 and Atmega16 can ensure the system acquisition time of 50 ms. Because wireless transmission and FLASH writing often take up most of the time, the dual CPU can separate the two, which effectively ensures the speed and stability of the system.

The FLASH chip AT45DB041D can write data into FLASH in real time during temperature acquisition, so that data can be effectively saved when wireless transmission is blocked. The data saved by the test system can be read by the host computer through the USB interface.

4 Conclusion

Compared with the current mainstream wireless temperature measurement systems at home and abroad, this system has achieved a higher level of temperature measurement accuracy. In terms of temperature acquisition speed, due to the use of an independent temperature compensation circuit and a dual CPU system structure, the sensitivity of temperature measurement and system stability are effectively improved. In addition, due to the use of FLASH chips, real-time data can be saved, which also improves the reliability and practicality of the system.

Keywords:C8051 Reference address:Design of wireless temperature measurement system based on C8051 and Atmegal6

Previous article:Alkali concentration measurement and control system for pre-dyeing treatment
Next article:Data Acquisition System for Railway Turnout Inspection

Recommended ReadingLatest update time:2024-11-17 01:51

A Scheme for Realizing SPWM Waveform Based on C8051 Single Chip Microcomputer
1 Introduction Sinusoidal pulse width modulation (SPWM) technology has been widely used in the fields of AC speed regulation, DC power transmission, variable frequency power supply, etc. In order to improve the control effect of the whole system, high-performance SPWM pulse forming technology has been a proble
[Power Management]
A Scheme for Realizing SPWM Waveform Based on C8051 Single Chip Microcomputer
Design of wireless temperature measurement system based on C8051F020 and Atmegal6
This paper develops a wireless temperature measurement system. The system uses K-type thermocouples as temperature sensing elements, with a wide temperature measurement range, and is suitable for high-temperature fields such as wave soldering and reflow soldering. In addition, the system has an independe
[Microcontroller]
Design of wireless temperature measurement system based on C8051F020 and Atmegal6
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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号