Remote Temperature Monitoring System Based on MCU and FPGA

Publisher:WanderlustSoulLatest update time:2011-12-16 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Temperature has different degrees of influence on industrial and agricultural production and national defense. There are many kinds of failures in power equipment, but most of them are accompanied by heating, and the loss of an accident is huge; in industries such as textiles, food, and tobacco, high temperatures can easily cause product deterioration and electronic instruments to malfunction; in greenhouse cultivation and industrial production, if the temperature is not controlled, it will seriously affect the output and quality. There are also many areas where the temperature may be high or low, and people cannot get close or there is no need for manpower to monitor on site. The traditional temperature measurement method has a long cycle and cannot be monitored in real time. In addition, the surveyor must go to the site to measure and start the power equipment to adjust the temperature. The work efficiency is very low and it is not easy to manage. For this reason, this remote measurement and control system is designed, so that the site can be monitored while sitting in the office, which is convenient and saves manpower.

1 Overall design of the system

This design is a temperature monitoring system based on a single-chip microcomputer and NiosⅡ soft core, and its system block diagram is shown in Figure 1. This system uses Dallas single-wire digital temperature sensor DS18B20 to collect temperature data, breaking the traditional idea of ​​collecting temperature through A/D conversion using thermal resistors and thermocouples. The digital signal is processed and controlled by Atmel's FLASH single-chip microcomputer AT89S51, and transmitted to the embedded processor composed of NiosⅡ through the RS 232 serial port to monitor and alarm the temperature. The embedded Web server of Nios II allows users to browse the web pages stored in the FLASH chip through the IE browser. Since the CPU itself is implemented in a soft core, its functions can be customized according to needs, which is very flexible.

2 Hardware Design of Monitoring System
2.1 A brief introduction and instructions for using DS18B20
DS18B20 is a single-line digital temperature sensor produced by DALLAS, USA. It has the advantages of miniaturization, low power consumption, high performance, strong anti-interference ability, and easy matching with microprocessors. It is particularly suitable for forming a multi-point temperature measurement and control system. It can directly convert the temperature into a serial digital signal for microcomputer processing. Moreover, each DS18B20 has a unique product number and can be stored in its ROM. When forming a large temperature measurement and control system, multiple DS18B20 chips can be hung on a single line. It only takes one port line to read or write DS18B20 information from DS18B20. The power for reading, writing and temperature conversion comes from the data bus. The bus itself can also supply power to the connected DS18B20 without the need for additional power. DS18B20 can provide 9-bit temperature readings. It can easily form a temperature detection system without any peripheral hardware. DS18B20 is smaller in size, has a wider applicable voltage and is more economical. The measurement temperature range is -55~+125℃, and the accuracy is ±0.5℃ in the range of -10~+85℃. The temperature collection process of DS18B20 controlled by the single chip microcomputer must go through three steps: initialization, write operation, and read operation, and there must be strict time intervals.
2.2 Description of NiosⅡ Processor
Altera's NiosⅡ processor is an embedded system microprocessor IP core with a 32-bit instruction set and data channel that users can configure and build at any time. It uses the Avalon bus structure communication interface and has enhanced memory debugging and software functions. LWIP is a network communication protocol designed specifically for embedded system applications. It supports Internet Message Control Protocol (ICMP), User Datagram Protocol (UDP), Dynamic Host Configuration Protocol (DHCP), Address Resolution Protocol (ARP) and standard Socket interface provided to applications. Therefore, it can complete most of the functions of the traditional TCP/IP protocol, but the resource occupation is smaller than that of the TCP/IP protocol, so it is very suitable for systems with NiosⅡ processor as the core. Based on the above considerations, the embedded Web server uses NiosⅡ processor as the core and LWIP as the network communication protocol to realize simple web browsing functions. Users can browse web pages stored in FLASH through the network.
2.3 Hardware Circuit Design Description
The hardware circuit of this system includes a single-chip temperature acquisition circuit, a level conversion circuit and a NiosⅡ-based embedded host computer system.
2.3.1 Temperature acquisition circuit
The temperature acquisition circuit is mainly composed of DS18B20 and a single chip, as shown in Figure 2. The system uses the 8051 single chip (U1) as the core; C1, C2 and Y1 form a clock circuit, and the crystal oscillator is 12 MHz; S1, C12 and R3 form a reset circuit; P1.0 of U1 is connected to a light-emitting diode for program execution indicator; R5 is a current limiting resistor; DQ is connected to the P2.1 terminal of 8051; R1 is a pull-up resistor between the signal and the 5 V power supply.
2.3.2 Level conversion circuit[page]
The communication circuit between the microcontroller and the host computer is shown in Figure 3. The 8051 microcontroller itself provides a set of full-duplex serial transmission interfaces, with the TXD pin transmitting serial data and the RXD pin receiving data, but its working logic level is TTL level (0 V, 5 V). Therefore, the data communication between the microcontroller and the PC must be converted by the RS 232 signal (+12 V, -12 V) level. This system uses the MAX232 level conversion chip, and the interface level conversion can be completed by adding 4 capacitors. The 11th pin (TXD) of the microcontroller is connected to the 10th pin of 232, and the 10th pin (RXD) of the microcontroller is connected to the 9th pin of 232. The RS 232-C interface connected to the host computer uses a DB-9 9-pin plug socket, and the transmission line uses a shielded twisted pair. The power supply part uses a commercially available 9 V DC regulated power supply, which is filtered and stabilized by 7805 to obtain a stable 5 V power supply.
2.3.3 NiosⅡ-based embedded host computer
The system mainly includes the following parts: NiosⅡ soft-core CPU, timer used by the operating system, timer used by the network protocol stack, interface between CPU and peripheral devices (Avlaon bus); EPCS4 is used to configure the FPGA when powered on; FLASH is mainly used to store software code and some parameters that need to be saved; SRAM is used to store code and data when the system is running; the network interface chip uses the LAN91C111 chip of Smsc as the network interface. This device is an Ethernet controller that implements the functions of the transport layer and MAC layer in the 7-layer network protocol stack. In addition, it has functions such as 10/100 Mb/s self-adaptation and duplex/half-duplex self-adaptation, and has good network compatibility. It uses serial UART to communicate with the microcontroller. The CPU built using SOPC Builde in QuartusⅡ is shown in Figure 4.
3. Software Design of Monitoring System
The block diagram of the single chip microcomputer control program design is shown in Figure 5 and Figure 6.
The function of the serial port interrupt program is to receive the data acquisition cycle and start and stop instructions sent by the host computer. The temperature signal filtering is implemented by software. The filtering algorithm adopts the weighted average method, that is, the maximum and minimum values ​​of the latest detected N temperature signal sequences are removed and the weighted average operation is taken.
4 Implementation of Web Server Based on NiosⅡ
The constructed CPU and corresponding modules are analyzed for pin assignment and integrated before compilation. The embedded real-time multi-task control system is realized by transplanting the real-time operating system μCLinux using NiosⅡIDE (Integrated Development Environment), and the corresponding web pages are developed and the server is transplanted and configured. This system uses Boa under μCLinux. Boa is a single-threaded HTTP server. It is different from other traditional Web servers. It does not create a process for each connection. It only creates a new process when the CGI program is running. The Web server function of the intelligent monitoring system is realized by transplanting Boa. Finally, the dynamic Web interaction function is realized by writing CGI programs and combining Flash animations.
5 Conclusion
The remote temperature control system designed with AT89S51 series single chip microcomputer, sensor DS18B20 and NiosⅡ has the advantages of novel structure, simple circuit, small size and convenient control. It can be widely used in remote temperature monitoring of relevant key equipment in power stations, schools, hospitals, etc. It is also suitable for temperature monitoring in high temperature or dangerous places that are inaccessible to human body. If the conversion sensor is slightly changed, it can also become a remote monitoring system for other parameters, such as pressure, humidity or gas.

Keywords:MCU Reference address:Remote Temperature Monitoring System Based on MCU and FPGA

Previous article:Implementation of Network Data Encryption Based on Single Chip Microcomputer and FPGA
Next article:Encryption Application of SRAM FPGA Based on Single Chip Microcomputer

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

Hetai MCU interrupt nesting
;;Content: Press the button connected to PA3 to interrupt the LED digital tube to add 1 ;Digital tube segment code connection method A-PD0, B-PD1....G-PD6, H-PD7 ;Digital tube bit code connection method OM0-PC0...COM4-PC3 ;Source code download: http://www.51hei.com/f/htzdqt.rar ;1. Open interrupt ;2. Anti-shake in
[Microcontroller]
Design of intelligent voice dialing alarm system using AT89C51 microcontroller
With the improvement of people's living standards and the enhancement of security awareness, there is an urgent need to develop an automatic alarm system that is oriented to the public, is low-priced, and operates reliably. In view of the popularity of residential telephones and mobile communication equipment, as well
[Microcontroller]
Design of intelligent voice dialing alarm system using AT89C51 microcontroller
Renesas Electronics MCUs support Microsoft Azure RTOS to accelerate IoT device development
Renesas Electronics Corporation, a global supplier of advanced semiconductor solutions, announced that it is helping IoT (Internet of Things) designers simplify development from devices to the cloud. Leveraging its extensive experience in secure embedded design, Renesas supports Microsoft Azure RTOS on its microcontro
[Internet of Things]
[MCU] [Learning Log] 51 MCU Learning Log [Day1, 2022.1.09]
first part 1. Introduction to MCU: 1. Basic knowledge Micro Controller Unit, or MCU for short; It integrates a series of common computer hardware functions such as CPU, RAM, ROM, timer, interrupt system, communication interface, etc. The tasks of the microcontroller: information collection (relying on sensors),
[Microcontroller]
[MCU] [Learning Log] 51 MCU Learning Log [Day1, 2022.1.09]
PIC microcontroller pointer
The RAM and ROM of the PIC microcontroller are separate. If defined like this char  *json_char ="{"vvvv":"chen"}";  It may be compiled, but there will be problems when running. From the text analysis, a pointer in RAM space is defined, pointing to a string in ROM space. //  char  json_char ="{"vvvv":"chen"}"; // ch
[Microcontroller]
51 single chip microcomputer stc-B board learning - eight-bit digital tube dynamic display
The effect achieved by this program is that after downloading the program to the STC board, you can see that the 8 digital tubes display eight numbers from 0 to 7 from left to right, and after a period of time, they display 1 to 8, followed by 2 to 9, and then 3 to 0, moving to the left in a cycle. First, let's take
[Microcontroller]
51 single chip microcomputer stc-B board learning - eight-bit digital tube dynamic display
STM32F series MCU internal FLASH programming
The STM32F series microcontrollers have a large internal FLASH memory, but no EEPROM memory. Sometimes, an additional EEPROM chip has to be added to save parameters. This is quite unfair for most MCUs nowadays, which is especially inconvenient for developers who have switched from AVR. Considering that the STM32F seri
[Microcontroller]
STM32F series MCU internal FLASH programming
Interface circuit for reading LCD display data into single chip microcomputer
This article takes a fully automatic blood pressure monitor as an example to introduce the interface circuit for reading LCD display into a single-chip microcomputer. The blood pressure monitor display is a 6 1/2-digit segment LCD display, 3 digits for systolic pressure and 3 digits for diastolic pressure. The 1/2 digi
[Microcontroller]
Interface circuit for reading LCD display data into single chip microcomputer
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号