introduction
At present, due to technical and financial reasons, most large and medium-sized warehouses in China are limited to monitoring temperature in storage management. When the temperature exceeds the standard, forced ventilation and warehouse turning are carried out. Even so, if the treatment is not timely or due to limited equipment and manpower conditions, a large amount of losses will still be caused. The temperature rise of the warehouse storage is mainly caused by humidity. The excessive moisture of the warehouse storage itself or continuous high humidity weather will cause the storage metabolism to accelerate and release heat. The temperature rise caused by heat release will further aggravate the metabolism and even mold and deteriorate. Once this vicious cycle is formed, it is difficult to effectively control it. Therefore, while monitoring the temperature, the warehouse must pay attention to the detection of air humidity, so as to take effective measures in advance to control the temperature rise and mold of the warehouse storage. The temperature and humidity control system introduced in this article uses the AT89C2051 single-chip microcomputer as the control core, combined with sensors, communications and digital electronic circuit technology, to achieve temperature and humidity detection and effective control of warehouse temperature and humidity, reducing economic losses and labor intensity.
System overall structure
In response to user requirements, the temperature and humidity of several geographically dispersed warehouses are monitored and controlled in real time. In order to adapt to the monitoring and management of multiple measurement and control points, a distributed system control method is adopted after analysis, that is, a slave machine that can work independently is configured at each measurement and control point, and multiple slave machines are monitored and managed by one upper computer, and the master-slave monitoring and management form is adopted. The overall structure of the system is shown in Figure 1.
The functions and relationships of each part of the system are as follows:
The host is the management machine, which completes parameter setting, data storage, processing and management functions.
The slave is the control machine, which uses the single-chip microcomputer 2051 to directly realize the control functions of each module, and can realize all control functions under the condition that the host is turned off.
The communication interface realizes the conversion between RS232 signal and RS485 signal. The host sends control parameters to the slave through it, and the slave transmits the field collected data to the host through it.
Data collection enables detection of sensors and operating equipment.
The controller and its equipment control the field equipment according to the signals output by the system.
The input and output part includes input module and output module. The input module converts the collected signal and inputs it to the slave machine, while the output module outputs the system control signal to the controller and its equipment.
Figure 1 System overall structure diagram
The system is centered on temperature and humidity monitoring. The host periodically queries the slave for temperature and humidity parameters and equipment operation status according to user requirements. When the setting parameters of each control module are modified, the new parameters are sent to the slave. The host can set and control the parameters of the slave, and the slave can also work independently. The slave continuously collects temperature and humidity data through the data acquisition device, makes control decisions based on the setting parameters of the control module, drives the equipment to operate, and is ready to accept the host's instructions at any time. When asked, the data encoding of the warehouse is transmitted to the host through serial communication. After receiving the data, the host processes the data, displays the current status information on the monitoring interface, and stores this information in the database in real time to prepare data for user maintenance and management. The data can be queried, or the data information for a period of time can be compiled into a report. The report includes various statistical data, and the data processing can be drawn into a graphical curve to realize data analysis and management.
System hardware design
The host of the control system uses a general PC (64M or above), which can fully meet the system's requirements for data processing and operating speed. The slave part is based on the 2051 single-chip microcomputer, and is composed of external data acquisition input circuit, output circuit, status monitoring circuit and other parts.
This system monitors multiple measurement and control points. One host computer realizes master-slave communication with multiple slave computers, and realizes RS485 standard bus communication through the communication interface machine. The data detection of the system is undertaken by various sensors. Figure 2 shows the schematic diagram of the single-chip control platform 1 system.
Figure 2 Schematic diagram of the single-chip control platform 1 system
This control platform mainly realizes field data collection, and processes, stores and sends the collected data to the host. 2051 is the core of the control platform. The temperature and humidity data are collected through multi-channel sensors, and the collected signals are converted by ADS1286. In order to effectively control multi-channel sensors, 4051 is used in the system design to achieve expansion, so that the control platform can control multi-channel sensors, and the collected data is stored in 24LC04. In the drive of the control platform, CMOS tube 1120 is used to improve the driving ability of 2051, so that each channel of the control platform can control multiple sensors (mainly to improve the driving ability of the control platform for 18B20 and temperature and humidity collectors). When communicating with the host, in order to achieve the same level, the control platform uses the RS485 chip to realize the conversion between the TTL level of the RXD and TXD pins of 2051 and the 485 level of the A and B pins of RS485. The RS485 standard level sent by the host through the communication interface is converted into the TTL level and transmitted to 2051, and the TTL level sent by 2051 is converted into the RS485 standard level and transmitted to the host through the communication interface.
Figure 3 MCU control platform 2 interface circuit
Figure 3 shows the interface circuit of the single-chip control platform 2, which mainly realizes the control of field equipment (field equipment mainly refers to general air conditioners, heat/dehumidifiers, etc.) and sends the equipment status to the host. The main parts of the control platform are as follows:
·2051 microcontroller
2051 is the core of the control platform.
24LC16 memory expansion
24LC16 is used to store the status data of field equipment.
·remote control
The control platform can remotely control the on-site equipment through HS0038 and infrared light-emitting tubes. Depending on the different on-site equipment, HS0038 or infrared light-emitting tubes can be used to remotely control the on-site equipment.
RS232 communication
The control platform connects the serial port pins RXD, TXD and GND of 80C196 to the photoelectric coupling circuit, converts the TTL level output by the serial port of 80C196 into the RS232 standard level, converts the RS232 standard level sent by other microcomputers into the TTL level for 80C196, and realizes the isolation between RS232 level and TTL level, thus protecting the computer serial port while realizing the conversion between RS232 level and TTL level.
RS485 communication
The control platform uses the RS485 chip to achieve the conversion between the TTL level of the RXD and TXD pins of 2051 and the 485 level of the RS485 pins A and B. The RS485 standard level sent by the host through the communication interface machine is converted into the TTL level and transmitted to 2051, and the TTL level sent by 2051 is converted into the RS485 standard level and transmitted to the host through the communication interface machine.
System software design
The software system consists of two relatively independent upper computer software and lower computer software parts. It adopts the grain depot temperature and humidity measurement and control algorithm based on Smith-Fuzzy controller. The structure diagram of the upper computer monitoring software module is shown in Figure 4.
Figure 4: The structure of the host computer software module
The host computer monitoring software mainly realizes the following functions:
Serial communication: Complete the communication configuration of the host computer and realize the communication between the host computer and the slave computer.
Data display: Provides three-dimensional stereogram, curve trend chart and table display.
Data storage: Real-time data (including maximum, minimum, and average values) are stored in a historical data table in the database according to user requirements; data can also be exported to a file and saved in a text file in text format.
Data query: Allow users to query real-time data, historical data or perform trend curve analysis according to the situation.
Data printing: Print real-time data and historical data in a table format according to user requirements, and also print trend graphs.
Abnormal alarm: When the real-time temperature and humidity data exceeds the set upper and lower temperature and humidity limits, the alarm will sound.
System settings: To ensure that the system can run well under any circumstances, users are allowed to set parameters such as the measurement time interval, upper and lower limits of temperature and humidity, save time interval, login user name, password, etc.
The system's lower computer main control module completes real-time monitoring and management tasks through the monitoring module, human-computer interaction module and communication module, and all work is broken down into alarm processing, control decision-making, information display, command processing, parameter setting and information output submodules to run. The lower computer application software includes five main modules: main program, data acquisition subprogram, data processing subprogram, sending subprogram and display subprogram.
Conclusion
The warehouse temperature and humidity control system uses digital temperature sensors and single-chip microcomputers to achieve automatic measurement and adjustment of temperature and humidity in the warehouse. The AT89C2051 single-chip microcomputer has unique advantages such as rich instruction system, compactness, low price, flexibility and easy expansion, which greatly improves the cost performance of the entire system in the designed warehouse temperature and humidity control system. The system introduced in this article has been widely used in grain warehouses, food warehouses, vegetable cold storage warehouses, archives warehouses and other industries. The system runs well, is stable and reliable, and has been well received by users.
Previous article:Using 51 single chip microcomputer to control LED dot matrix
Next article:Chinese Character Input in 51 Single-Chip Microcomputer Display and Control System
- Popular Resources
- Popular amplifiers
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Multi-channel pressure measuring instrument based on C8051F020 single chip microcomputer
- Design of automatic player for work and rest signal based on 51 single chip microcomputer
- CDMA general standard list and test items
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
- Last day: Sign up for the ST MEMS Sensor Creative Design Competition and win big prizes with DIY
- Getting Started with Smart Home Audio Design
- Radio Frequency Integrated Circuits, how to learn this field well?
- [Project source code] Altera FPGA enables the on-chip pull-up resistor function of the pin
- Recommended Espressif ESP32+WT32-SC01
- RISC-V MCU Development (10): File Version Management
- Development of an electric bicycle charging system based on SPCE061A and CPLD
- Design of the Internet of Things for Power Grids: Using Wi-Fi to Connect Circuit Breakers and Sensors
- Strong recommendation! ADI launches low voltage circuit breaker electronic trip unit (ETU) solution
- [GD32E503 Review] Part 8: NandFlash Performance Test