Co-design of temperature acquisition system using single chip microcomputer and EDA

Publisher:技术掌门Latest update time:2012-07-17 Source: 21ic Keywords:EDA Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

introduction

At present, the measurement range, measurement method and measurement accuracy of most temperature acquisition cards on the market are fixed at the factory. The measurement method is single, the measurement range is fixed, and the sensing method can only adapt to certain occasions. Therefore, it is not very suitable for some occasions with multiple measurement methods and measurement ranges. Moreover, their measurement procedures and table lookup databases are fixed, which cannot be applied to some occasions with special requirements. This system uses field programmable gate arrays (FPGAEP1K30QC208-3) to process data. Its program can be modified online, so it has strong plasticity. The program and table lookup database can be improved and updated in a timely manner, which can upgrade the performance of the system. Thus, the system can meet the needs of different occasions.

1. Hardware Design of Temperature Acquisition System

Since different sensors have different outputs, they all need to be converted into voltage values ​​of 0 to 10V in order to meet the conversion requirements of the A/D converter . Therefore, each sensor requires a different conversion and amplification circuit. The converted voltage is sent to the same A/D converter for conversion through multiple analog switches. Then the data is processed and displayed by FPGA. The whole machine block diagram is shown in Figure 1.

Temperature acquisition system block diagram

1.1 PN junction temperature measurement principle

Since the PN junction generates a voltage signal as the temperature changes, the forward voltage drop of the PN junction decreases by 1 mV for every 1°C increase in temperature. However, at 0°C, the output voltage is required to be 0 V, so the PN junction must be connected into a single-arm unbalanced 直流电\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> DC bridge. The output voltage is amplified to a range of 0 to 10 V and sent to the A/D conversion circuit. The circuit schematic is shown in Figure (2):

Structural temperature measurement principle diagram

1.2 PT100 thermal resistance temperature measurement principle hardware circuit

Since the PT100 thermal resistor generates a resistance signal as the temperature changes, the resistance value increases when the temperature rises. Therefore, the thermal resistor must be connected into a single-arm DC bridge to convert its resistance change into a voltage change signal. Then this voltage signal is amplified to the range of 0 to 10 V and sent to the A/D conversion circuit. The circuit diagram is omitted.

1.3 热电偶\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> Thermocouple Temperature measurement principle hardware circuit

The output of the thermocouple is a voltage signal that changes with temperature. It must be added with a cold-end compensation circuit to work properly, and its output must also be converted to a range of 0 to 10 V and sent to the A/D conversion circuit. The circuit diagram is shown in Figure 3:

Thermocouple temperature measurement principle diagram

2. Temperature Acquisition System Software Design

The temperature acquisition system software is divided into single-chip microcomputer program design and FPGA program design. The single-chip microcomputer program is written in assembly language to realize the control of peripheral circuits. The FPGA is written in VHDL language to realize data processing and display output of the measured temperature. [page]

2.1 MCU control

The single-chip microcomputer is used to control the multi-channel analog switch and FPGA, and to display the measurement mode. The P1 port is connected to a digital tube (indicating the output measurement mode code, 1 represents the PN junction measurement mode, 2 represents the thermocouple measurement mode, and 3 represents the thermal resistor measurement mode). The P2 port is connected to the output analog switch control word, the memory chip select signal, and the FPGA program switching control signal. The program flow chart is shown in Figure 4.

MCU control program flow chart

2.2 FPGA Data Processing

FPGA processes data according to different measurement methods. When the PN junction measurement method is selected, the FPGA calculates the data according to the temperature-voltage change function of the PN junction to obtain the corresponding temperature value; when the thermocouple or thermal resistor measurement method is selected, the FPGA sequentially searches for the data of the corresponding scale and compares and calculates with the A/D converted data to finally obtain the temperature value. It can be seen that the data processing of the thermocouple or thermal resistor measurement method is the same, but the scale is different.

2.2.1 PN junction data processing

PN junction measurement method: FPGA calculates the data based on the temperature-voltage change function of the PN junction (for every 1°C increase in temperature, the forward conduction voltage drop of the PN junction decreases by 1 mV) to obtain the corresponding temperature value.

2.2.2 Thermocouple and thermal resistor data processing

In the thermocouple or thermal resistor measurement mode, FPGA searches for the data of the corresponding scale table and compares and calculates the data converted by A/D in turn, and finally obtains the temperature value. The program flow chart is shown in Figure 5.

Thermocouple resistance data processing flow chart

3. Installation and debugging of temperature acquisition system

Installation and debugging is the most critical and most prone to problems in a system. Some problems encountered during the installation and debugging of this system and the final solutions are as follows: (1) Thermocouples must have a cold-end compensation circuit to work properly. When testing the cold-end compensation circuit, its bridge resistance parameters are difficult to determine. Because different types of thermocouples have different bridge arm resistances and current limiting resistors, the parameters of each bridge arm were determined after multiple adjustments. (2) Each amplifier circuit used a single-stage voltage amplification at the beginning, which resulted in poor anti-interference ability and unstable amplification. In order to improve the anti-interference ability and stabilize the voltage amplification factor, a two-stage amplification was later adopted. The first stage used a low-amplification differential discharge circuit to eliminate common-mode interference. The second stage used voltage amplification to achieve interference-free stable amplification. (3) The display was cleared during software debugging, and it was finally found that the AD conversion data was not latched. The software latch method solved this problem.

4 Conclusion

The temperature acquisition system can realize temperature measurement in three ways: PN junction (20~100℃), thermal resistor (PT100) (0~800℃), and thermocouple (nickel-silicon K type) (0~1 000℃). It can meet the needs of different measurement ranges, different measurement accuracy and different occasions. This design uses EDA as a development tool and is matched with single-chip microcomputer control. The whole design has a newer design concept. The use of 12 ADC 模数转换\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> analog-to-digital converter greatly improves the measurement accuracy. The data processing uses field programmable gate array FPGA (EP1K30QC208-3), and its extremely high program execution speed makes the system respond faster and more accurately.

Keywords:EDA Reference address:Co-design of temperature acquisition system using single chip microcomputer and EDA

Previous article:Research and design of access network interface based on μC/OS-II
Next article:Real-time systems based on bare metal programming

Recommended ReadingLatest update time:2024-11-16 16:55

Another EDA company received financing, Xinxingji announced that it had completed a Pre-A round of financing worth hundreds of millions of yuan
On June 7, Xinxingji Technology Co., Ltd. (hereinafter referred to as "Xinxingji") announced that it had completed a Pre-A round of financing worth hundreds of millions of yuan. This round of financing was jointly led by Sequoia China, Gaorong Capital, Songhe Capital, and Yunhui Capital, and ZhenFund participated in t
[Mobile phone portable]
Born to break the bottleneck, Cerebrus, an EDA tool based entirely on machine learning, is here!
What sparks will be created when machine learning meets EDA? Recently, Cadence launched the first EDA tool based entirely on machine learning - Cerebrus TM  Intelligent Chip Explorer, which gave the answer. Cerebrus means brain in Latin. As the name suggests, Cadence hopes to combine with artificial intelligence to en
[Semiconductor design/manufacturing]
Born to break the bottleneck, Cerebrus, an EDA tool based entirely on machine learning, is here!
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号