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

home appliances

Smart Fan Solution


Traditional electric fans mostly use mechanical control, single function, loud noise, short timing time, fixed shaking head mode, and large changes in wind speed when changing gears. In response to these shortcomings, this paper uses a STM32 single-chip microcomputer based on ARM Cortex⁃M3 core with high cost performance and low power consumption as the control unit to produce an intelligent electric fan. The fan skillfully uses human body infrared sensing technology, microcomputer control technology, Stepless speed regulation technology, temperature sensing technology, liquid crystal display technology. Applying intelligent control technology to the control of household appliances, it can realize the shaking or positioning of the fan according to the infrared sensor of the human body, the automatic adjustment of the wind speed can be realized according to the sampling of the ambient temperature, and the intermittent work of the fan can be set according to the requirements of different groups of people. Time; it can display the information of time, environment and working status, and has a friendly interactive interface; the chip used is powerful and convenient for function expansion.


1. Overall design of smart electric fan


The fan adopts a modular design, and the function of the fan is realized by calling various functional modules, especially for the control and adjustment function. The system call program takes the controller STM32 based on the ARM Cortex⁃M3 core as the core, and the overall block diagram of the system is shown in Figure 1.


图 1 控制系统总体框图


2. Hardware design of intelligent electric fan


The smart electric fan uses the STM32 single-chip microcomputer as the central processing unit, and the fan is driven by a DC motor and a stepping motor. It can sense environmental information through sensing units such as temperature sensors and infrared sensors. Good realization of human-computer interaction.


2.1 Control chip


The core of the control system is the STM32 chip, which has the advantages of low power consumption, low cost, high performance, high integration, small size, strong reliability, and high cost performance. STM32 adopts a new single-wire debugging (Single Wire) technology, which saves a lot of debugging tool costs; at the same time, STM32 also integrates most memory controllers, which can be directly connected to Flash outside the MCU, reducing design difficulty and application barriers .


2.2 Motor control circuit


Motor speed regulation is an important aspect of the entire control system and an important functional component of the electric fan, mainly including two parts: DC motor and stepping motor. The control of the DC motor is realized by pulse width modulation, and the speed of the DC motor is changed by reading the value of the temperature sensor or the key to adjust the duty cycle of the pulse width; the stepping motor converts the electrical pulse signal into an angular displacement Or the open-loop control element of linear displacement, through the infrared sensing module to sense the orientation of the human body to determine the rotation direction and the number of rotation steps of the stepper motor, and realize the positioning or shaking of the fan.


2.3 Temperature control circuit


The temperature sensor adopts digital integrated temperature sensor DS18B20, and the circuit is shown in Figure 2. It does not require any peripheral components in use. Its high integration greatly reduces the error factors of external amplification and conversion circuits, and the temperature error is small and the resolution is high; the measured temperature value can be converted into digital quantities inside the device and output directly, which simplifies the system program design; at the same time, it adopts advanced The unique single-bus technology has strong anti-interference ability. Therefore, the use of DS18B20 can make the system structure simpler and more reliable. DS18B20 can meet the requirements of electric fan temperature detection in terms of temperature measurement accuracy, conversion time, transmission distance, and resolution.

图 2 DS18b20温度测量电路


2.4 Infrared sensing circuit


The infrared sensing module adopts the pyroelectric human body infrared sensing element integrated module HC⁃SR501. The pyroelectric effect is similar to the piezoelectric effect, and refers to the phenomenon that the crystal surface is charged due to temperature changes. The module can effectively detect human activities within the influence range of the electric fan. It has a large monitoring range and good concealment. It can reliably distinguish moving people from falling objects. It has strong anti-interference ability and low false alarm rate; The integrated photoresistor works reliably at night. Through the setting, if someone is active within the effective range of the electric fan, the module outputs a high level, so that the fan can be turned on when the person calls, and the high level is changed to a low level after the person leaves, that is, the person leaves the monitoring range The electric fan is turned off with a delay; the delay time is adjustable.


2.5 Liquid crystal display circuit


The liquid crystal display module adopts a 3.2-inch TFT liquid crystal display screen with an R61505U control chip. The 320×240 liquid crystal display can well display the various functional states of the fan: working state (Manu, Auto, Sleep), timing time in sleep mode ( Work, Sleep), the gear position (Speed) of the fan in manual mode, and also display information such as year, month, day, week, time, temperature, etc.


3. Software design of intelligent electric fan


The control system software is programmed in C language. Modular design, in addition to the main program, there are various functional subroutines, which respectively perform corresponding functions such as key processing, DC motor drive speed regulation and stepping motor positioning, temperature, time, function and other information display, sleep mode setting and other corresponding functions. The main program flow of the system software is shown in Figure 3, and the key interrupt program is shown in Figure 4.


图 3 系统软件主程序流程图


Key interrupt modes include automatic mode, manual mode, and sleep mode. In the automatic mode, the 180° space in front of the fan is divided into three infrared sensing areas. When a person enters any infrared sensing area, the fan starts to work. If only one of the three infrared sensing areas detects people, the fan will judge that it is now in single-player mode. In this mode, the fan will always turn to the area where people are detected to achieve real-time tracking. If it detects people in more than one infrared sensing area, the fan will judge that it is in multiplayer mode. If people are detected in two areas, the fan will swing its head between the two areas. If it is an adjacent area, it will swing its head at a small angle; if it detects people in a non-adjacent area, it will swing its head at a large angle. ; When people are sensed in the three areas, they will also shake their heads at a large angle. The fan's intelligent start and stop, small-angle head swing, and single-area tracking all make the fan user-friendly and avoid energy waste.

图 4 按键中断程序流程图


In the manual mode, the fan realizes the manual adjustment of the speed of the fan. There are two buttons of speed up and speed down, which can realize the speed regulation of the fan in seven levels.


In sleep mode, according to the needs of different users such as the elderly and children who are weak and cannot blow air for a long time, you can set the fan to work for a shorter time and sleep for a longer time. The fan will work intermittently within the set time to avoid Discomfort caused by prolonged blowing. Therefore, users can set the working time and sleeping time of the fan according to their own needs to achieve the best comfort.


4. Fan debugging


Design the circuit with STM32 as the core, print the circuit board, and process and produce the electric fan. Download the program written in C language into the chip, and test it after connecting the electric fan. The test is as follows: turn on the electric fan, when someone is close to the electric fan, the fan starts to work; when the person is away from the electric fan, the fan stops working. Put the electric soldering iron or ice cubes near the temperature sensor DS18B20, and the electric fan can adjust the fan speed according to the temperature change. Press the manual mode button and select the speed control button in manual mode to adjust the fan speed. Press the automatic mode button, the fan can track or shake the head according to the position of the person. Press the sleep mode button to set the working and sleeping time of the fan, and you can see that the fan works in a cycle based on the set working and sleeping time.


The test shows that the electric fan can start and stop intelligently, work normally according to each set mode, display information such as temperature and time normally, and is responsive, simple and practical, and has achieved the expected design purpose.


Summarize


This project adopts STM32 single-chip microcomputer, combined with temperature sensor, infrared sensor, etc., and designed this smart electric fan by improving the original functions of traditional electric fans.


The smart electric fan has the following outstanding features: (1) High cost performance. The core of the control system is the STM32 chip, which has the advantages of low power consumption, low cost, high performance, high integration, small size, strong reliability, and high cost performance. (2) Intelligence. The fan can be started and stopped intelligently through infrared induction, avoiding the energy waste caused by forgetting to turn off the fan; and it can track or shake the head in real time according to the position of the person to meet the user's requirements to the greatest extent, allowing the user to feel the blowing effect in real time Feel. (3) Unique sleep mode. The sleep mode of this fan design greatly improves the shortcomings of traditional fan timing. In order to meet the needs of different groups of people, the fan can set the working time and sleep time of the fan by itself, so that the fan will work in a cycle within the set time, and there is no need to worry about the discomfort caused by long-term blowing.


The above are the details of the smart electric fan solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have development and design needs for electric fans, you can trust us. We have rich experience in custom development of electronic products. We can evaluate the development cycle and IC price as soon as possible, and can also calculate PCBA quotations. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. 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