Design of intelligent temperature control meter with communication port based on single chip microcomputer

Publisher:Joyful888LifeLatest update time:2011-10-27 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction
Temperature controllers have been widely used in many fields such as industrial control. The intelligent temperature controller with computer communication function introduced in this article is a novel automatic instrument. It uses the single-chip microcomputer AT89C52 as the core, adopts voltage/frequency conversion technology and RS-485 communication interface chip MAX487, and has the advantages of high measurement accuracy, good reliability, strong anti-interference performance, and can realize computer network control. It can be widely used in metallurgy, textile, chemical industry, medical and other industries. It has the temperature measurement and automatic control in the range of -200 to +500°C, and is a substitute for the old temperature controller, with broad market prospects.

2 System hardware design
The system hardware block diagram is shown in Figure 1.

After the system is connected to the 220V AC power supply, the voltage regulator circuit (7805, 7905) generates a ±5V DC working power supply to meet the working needs of the integrated circuit in this system, and the system's telemetry circuit starts to work: in places where personnel cannot enter or are difficult to enter, the temperature sensor platinum resistor PT100 and operational amplifier OP07 convert the measured temperature change into a voltage signal, and the LM331 performs V/F conversion into a pulse signal input to the T0 port of 89C52 for frequency counting. The counting pulse frequency reflects the size of the measured temperature. The system performs PID calculation. If the measured temperature does not match the system set temperature, the electromagnetic relay in the output circuit is controlled by the optical coupler TIL117 according to the PID calculation result to control the temperature adjustment. At the same time, the communication port MAX487 of each extension communicates and transmits data with the host. The host inputs parameters to set the temperature of all temperature control meters. The temperature data set by the system is stored in the watchdog chip X25045. At the same time, when the detected temperature exceeds a certain value of the set temperature, the system will alarm. This system uses a 8155 as the interface of 8-bit LED digital tube and 4-bit keyboard, and displays the system set temperature and detected temperature value at the same time. The 4-bit keyboard is: bit selection, increment, decrement, function.

System Hardware Block Diagram

2.1 Temperature detection and signal amplification circuit
This system uses platinum resistor PT100 as the temperature measuring element. PT100 has the advantages of stable performance, strong anti-oxidation ability and high measurement accuracy. The bridge circuit composed of PT100 and resistor elements converts the resistance change of the platinum resistor caused by temperature change into a voltage signal input amplifier. Because the platinum resistor installed at the measurement site needs to be connected to the console through a connecting wire, in order to reduce the influence of the lead resistance, a three-wire wiring method is used.

The signal amplification circuit is composed of the integrated operational amplifier OP07. The peak-to-peak noise of OP07 is 0.6μV, and the common mode rejection ratio CMRR is greater than 106dB. The pin functions of OP07 are: IN+ and IN- are signal differential input terminals, pins 1 and 8 are zero adjustment terminals, and pin 6 is the output terminal.

2.2 Voltage/Frequency Conversion Circuit (LM331)
In control and measurement systems, AD converters usually connect electrical or non-electrical quantities to subsequent circuits through sensors and pre-circuits. This system uses V/F converter LM331 to convert temperature signal changes into frequency signals.

LM331 is an integrated circuit produced by NS Corporation of the United States with high performance-price ratio, simple peripheral circuit, single power supply and low power consumption. LM331 has a dynamic range of up to 100dB, and has good linearity when the operating frequency is as low as 0.1Hz, and the digital resolution is up to 12 bits. The output driver of LM331 adopts the open collector form, so the logic level of the output pulse can be flexibly changed by selecting the logic current and external resistor to adapt to different logic circuits such as TTL, DTL and CMOS. LM331 can operate between 4.0V and 40V, the output can be as high as 40V, and it can prevent VCC from short circuit.

In this system, LM331 converts the output frequency signal into TTL level and sends it to the P3.4 port of the microcontroller as the counting pulse of T0. The conversion circuit has good linearity and strong anti-interference ability. The output range is above 10Hz~10kHz, which is conducive to improving the measurement range of the system.
The main pin functions of LM331 are:

RC: reference current input terminal; CO: current output terminal; FO: frequency output terminal; CI: voltage input terminal.

2.3 CPU and peripheral circuits
AT89C52 is a MCS-51 series single-chip microcomputer produced by ATMEL. It has a built-in 8K-byte electrically erasable programmable EEPROM on-chip program memory and 256 bytes of RAM. The on-chip program memory space can meet the program storage needs of this system, eliminating the need for off-chip EPROM program memory and address latches, making the circuit structure simple.

TXD, RXD, P1.5, P1.6 are connected to DI, RO, and DE of MAX487 for data communication control, P1.0~P1.4 ports and RESET are connected to X25045ALE, P0 port, P2.0, and P2.1 are connected to 8155. The counter T0 input of P3.4 port is connected to the frequency output of LM331 for pulse counting. P1.7 port is the control end of the optocoupler TIL117.

The system data storage and fault protection part is composed of X25045, which is a 512-byte EEPROM with serial communication and has watchdog and power monitoring functions. X25045 has three programmable watchdog cycles. When power is on and VCC is lower than the detection threshold, it outputs a reset signal. The reset high level of X25045 output is valid, and its reset output terminal is directly connected to the reset terminal of 89C52.

X25045 pin functions: chip select input; SO: serial output; SI: serial input; SCK: serial clock input; WP: write protect input; RESET: reset output.

2.4 Communication port (MAX487)
This system uses the RS-485 interface chip MAX487 as the communication port. MAX487 is a differential bus low-power transceiver produced by MAXIM for RS-485 and RS-422 communications. It contains a driver and a receiver, has a driver/receiver enable function, an input impedance of 1/4 load (≥48kW), and a node number of 128, that is, each MAX487 driver can drive 128 standard loads. The driver of MAX487 is designed to limit the slope so that the output signal edge is not too steep, so as to avoid generating too many high-frequency components in the transmission line, thereby effectively suppressing interference. The receiving sensitivity of MAX487 is ±200MV, that is, when the differential voltage at the receiving end is ≥+200MV, the receiver output is high level, when it is ≤-200MV, the receiver output is low level, and when it is between ±200MV, the receiver output is in an uncertain state. Therefore, once the receiver of a certain node generates a low level when the bus is idle, the transmission line is open or short-circuited, the serial receiver will not be able to find the start bit, thus causing communication abnormalities. For this reason, this system has made hardware processing: the A and B output terminals of MAX487 are connected with pull-up and pull-down resistors to ensure that all receivers can receive complete data when valid data is sent.

The data transmission rate of MAX487 is 0.25Mbps, the static working current is 120μA, and it works with a single 5V power supply. In this system, MAX487 adopts half-duplex communication mode, and the communication between each node is through a pair of twisted pair as the transmission medium. Because the characteristic impedance of the twisted pair is 120Ω, the system connects a 120Ω resistor at the beginning and end of MAX487 to reduce the reflection of the transmission signal on the line. Since the host and the extension are far apart, and the extension system is often powered on or reset at different times, if a MAX487 is in the sending state at this time, it will occupy the communication bus and make other extensions unable to communicate with the host. This system adds an optical coupler TIL117 between the P1.6 port of 89C52 and the DE end of MAX487 to ensure that the DE end of MAX487 is "0" when the system is powered on and reset, which effectively solves this problem.

The main pin functions of MAX487 are: RO: receiver output; : receiver output enable, RO is enabled when is "0"; DE: driver output enable; DI: driver input; A: receiver in-phase input and driver in-phase output; B: receiver inverting input and driver inverting output.

3 Design of control software
The system software adopts modular design, which consists of main program, subprogram and interrupt service program. The main program flow chart is shown in Figure 2. The main subprograms include: display subprogram; keyboard scanning subprogram; PID operation subprogram. Due to space limitations, the specific program is omitted.

4 Conclusion
This intelligent temperature controller has high measurement accuracy and stable and reliable performance. It can not only replace the old temperature controller, but also realize efficient data management in computer network. It is a practical intelligent instrument in the field of modern industrial control.

Keywords:MCU Reference address:Design of intelligent temperature control meter with communication port based on single chip microcomputer

Previous article:Design of Single CPU Simulator for 51 Single Chip Microcomputer
Next article:DSP Design Scheme for Power Electronics Control System

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

51 microcontroller pin description document
P0 port (P0.0-P0.7): P0 port is an 8-bit open-drain bidirectional I/O port. Each pin can absorb 8TTL gate current. When 1 is written to the pin of port P1 for the first time, it is defined as a high-impedance input. P0 can be used in external program data memory and can be defined as the eighth bit of data/address.
[Microcontroller]
51 single chip microcomputer frequency meter Proteus simulation design (with program circuit)
The Proteus simulation circuit diagram is as follows: (There will be a clear picture after downloading the simulation file) There are circuit diagrams and programs. The circuit is from isis and the program is from uv3. Download the simulation project file: http://www.51hei.com/f/dgnplj.rar    Below is the progra
[Microcontroller]
51 single chip microcomputer frequency meter Proteus simulation design (with program circuit)
Learn 51 MCU timer
Here, the editor will take you to learn 51 single-chip microcomputer timer from scratch. The schematic diagram of the timer circuit based on the single-chip microcomputer is shown below: The first thing we learned when studying microcontrollers was how to make LEDs flash, which was done using a delay pr
[Microcontroller]
Learn 51 MCU timer
Analysis of the underlying working principle of MCS-51 microcontroller 1
      I studied MCU for 2 years in college and have used MCU for almost 2 years, but I still have a little fuzzy about its detailed internal workings (maybe the usual application does not involve the underlying working principles, most of the work is done by the compiler and assembler for us, which also hinders our und
[Microcontroller]
Software Development Kit for Automotive MCU
Non-AUTOSAR Software Although AUTOSAR is a development software architecture with many advantages in code reusability, maintainability, development efficiency and code quality, the use of the AUTOSAR standard requires certain licensing fees and most AUTOSAR software and configuration tools are commercial paid s
[Embedded]
Software Development Kit for Automotive MCU
51 MCU timer and interrupt
Timer, Interrupt ############################## EX0(IE.0), external interrupt 0 enable bit; ET0(IE.1), timer/counter T0 interrupt enable bit;  EX1(IE.2), external interrupt 0 enable bit; ET1(IE.3), timer/counter T1 interrupt enable bit; ES(IE.4), serial port interrupt enable bit; EA (IE.7), CPU interrupt enable
[Microcontroller]
Microcontroller Exercise - Timer
Using the timer/counter of the microcontroller ( microcontroller practice - timer  ), I wrote a timer today, which is accurate to 0.01 decimal seconds, has a start/pause button, a reset button... The connection circuit diagram of the 6-digit digital tube and the microcontroller . The connection circuit diagram of t
[Microcontroller]
Microcontroller Exercise - Timer
Design of water flow control device based on single chip microcomputer
  0 Introduction   With the development of the times and the advancement of science and technology, flow-related sensor technology has become more and more mature and diverse. According to the structural type of flow sensors, they can be divided into blade (wing plate) type, core type, hot wire type, hot film type,
[Microcontroller]
Design of water flow control device based on 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号