- Home >> Technical Service >> MCU
Intelligent Humidifier System Design
Design of intelligent humidifier system based on 51 single-chip microcomputer
Smart home is a hot spot in today's society. Smart humidifiers can automatically adjust indoor humidity and remove static electricity. The climate in the north is dry, especially in winter, and humidifiers can improve the humidity, thereby creating a healthy living environment for people. After investigation, it is found that most humidifiers still need to be manually operated. Manually controlling the switch to realize the work and stop of the indoor humidifier not only cannot detect the humidity value of the indoor environment in real time, but also the price is relatively high, and the functions that can be realized are also relatively large. Single, the use of this humidifier has considerable safety hazards, such as excessive humidification or dry burning. Therefore, it is particularly important to develop and design a humidifier that can flexibly set the upper and lower limits of the humidity value of the humidifier according to the actual situation and needs of the user, integrate practicability and safety, low price, and good quality.
1. Overall Design of Intelligent Humidifier System
The system is mainly composed of the following modules: humidity signal acquisition circuit, button control and reset circuit, digital tube display circuit, atomization module humidification circuit, etc. The specific structure is shown in Figure 1. The air humidity signal measured by the temperature and humidity sensor is an analog signal, which needs to be converted by AD before being sent to the microcontroller for processing. After the single-chip microcomputer analyzes and processes the received signal, it outputs a control signal to the P3 pin to control the closed state of the relay, and the atomization module starts to work, thus realizing the system function of on-demand humidification.
As shown in Figure 1, when the air humidity value is lower than the system preset humidity value (40%RH), the sensor will detect the humidity signal and send it to the microcontroller. At this time, the digital tube display circuit will display the current indoor humidity value. The indicator light of the indicating circuit will emit light, and at the same time, the atomization control circuit will start and be in a working state to humidify the room. When the indoor air humidity reaches the upper limit humidity value set by the system (60%RH), the atomization control circuit will stop working, and the indicator light of the LED indicator circuit will go out.
2. Hardware circuit design of intelligent humidifier system
The design of this system is simple, and the processor can use 51 single-chip microcomputer to complete the function, so the STC89C52 single-chip microcomputer is selected to meet the design requirements of software and hardware.
2.1 Crystal oscillator circuit design of single chip microcomputer
Inside the STC89C52 single-chip microcomputer chip, there is an oscillator with XTAL2 and XTAL1 as output and input terminals. At the same time, timing devices are connected to the XTAL1 and XTAL2 pins. The internal oscillation circuit can realize self-oscillation. The timing device is generally a parallel resonant circuit composed of a quartz crystal and a capacitor. The crystal oscillator used in the system is 12MHz, and the capacitance value of capacitors C2 and C3 is 20 pF.
2.2 Reset circuit design of single chip microcomputer
The button reset circuit used in this design, the system can not only power on and reset, but also need to press the S1 button when it is running, and the power supply Vcc will generate a reset high level at the RST terminal. Similarly, as long as it is ensured that the RST terminal maintains a high voltage for longer than two machine cycles, the system can automatically reset normally.
2.3 Design of analog-to-digital conversion circuit
The intelligent humidifier system needs to transmit the humidity signal of the temperature and humidity sensor to the CPU, and must first convert the analog signal into a digital signal through the A/D converter. This system selects 8-bit resolution A/D conversion chip ADC0832, which is widely used because of its small size, strong compatibility and high cost performance. The multiplexing of its internal power supply input and reference voltage makes the analog voltage input of the chip between 0 and 5 V.
The 4 data lines of ADC0832 and the one-chip computer interface are CS, CLK, DO, DI respectively. When designing the circuit, connect DO and DI in parallel on one data line, because DO and DI are not valid at the same time during communication, and the interface between ADC0832 and microcontroller is bidirectional.
2.4 Nixie tube display circuit
The display circuit of this design uses a digital tube instead of an LED, because the digital tube display will be clearer under strong light conditions such as daytime. Although the liquid crystal display is extremely power-saving, it is not clear when the external light is very bright and the temperature range is limited. In addition, the price of LED digital tubes is relatively low compared with that of liquid crystal displays, so this design uses LED digital tubes.
The design selects the nixie tube display module, which has a built-in byte library and does not have a storage function. It adopts a parallel connection mode and is relatively convenient to use. It is used to display soil moisture information and the system's preset humidity threshold. A total of four independent buttons are selected, including a reset button, a setting button, a "plus" button, and a "minus" button. After power on, the digital tube displays the current humidity value of the air, press the setting button, the digital tube displays the upper limit of the system preset humidity, and then press the "plus" or "minus" button to change the preset humidity upper limit of the humidifier; press the first Press the setting button twice, the digital tube will display the lower limit of the system preset humidity, and then press the "plus" or "minus" button to change the preset humidity lower limit of the humidifier; press the third setting button, the digital tube will display the current indoor humidity value , so far the setting is complete.
2.5 Atomization module control circuit
In the humidification control circuit of the atomization module, the collector of the triode is connected to one end of the relay, the emitter is connected to the +5 V power supply V CC, the pin P3.5 of the microcontroller is connected to the base of the triode Q5 through R6; the resistor R7 is the same as The light-emitting diode constitutes a humidifier working state indicating circuit. If the relay is energized and closed, the LED will light up, so that the operating state of the relay can be detected, indicating whether the atomization module is in working state, and whether the humidifier needs to humidify the room .
3. Intelligent humidifier system software design
This design uses C language to write programs, and the entire system program adopts modular design, mainly including data acquisition module, key control module, reset module, digital tube display module, and atomization control module.
Through the analysis of the circuit principle and function, the overall design of the intelligent humidifier system has been fully understood. After the program is written in C language, the single-chip microcomputer is compiled and debugged with Keil software. Until the program meets the design requirements and there are no running and compiling errors, burn it into the 51 single-chip microcomputer for software and hardware debugging, so as to realize the system function.
Summarize
This system uses 51 single-chip microcomputer to complete the design of a simple intelligent humidifier control system. It has low cost and high cost performance. Compared with many similar products on the market, it has certain advantages, but this paper still has some shortcomings, such as the system Design integration needs to be improved.
The above is the design technology of intelligent humidifier system based on 51 single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
- TOP