Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

MCU

Smart window closer MCU


Design of intelligent window closer in rainy weather based on single chip microcomputer


The rainy weather intelligent window closer is composed of a controller system, a sensor system, an actuator system and a display system. The controller system is a single-chip microcomputer, the sensor system is composed of a raindrop sensor and a temperature sensor, the actuator system is a stepping motor, and the display system is an LCD1602 liquid crystal screen. Each system has a clear division of labor, each performs its own duties, and cooperates with each other to form a rainy day intelligent window closing. device as a unified whole.


1. Working process of intelligent window closing system in rainy days


Firstly, the single-chip microcomputer detects the external environment through the raindrop sensor, and after A/D conversion, the signal is transmitted to the single-chip microcomputer, and then the single-chip microcomputer judges whether the rainwater value reaches the threshold value, so as to realize the opening and closing of the window.


2. Hardware introduction of smart window closer in rainy weather


(1) The minimum system module of single-chip microcomputer: STC15W4K32S4 single-chip microcomputer is used in this design. The STC series single-chip microcomputer is developed on the basis of the traditional 8051. STC single-chip microcomputer has carried out a comprehensive technical upgrade and innovation. Compared with the traditional 8051 core single-chip microcomputer, it has better performance and advantages. It has a wide voltage range and can work normally within the voltage range of 2.4 ~ 5.5V; it all adopts Flash technology, and the erasing and writing times are more than 100,000 times; it adopts ISP/IAP (in-system programmable/in-application programmable) technology; enhanced 8051CPU , 1T type, that is, there is only one system clock per machine cycle, and the speed is 8-12 times faster than the traditional 8051 single-chip microcomputer; there is a high-reliability reset circuit inside, and the 16-level reset threshold voltage is optional during ISP programming, which can completely save the external reset circuit; has a high-precision R/C internal clock, which can completely save the external expensive crystal oscillator; when ISP programming, the internal clock 5~35MHz is optional; greatly improves the integration level, such as integrating 8-channel high-speed 10-bit ADC, The speed can reach up to 300,000 times per second.


(2) Raindrop sensor module: The raindrop sensor is used to detect whether it is raining and the amount of rain. The sensor has properties such as oxidation resistance, good conductivity, and long life. It is equipped with a potentiometer to adjust the sensitivity. The working voltage is 3.3V to 5V. It uses a wide voltage LM393 comparator. When it rains, through the raindrop sensor, using the principle of the conductivity of water, the sensor board that is not connected is turned on, after A/D conversion, it is transmitted to the single chip microcomputer, and the rainfall is displayed on the LCD screen.


(3) Temperature sensor module: The temperature sensor used in this design is LM35D, which is used to detect the outdoor temperature, convert the analog quantity into digital quantity, and display it on the LCD1602 liquid crystal screen. The sensor has the advantages of high sensitivity, good linearity, wide operating voltage and very low power consumption. The output voltage of the sensor has a linear relationship with the Celsius temperature scale. When the temperature is 0°C, the output is 0V. Whenever the temperature rises by 1°C, the output voltage increases by 10mV. The conversion formula is U=T×10mV.


(4) Stepping motor drive module: As the name suggests, the stepping motor is stepping and rotating. Its function is to convert the pulsed electrical signal into a corresponding angular displacement, that is, to give a pulse signal, the stepping motor will rotate an angle. The speed and stop position of the motor only depend on the frequency of the pulse signal and the number of pulses, and do not change with the change of the load. The stepper motor drive circuit needs ULN2003 driver chip to realize. The ULN2003 driver chip is composed of high withstand voltage, high current, and 7 silicon NPN Darlington tubes inside. Each pair of Darlingtons in ULN2003 is connected in series with a 2.7K base resistor, which can be directly connected to TTL and CMOS circuits at a working voltage of 5V, and can directly process data that originally required standard logic buffers to process; ULN2003 works The voltage is high, the working current is large, the sink current can reach 500mA, and it can withstand the voltage of 50V in the off state, and the output can also run in parallel at high load current. In this design, the role of the stepper motor is to realize the switch window.


(5) Display module: The display adopts LCD1602 liquid crystal screen, which can display 32 characters and 2 lines, that is, 16 columns x 2 lines. There is a potentiometer, which can adjust the contrast by itself. There is a reset circuit inside the LCD, which can be used to provide various control commands, such as: clear screen, character flashing, cursor display, character shifting, etc. In this design, it is used to display the outdoor temperature, rainfall, and the opening and closing status of the windows.


3. Test results of rainy weather intelligent window closer system


In the experiment, we set the threshold to 30. In the automatic mode, when the rainfall is greater than 30, the window will be automatically closed. When the rainfall is less than 30, the windows open automatically. In manual mode, the device realizes opening and closing windows under the control of keys. Automatic and manual mode can be switched arbitrarily. After repeated experiments and tests, it has been verified that the performance of the equipment is stable and reliable.


Summarize


Smart home has brought new experience to people's life, and with the development of science and technology will further improve our life, rainy day intelligent window closing system has solved practical problems in people's life. In the future, more functions will be added on the basis of this device, such as intelligent alarm system and intelligent anti-theft system, to create a comfortable and intelligent home space.


The above is the rainy weather smart window closer design technology based on single-chip microcomputer introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. 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