In 1994, the Livestock and Aquatic Products Development Center of Yongzhou City, Hunan Province, introduced a 500-ton medium-sized cold storage from Henan Hongyu Machinery Factory. The temperature control system of the cold storage was manually controlled, the workload of the on-duty personnel was high, the temperature control accuracy was poor, and it was easy to make mistakes, which affected the quality of the inventory products. In 1997, the system was automated by single-chip microcomputer control, which greatly improved the automation of the control system, made the temperature control accurate, saved energy, and improved the quality of the inventory products. After years of operation, it has been proved that the system is stable and reliable, and has achieved good economic benefits.
1 System Solution
1.1 System design technical indicators
(1) Temperature control range: Refrigerator: 5±0.5℃;
Freezer: -18±0.5℃.
(2) Temperature display accuracy: ±0.2℃.
(3) Control capability: 8-channel refrigeration control, actual 5-channel control.
(4) Control mode: cooling, rapid cooling, constant temperature, natural heating.
1.2 System Structure
The system structure is shown in Figure 1.
The warehouse temperature control system is based on the 8031 single-chip microcomputer of the MCS-51 series, and the 8 kb EEPROM2864 is used to form the minimum system. The temperature sensor uses a semiconductor integrated temperature sensor with good linearity of -30 to +40 ° C, which converts the temperature into current and transmits it over a long distance to a two-stage operational amplifier, an 8-way analog switch 4051, and converts it into a digital signal through a 12-bit analog-to-digital converter ADC7153 for processing and control by the single-chip microcomputer. The control system uses a 4-key keyboard and a 6-bit LED digital display to input parameters and display the warehouse temperature and status. The 6-way intermediate relay is used as the actuator to control the refrigeration solenoid valve.
1.3 System Working Principle
The control system is in a closed-loop working state. As shown in Figure 2, the warehouse temperature T is converted into current by the sensor, and then converted into voltage and amplified and filtered. Then, it is converted by A/D and filtered by software to obtain a temperature digital signal corresponding to the warehouse temperature T. On the one hand, the temperature is sent to the LED display for observation by the duty personnel and sent to the temperature recorder for printing. On the other hand, it is compared with the set temperature value. According to the comparison result, the CPU sends refrigeration, forced refrigeration, power outage or power outage to the corresponding warehouse, thereby opening or closing the solenoid valve, performing refrigeration, forced refrigeration, stopping refrigeration and other related operations, and can adjust the number of compressors to be opened according to the required power, so as to achieve the purpose of precise control of warehouse temperature and energy saving. The timer of the single-chip microcomputer generates a clock interrupt, regularly scans 5 channels, and performs time-sharing control to make each warehouse work in different working states.
[page]
2 Circuit Characteristics
2.1 Signal amplification and filtering
As shown in Figure 3, the sensor is a high-precision semiconductor temperature sensor in the form of a constant current source. When a certain working voltage is applied to both ends of the sensor, its output current changes with temperature. Its linear current is 1μA/℃. It does not affect the measurement accuracy after being transmitted over a long distance (50-150 m) using a twisted pair. The current that changes with temperature is converted into a voltage parameter by a high-precision operational amplifier OP07. By adjusting the ratio of R3 and R4, the output voltage value can meet the requirements of the A/D converter. W is used for temperature adjustment correction.
2.2 Analog Switch
Use 4051 as an analog switch with 8 inputs and 1 output. Actually, only 5 of them are used, so that 8031 can sample the temperature of 5 storage rooms in turn and control them respectively. Since the analog switch has a certain internal resistance, and the temperature voltage of the temperature sensor is very small, if it passes through the analog switch first and then amplified, the measurement accuracy will be greatly reduced. Therefore, the signal is amplified first, which increases the cost of the circuit to obtain higher accuracy.
2.3 A/D conversion
The system samples the dual-integral A/D conversion chip 7153, which has high conversion accuracy and strong anti-interference ability. Although its conversion speed is slow, the temperature change in the cold storage room is a large inertia change system with a large time constant, so this chip can meet the system requirements. The output of 7135 is a 14-bit binary number with a resolution of 0.005% of the temperature range, which creates conditions for the high accuracy of the entire system and is relatively low in price.
2.4 Human-computer dialogue system
The control system uses a 4-key keyboard and a 6-digit LED display. The 4 keys are function keys, increase keys, decrease keys, and confirmation keys. Software de-jitter is used, and keyboard input works in interrupt mode, saving CPU working time and improving system response speed. The functions of the 6-digit LED digital display are as follows: the first digit displays the warehouse number; the second digit displays the channel working status; the third digit displays the positive and negative temperature sign; the last 3 digits display the amount value, including 1 decimal place.
2.5 Refrigeration control actuators and compressor control components
Since this control system controls the on/off of the refrigerant and the start/stop of the compressor, and the frequency of starting and shutting down is not high, the traditional AC contactor is used to control the on/off of the AC solenoid valve and the start/stop operation of the compressor. To increase the reliability of the system, the compressor adopts two modes: automatic and manual forced control. The refrigeration has two modes of automatic and manual control, and the manual mechanical gate valve of the original system is retained, thereby increasing the flexibility and reliability of the system.
3 System Software
(1) Main program
The main program includes initialization of timer 0, timer 1, multiple flags, temperature memory, set value memory, display buffer clearing, temperature status display, clock counting unit initialization, keyboard status value initialization, and setting stack pointer content. The flow chart is shown in Figure 4.
[page]
(2) Timer T0 interrupt service routine
The T0 interrupt service program is the main program of the temperature control system, which is used to start A/D conversion, read in sampling data, digital filtering, temperature difference calculation, relay control and channel and compressor switch control, display timer increment and time judgment, as shown in Figure 5.
A series of subroutines are used in the T0 interrupt service program, such as temperature sampling subroutine, digital filtering subroutine, scale conversion subroutine, power judgment subroutine, etc. The status parameter register group of each channel: working mode register, working status register, storage temperature register, temperature upper limit register, temperature lower limit register.
(3) Keyboard recognition interrupt service routine
This system uses a 4-key keyboard structure, namely the function key, increase key, decrease key and confirmation key to complete the system parameter setting, power on and off and other operations, realizing the human-computer dialogue function. The keyboard operation process is as follows:
Channel number:
1, 2, 3, 4, 5, 6, 7, 8 (1 to 5 are the warehouse channel numbers, 6 to 8 are the compressor channel numbers). Status value: 0 for manual stop, 1 for manual start, 2 for automatic stop, 3 for automatic start, 4 for the set temperature upper limit, 5 for the set temperature lower limit.
Symbol: -, (+) positive sign is not displayed.
Temperature: measured value, set value.
(4) Display subroutine
6-digit LED digital tube, the first digit shows the refrigeration room number or channel number, the second digit shows the working status of the channel, the third digit shows the positive and negative value of the temperature, and the last 3 digits show the temperature value and the set value, including 1 decimal place. The display subroutine consists of 3 modules: display content update module, glyph code table conversion module, and glyph code serial port display module. There are 2 display modes: automatic turn display of each channel working status temperature mode and function setting status display mode.
References
[1] Hu Hancai. Principles and Interface Technology of Single-Chip Microcomputers[M]. Beijing: Tsinghua University Press, 1996.
[2] Yang Xian. Single-Chip Microcomputer Multi-Channel Precision Temperature Controller[J]. Radio, 1995(1).
[3] Zhang Lihong. Principles and Applications of Single-Chip Microcomputers[M]. Beijing: China Labor Press, 1999.
Previous article:Single chip microcomputer controlled switch mode CO2 laser power supply
Next article:Using MCU and CPLD to realize direct digital frequency synthesis (DDS)
- Popular Resources
- Popular amplifiers
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
- EEWORLD University Hall ---- Advanced C Language Programming for Embedded Systems (Ling Ming, Southeast University)
- Two-phase brushless DC motor speed control system based on DSP and CPLD
- The main structure of the DM642 image processing program
- Multi-way switch, battery inspection instrument
- EEWORLD University ---- Wildfire FPGA Video Tutorial
- 【Node.js for Embedded Systems】Electronic version
- 24V to 16V circuit problem
- The problem of the propagation speed of electric pulses in wires
- CCS usage problems and solutions
- 【FAQ】BQ76930: Battery balancing issue