This design is based on STC89C52 infrared remote control temperature and humidity controller. DHT11 digital temperature and humidity sensor is used to collect the temperature and humidity of the factory building. Through infrared receiving and processing module, temperature and humidity are set and adjusted directly. Digital tube display module is used to display the real-time temperature and humidity collected and set humidity temperature. Human-computer interaction. The whole system is economical and stable. The prototype has been tested and run to verify its effectiveness and practical value, and has a good application prospect. As we all know, in the hot summer environment, the air temperature difference between dry and wet is large, the temperature in workshop is often higher than that outside. The temperature rises because of the solar radiation, the temperature stagnation of light and human body emission. The high temperature in workshop is sultry, the air is not circulating, and the dust in workshop is large.
The bad working environment will also lead to the increase of staff turnover rate and production. Lower power and worse quality control will eventually lead to customer loss. So at this time, the turbid air with odor, dust and high temperature should be discharged out of the room in time, so that the indoor temperature can be reduced and the air quality can be improved. At the same time, with the development of society, the progress of science and technology and the gradual improvement of people’s living standards, various automatic remote control systems which are convenient for people’s lives have begun to enter into people’s lives. Infrared remote control is a widely used communication and remote control technology. Infrared remote control is a kind of control system that uses infrared to transmit information. Infrared remote control has the advantages of anti-interference, simple circuit, easy coding and decoding, low power consumption and low cost. It is widely used in household appliances, color TV, video recorder, audio equipment, air conditioner and toys. In industrial equipment, under high pressure, radiation, toxic gas, dust and other environment, infrared remote control is not only completely reliable, but also can effectively isolate electrical interference. This design is based on people-oriented, economic, safe, thermostatic element convenient and practical purposes, with STC89C52 as the control center, DHT11 digital temperature and humidity sensor to collect temperature and humidity of the workshop [2], infrared remote control technology to achieve the setting and regulation of temperature and humidity, when exceeding the set temperature and humidity, automatically start the exhaust fan, realize the automatic adjustment of temperature. At the same time, the digital tube display module is used to display the collected real-time temperature and humidity, and set the humidity temperature to realize human-computer interaction. This design is mainly used in industrial equipment and workshop with high pressure, toxic gas, dust, high temperature and other environment. It not only makes up for the shortcomings of traditional products, but also is economical and practical. With a slight change in this design, it can be extended to shopping malls, supermarkets, offices, hotels, hospitals, stations, gymnasiums, dance halls, auditoriums, etc. Conference rooms, schools and other places can be more used in refrigerators, lights and curtains and other household appliances, and also widely used in smart home. In this design, STC89C52 is used as the core of temperature and humidity controller. DHT11 digital temperature and humidity sensor is used to collect temperature and humidity in workshop, and it is directly connected with single chip computer. Through infrared receiving and processing module, temperature is set and adjusted directly. Digital tube display module is used to collect real-time temperature and humidity. The constant humidity temperature is displayed to realize human-computer interaction. When the real-time temperature and humidity exceed the upper limit of the set temperature, the exhaust fan is automatically activated for exhaust.
The exhaust fan uses 220V AC power supply, so in actual use, relay is used to convert 5V to 220V power supply.
The schematic diagram of this design is shown in Figure 1. The main controller circuit is composed of single chip computer, crystal oscillator circuit, reset circuit and power supply circuit. The microcontroller adopts 8-bit STC89C52 microcontroller; the crystal oscillator circuit uses 2 22pF capacitors to fine-tune and 11.0592MHz oscillation frequency to transmit the clock signal to the microcontroller STC89C52; the width of differential pulse generated at the instant of power-on of reset circuit is larger than 2 machine cycles; the power supply circuit adopts USB interface power supply mode and is realized through CH340. Now single-chip program erase [3].
Figure 2-1 shows the minimal system diagram of single chip computer, and Figure 2-2 shows the industrial USB communication module and power supply system. Temperature and humidity detection module design This design of temperature and humidity detection module circuit uses DHT11 digital temperature and humidity sensor [4]. DHT11 is a temperature and humidity composite sensor with calibrated digital signal output. It uses special digital module acquisition technology and temperature and humidity sensing technology to ensure that the product has high reliability and excellent long-term stability. STC89C52 microcontroller (host) communicates with DHT11 digital temperature and humidity sensor using a simplified single bus. It is directly connected to the IO port of the microcontroller through an external pull-up resistance of about 5.1k. The circuit schematic diagram is shown in Fig. 3. DATA is used for communication and synchronization between STC89C52 MCU and DHT11. It uses single bus data format to transmit 40 bits of data at a time and high bits first out. Bit humidity integer data 8 bit humidity decimal data 8 bit temperature integer data 8 bit temperature decimal data 8 bit check bit. After STC89C52 MCU sends a start signal, DHT11 converts from low-power mode to high-speed mode. When the host starts the signal, DHT11 sends a response signal, sends 40 bits of data, and triggers a signal acquisition. Signal transmission is shown in Figure 4. STC89C52 MCU can read DHT11 data through the following steps.
After DHT11 is powered on, the DATA data line is pulled up by pull-up resistance and keeps a high level. The DATA pin is in the input state. The external signal is detected at all times, and the environmental temperature and humidity data are tested and recorded. When the DATA pin of DHT11 detects the low-level signal not less than 18ms from the single chip computer, it waits for the low-level signal to end. After the delay, the I/O of the single chip computer is in the input state at this time, and the DATA pin of DHT11 is in the output state. DHT11 output a low level of 80 microseconds as a response signal, and then output a high level of 80 microseconds to inform the MCU to prepare to receive data.
The DATA pin of DHT11 outputs 40 bits of data. The MCU receives 40 bits of data according to the change of I/O level. The format of “0” is low level of 50 microseconds and high level of 26-28 microseconds. The format of “1” is low level of 50 microseconds and high level of 70 microseconds. After the DATA pin of DHT11 outputs 40 bits of data, it continues to output low level of 50 microseconds and then turns into input state, because the pull-up resistance changes to high level. But DHT11 internal re-test environmental temperature and humidity data, and record data, waiting for the arrival of external signals, start a new cycle. Infrared remote control system is generally composed of infrared transmitter and infrared receiver. Infrared transmitter can also be composed of keyboard circuit, infrared coding chip, power supply and infrared transmitter circuit. The infrared receiving device can be composed of infrared receiving circuit, infrared decoding chip, power supply and application circuit. The transmitter of this system adopts the universal remote controller based on TC9012 encoding chip, which is cheaper in the market. The model is HS-21 and its user identification code is 00FF. In this design, the digital keys 0-9, ” “, “-” and “EQ” are mainly used. Ten of them are used to directly set the required temperature, ” “, “-” is used to increase and decrease the set temperature, and “EQ” is used to enter the set temperature mode and determine the initial temperature set to 23 degrees. The infrared receiving part of this design adopts the infrared integrated connector, the model is TSOP1383. It contains a high-frequency filter circuit, which is used to filter the carrier signal (38KH) of the infrared synthetic signal and send the received signal. When the infrared synthesized signal enters the infrared receiving module, the digital code emitted by the original transmitter can be obtained at the output of the infrared synthesized signal.
As long as it is decoded by the decoding program of the single chip computer, it can be known which key is pressed, and the corresponding control processing is made to complete the infrared remote control action. In this design, the second function (external interrupt 0) of P3.2 port of MCU is used to receive infrared signals. When the infrared signal is transmitted from the remote control, the level of P3.2 port is lowered, and the MCU immediately stops other work, and instantly transfers to receive and process the infrared signal. As shown in Figure 8, the circuit diagram of infrared receiving hardware is given.
This design realizes the real-time dynamic display of temperature and humidity. Due to the characteristics of self-luminescence and high brightness of digital tube, the system uses cheap digital tube display. In order to realize dynamic display, the system uses two 74HC573 latches to drive segment and bit selection [6], two 573 latches IO ports to connect P.0-P.7, ABCDEFGH of digital tube to 74HC573-1 chip, WE1-WE6 of digital tube to 74HC573-2 chip, DU (P2.6) to control 74HC573-1 latch and WE (P2.7) to control 74HC573-2 signal. Latch. Figure 9 shows the schematic diagram of the digital tube display circuit. The fan used in this design is 220V AC, and the control module is 5V power supply, so the conversion of weak current control to strong current is necessary. This system uses relay to convert. At the same time, the triode 8550 is used to drive the relay. When the temperature and humidity sensor DHT11 detects that the temperature and humidity exceed the set value, the microprocessor P2.3 port output high-level control 8550 is turned on, and then drive the relay to work, turn on the 220V power supply, turn on the fan. The principle diagram of the fan control circuit is shown in Fig. 10. Every time the system MCU is powered on or reset, the digital tube displays the initial temperature and humidity. At this time, the general remote controller is used to set the temperature and humidity. Thereafter, the digital tube displays the real-time temperature and humidity. When the temperature and humidity detected by the temperature and humidity sensor DHT11 exceeds the set value, the output high level control 8550 of the MCU P2.3 port opens, and then drives the relay to work, turns on the 220V AC power supply, and turns on the fan. Part of the flow chart is shown in Figure 11. In this design, STC89C52 is used as the core of temperature and humidity controller. DHT11 digital temperature and humidity sensor is used to collect temperature and humidity in workshop, and it is directly connected with single chip computer. Through infrared receiving and processing module, temperature is set and adjusted directly. Digital tube display module is used to collect real-time temperature and humidity. The constant humidity temperature is displayed to realize human-computer interaction. This design is mainly used in industrial equipment and workshop with high pressure, toxic gas, dust, high temperature and other environment. It not only makes up for the shortcomings of traditional products, but also is economical and practical, and can play the role of energy saving. With a slight change in this design, it can be extended to shopping malls, supermarkets, offices, hotels, hospitals, stations, etc. Gymnasium, dance hall, auditorium, meeting room, school and other places can be used for refrigerators, lights and curtains and other household appliances, and also widely used in smart home.