Cold storage single chip computer control system

Publisher:数字航海家Latest update time:2012-02-07 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Cold storage single chip computer control system

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)

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号