Design of wireless temperature measurement system based on C8051F020 and Atmegal6

Publisher:传邮万里Latest update time:2012-02-22 Source: 电子元器件应用 Keywords:C8051F020  Atmegal6 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

O Introduction

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 transceived 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 on-chip 64 KB Flash program memory, 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, and its AD converter has 12 bits, which can effectively improve the input acquisition accuracy of the thermocouple.

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.

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. And 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.

1.3 Temperature acquisition module based on thermocouple[page]

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.

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.

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 tail and check bit to the data. Finally, several frames of data are packed into a data packet.

[page]

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 CPUs and independent temperature compensation circuits, 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:C8051F020  Atmegal6 Reference address:Design of wireless temperature measurement system based on C8051F020 and Atmegal6

Previous article:Design of GPRS Data Terminal Based on ATmegal6
Next article:Design of power line carrier communication module based on ST7538 and ATmega88V

Recommended ReadingLatest update time:2024-11-16 21:32

Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor
         Introduction           Due to the distance limit of the connecting cable of the acceleration sensor and the charge amplifier, it is difficult to implement a centralized data acquisition and processing system in a space with a long distance, and its reliability and anti-interference problems are difficult to s
[Microcontroller]
Distributed detection method of vibration signal based on C8051F020 and MXA2500GL sensor
Design based on C8051F020 seawater desalination pretreatment system
During the actual use of the seawater desalination device, it was found that the actual working parameters of the device are generally different from the designed working parameters, making the device unable to exert the process characteristics of the original designed system and performing poorly; this situation is b
[Microcontroller]
Design based on C8051F020 seawater desalination pretreatment system
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号