A remote temperature monitoring system based on single chip microcomputer and FPGA

Publisher:耿高良Latest update time:2010-06-23 Source: 现代电子技术 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 power equipment failures, 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 on site to monitor. 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 mode, 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 additional power supply. 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 single chip microcomputer must go through three steps: initialization, writing operation and reading 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

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 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 Smsc's LAN91C111 chip as the network interface. This device is an Ethernet controller that implements the functions of the transport layer and MAC layer in the network 7-layer 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.

Reference address:A remote temperature monitoring system based on single chip microcomputer and FPGA

Previous article:Design of triple-speed sampling method for PIC software serial asynchronous communication
Next article:Development of Intelligent Nodes in Image Acquisition System Based on LON Bus

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

Features of AT89S51 series microcontrollers (AT89S51 pin functions and application circuits)
  AT89S51 Overview   AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller. It contains 4k Bytes ISP (In-system programmable) Flash read-only program memory that can be repeatedly erased and written 1000 times. The device is manufactured using ATMEL's high-density, non-volatile storage technology and is
[Microcontroller]
Features of AT89S51 series microcontrollers (AT89S51 pin functions and application circuits)
Digital Temperature Measurement System Based on Embedded ARM and DS18B20
Preface   Thermal error is the biggest error source of CNC machine tools . Temperature test of CNC machine tools provides a basis for compensating thermal errors of machine tools. The traditional temperature measurement scheme is to transmit analog signals over long distances through cables to data acquisition cards
[Microcontroller]
Digital Temperature Measurement System Based on Embedded ARM and DS18B20
Embedded Multi-channel Video-on-Demand System Based on NiosⅡ Soft-core
introduction VOD (video on demand) technology provides people with an interactive way to obtain information, and its application scope and influence are constantly expanding as the technology improves. Traditional VOD systems mainly use servers as video information sources and provide on-demand video throu
[Embedded]
Embedded Multi-channel Video-on-Demand System Based on NiosⅡ Soft-core
Punch controller based on AT89S51 microcontroller
This article introduces a method of simulating PLC control using Atmel89S51 microcontroller, designing a controller suitable for rigid clutch punches, introducing the basic composition and working principle of the input and output circuit using photoelectric isolation, and focusing on the design idea of ​​the internal
[Microcontroller]
Punch controller based on AT89S51 microcontroller
Design of household temperature measuring device based on DS18B20
1. Design Overview   This design uses the USB port as the power supply port, uses the DS18B20 temperature sensor to collect temperature information, uses the AT89C2051 single-chip microcomputer for control, and uses a four-digit common anode digital tube display to achieve temperature measurement and display (the sy
[Microcontroller]
Design of household temperature measuring device based on DS18B20
NIOSⅡ implements matrix keyboard and LCD display peripheral components
introduction NiosⅡ is the second generation IP soft core processor launched by Altera. It and other IP cores can form the main part of SOPC system. Altera SOPC Builder provides NiosⅡ processor and some common peripheral interfaces, so users can define and add some modules that are not provided in the library. U
[Microcontroller]
NIOSⅡ implements matrix keyboard and LCD display peripheral components
Homemade 51 MCU common header files (DS18B20)
/*-------------------------------------------------------------------------- TEMPERATURE.H The user function is C51. Copyright (c) 1988-2004 Keil Elektronik GmbH sum zhaojun All rights reserved. --------------------------------------------------------------------------*/ #ifndef __TEMPERATURE_H__ #define __TEMP
[Microcontroller]
OK6410 development board bare metal DS18B20 driver
I believe that those who have played with 51 should have played with DS18B20. Although it is used on ARM11, the operation is still the same. One more thing is that you need to switch the IO direction before reading and writing IO. In fact, 51 needs to be switched to a high level before reading, which is generally done
[Microcontroller]
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号