1 Introduction Temperature control meters have been widely used in many fields such as industrial control. The intelligent temperature control meter with computer communication function introduced in this article is a novel automated instrument. It uses the single-chip computer AT89C52 as the core and uses voltage/frequency conversion technology and RS -485 communication interface chip MAX487 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 temperature measurement and automatic control in the range of -200~+500°C. It is a substitute for old-fashioned temperature control meters and has 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 ±5V DC working power supply is generated through the voltage stabilizing circuit (7805, 7905) to meet the working needs of the integrated circuits in the system. The system's telemetry circuit starts to work: in situations where personnel cannot enter or are difficult to enter. , the measured temperature change is converted into a voltage signal through the temperature sensor platinum resistor PT100 and the operational amplifier OP07. The LM331 performs V/F conversion into a pulse signal and inputs it to the T0 port of the 89C52 for frequency counting. The counting pulse frequency reflects the When measuring the 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 through the optocoupler TIL117 according to the PID calculation result to control the temperature adjustment. At the same time, each extension The communication port MAX487 carries out data communication and transmission with the host. The host can input 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 an 8155 as the interface between an 8-bit LED digital tube and a 4-digit keyboard to simultaneously display the system set temperature and detected temperature values. The 4-digit keyboard is: bit selection, increment, decrement, and function.
2.1 Temperature detection and signal amplification circuit
This system uses platinum resistor PT100 as the temperature measurement element. PT100 has the advantages of stable performance, strong oxidation resistance and high measurement accuracy. The bridge circuit composed of PT100 and resistive elements converts the resistance change of the platinum resistor due to temperature change into a voltage signal input to the amplifier. Since the platinum resistor installed at the measurement site needs to be connected to the console through connecting wires, in order to reduce the influence of lead resistance, a three-wire wiring method is adopted.
The signal amplification circuit is composed of integrated operational amplifier OP07. The noise peak-to-peak value of OP07 is 0.6μV, and the common mode control ratio CMRR>106dB. The pin functions of OP07: IN+ and IN- are signal differential input terminals, pins 1 and 8. It is the zero adjustment terminal, and pin 6 is the output terminal.
2.2 Voltage/frequency conversion circuit (LM331)
In control and measurement systems, AD conversion devices generally connect electrical or non-electrical quantities to subsequent circuit processing through sensors and pre-circuit. This system uses V/F converter LM331 to convert changes in temperature signals into frequency signal processing.
LM331 is an integrated circuit produced by NS Company in the United States with high performance-price ratio, simple peripheral circuits, single power supply, and low power consumption. The LM331 has a wide dynamic range of 100dB, good linearity at an operating frequency as low as 0.1Hz, and a digital resolution of 12 bits. The output driver of LM331 adopts an 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 work between 4.0V and 40V, the output can be as high as 40V, and it can prevent VCC short circuit.
In this system, LM331 converts the output frequency signal into a TTL level and sends it to the P3.4 port of the microcontroller as a counting pulse for T0. The conversion circuit has good linearity, strong anti-interference ability, and an output range of 10Hz to more than 10kHz, which is beneficial to improving the measurement range of the system.
LM331 main pin functions:
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 an MCS-51 series microcontroller produced by ATMEL Company. It has a built-in 8K bytes electrically erasable programmable EEPROM on-chip program memory and 256 bytes of RAM. The on-chip program memory space can meet the program storage requirements of this system. If necessary, the off-chip EPROM program memory and address latch can be omitted, making the circuit structure simple.
TXD, RXD, P1.5, and P1.6 are respectively connected with DI, RO, and DE of MAX487 for data communication control. Ports P1.0~P1.4 and RESET are connected to X25045ALE, P0 port, P2.0, and P2. .1 to 8155. P3. Port 4 counter T0 input terminal is connected to the frequency output terminal of LM331 for pulse counting. Port P1.7 is the control terminal of optocoupler TIL117.
The system data storage and fault protection part consists of X25045, which is a 512-byte EEPROM for serial communication and has watchdog and power monitoring functions. X25045 has three programmable watchdog cycles. When it is powered on and VCC is lower than the detection threshold, it outputs a reset signal. The X25045 output reset is active at high level, 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 protection 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 Company for RS-485 and RS-422 communication. It contains a driver and a receiver, has a driver/receiver enable function, and the input impedance is 1/4 load ( ≥48kW), the number of nodes is 128, that is, each MAX487 driver can drive 128 standard loads. The driver of MAX487 is designed to limit the slope so that the edge of the output signal will not be too steep to avoid excessive high-frequency components in the transmission line, thus effectively suppressing interference phenomena. 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 ≤-200MV, the receiver output is low level, and when the differential voltage is between ±200MV, the receiver output is uncertain. status, 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, causing communication abnormalities. For this reason, this system uses hardware The above processing was done: add pull-up and pull-down resistors to the A and B output terminals of MAX487 to ensure that all receivers can receive complete data when valid data is sent.
The data transmission rate of MAX487 is 0.25Mbps, the quiescent operating current is 120μA, and it operates on a 5V single power supply. In this system, MAX487 uses half-duplex communication, and the communication between each node uses a pair of twisted pairs as the transmission medium, so The characteristic impedance of the twisted pair is 120Ω, so the system connects a 120Ω resistor at the beginning and end of the MAX487 to reduce the reflection of the signal transmitted on the line. Since the host and extension are far apart, and the extension system is often not powered on or reset at the same time, if a MAX487 is in the sending state at this time, it will occupy the communication bus and prevent other extensions from communicating with the host. This system is in Optocoupler TIL117 is added between the P1.6 port of 89C52 and the DE terminal of MAX487 to ensure that the DE terminal of MAX487 is "0" when the system is powered on and reset, effectively solving this problem.
MAX487 main pin functions: RO: receiver output terminal; : receiver output enable terminal, RO is enabled when it is "0"; DE: driver output enable terminal; DI: driver input terminal; A: receiver in-phase Input terminal and driver non-inverting output terminal; B: receiver inverting input terminal and driver inverting output terminal.
3 Design of control software
The system software adopts modular design and consists of main program, subprogram and interrupt service program. The main program flow chart is shown in Figure 2. The main subroutines include: display subroutine; keyboard scanning subroutine; PID operation subroutine. Due to space limitations, the specific procedures are omitted.
4 Conclusion
The intelligent temperature control meter has high measurement accuracy and stable and reliable performance. It can not only replace the old temperature control meter, but also realize efficient data management on computer network. It is a practical intelligent instrument in the field of modern industrial control.
Previous article:Technology and Application of Microcontroller Controlling GSM Mobile Phones
Next article:Application of single chip microcomputer in smart rice cooker
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Revealing the five key factors for choosing the right probe (PS: Tektronix original probes are on sale starting at 199 yuan)
- Please advise me on X bus related content
- Current signal measurement
- Introduction to RISC-V instruction set - Integer basic instruction set
- Description of the performance characteristics of a bandpass RF filter
- [Domestic RISC-V Linux board Fang·Starlight VisionFive trial report] Nodejs development on Starlight board 3: Family photo wall
- [Gizwits Gokit 3 Review] Device Access-Step 4: Connect to the Internet
- EEWORLD University Hall----Prevent machine failures before they happen with CbM status monitoring to help you!
- Motor Testing Discussion
- [RVB2601 Creative Application Development] Create an Any MP3 Player on the Internet