The main control chip of intelligent temperature and humidity controller is STC89C52, which has the advantages of excellent quality, strong anti-interference ability and high cost performance. The temperature sensor adopts DS18B20, which is fast, compact and not easy to break; the humidity sensor adopts DHT11, which is fast and stable in humidity measurement. The main components of this system are the minimal system of single chip computer, key input, temperature detection, humidity detection, LCD1602 display circuit and relay drive. With the advancement of science and technology, the development of society and the improvement of human material level, people have more and more strict requirements on temperature and humidity.
Especially in the booming greenhouse greenhouse, the requirements of temperature and humidity are very accurate and can respond quickly. Previous temperature and humidity control is too time-consuming and laborious, not only waste materials but also need manual care.
This design saves manual labor, and can control temperature and humidity quickly and accurately in the condition of no one. Intelligent temperature and humidity controller first places the temperature and humidity sensor in a suitable position, then collects the temperature and humidity from the temperature and humidity sensor DHT11 and sends it to the MCU.
The MCU processes the data and sends the processed data to LCD1602 for display and execution of the corresponding program. This design contains key function to adjust temperature and humidity. When the temperature or humidity reaches the value set by the key, the single chip computer will control the relay to perform the corresponding functions and alarm. The hardware module is divided into single chip module, power module and sensor module. Fig.
1 is the connection between DHT11 and MCU. As shown in the figure, the DATA pin in DHT11 is the communication pin with MCU.
It can be seen that it is a single bus connection mode and a serial interface, which can make the system more convenient and fast. DHT11 can transmit signals over a distance of 20 meters.
It can be used in many situations and is portable. This circuit is the main control circuit. The microcontroller circuit contains LCD1602, keys and minimal system. The function of keys is to adjust temperature and humidity to a suitable value. The minimal system is used to process signals received from the outside world, and then execute corresponding programs, which are displayed on LCD1602. The display screen used in this design is LCD1602,1602 with a display capacity of 16*2 characters. The voltage range of the chip is 4.5-5.
5V. The principle of relay circuit is that when the temperature exceeds the upper limit, the driver performs cooling work.
When the temperature is below the lower limit, the driver performs heating work.
When the humidity exceeds the upper limit, the driver starts dehumidification work.
When the humidity is lower than the lower limit, the driver starts the humidification work.
The main components of the program are timer interruption, key input settings, temperature and humidity acquisition, 1602 display, keyboard processing and other programs.
Timer interruption is mainly used for timing, thermostatic element to start the temperature and humidity conversion; the next step is to control the keys and input appropriate values with keys; temperature and humidity are collected and processed by SHT11, and displayed by 1602.
Finally, the MCU starts to scan the main function, initialize the function and call the sub-function. The system uses the smallest system of single chip computer as the main control circuit, AT89C52 as the main control chip, and DHTH11 as the humidity sensor.
DHTH11 has the characteristics of safety, reliability, low cost, high performance-price ratio and quick response.