Our Latest News

STM32-based intelligent air conditioning air supply device design

Abstract: An intelligent air conditioning device is designed to eliminate the health hazards caused by direct air blowing. The device uses STM32 as the core and OpenMV4 as the vision module to determine whether there are people in the scene; the ultrasonic distance measurement module is selected to measure the distance between the air conditioner and the user for temperature compensation; the non-contact infrared temperature sensor MLX90614 is selected to measure the human body temperature; the human body temperature data obtained in real time is analyzed by STM32 to control the rotation amplitude of the servo between the primary and secondary air flaps, so as to control the sparsity of the air supply. This will enable intelligent control of air conditioning and effectively reduce the health hazards caused by direct blowing of air conditioners.

Keywords: air conditioning intelligent air supply; STM32; ultrasonic distance measurement; non-contact temperature measurement; camera module; OpenMV4

This image has an empty alt attribute; its file name is image-415.png

0 Introduction
As a necessity of life, air conditioners have gradually become a powerful tool against the heat and cold, but if you spend a long time in the direct blowing environment of air conditioners, it is likely to produce dry skin, joint pain, dizziness and headache and other adverse reactions. Especially children, the elderly, pregnant women and other special groups, if a long time by the air conditioning direct blowing, in their own immune system is very easy to contract diseases, there are health risks. Currently on the market has been the existence of external air conditioning wind shield [1] although the basic needs of the wind can be achieved, but can not be flexible mobile. If no one is within the direct blowing range of the air conditioner, and the room needs to be cooled quickly, it is necessary to reduce the wind resistance of the external air conditioner baffle, and the existing design requires manual or remote control adjustment of the baffle. In practice, for the elderly, children, pregnant women and other groups, manual adjustment is not convenient and not safe. In addition, when the human body temperature is high, the right amount of breeze is needed to blow the body, so it is necessary to reasonably control the opening of the air damper and the sparseness of the air supply [2]. In order to avoid the health hazards caused by direct air conditioning and to flexibly adapt to real-life scenarios, this paper designs an STM32-based intelligent air conditioning air supply device, which can automatically control the rise and fall of the air damper and reasonably control the thinness of the air supply according to the change of human body temperature, reducing the hazards of direct air conditioning and improving the quality of life at the same time, with broad application prospects.

1 Overall design

This design uses STM32F103RCT6 as the core controller [3]. First, OpenMV4 [4] is used to determine whether someone is present within the direct blowing range of the air conditioner. Second, the STM32F103RCT6 drives the servo to drive the MLX90614 [5], the ultrasonic distance measurement [6] module and the OpenMV4 to rotate to the position where the human coordinates coincide with the coordinates of the center of the field of view. The MLX90614 and the ultrasonic distance measurement module are used to obtain the body temperature data and the distance between the human body and the outer air conditioner baffle, and the temperature compensation of the body temperature data measured by the MLX90614 is combined with the distance to obtain the final body temperature data, and the thinness of the air baffle is controlled according to the final body temperature data, so as to achieve the effect of anti-direct blowing. The system flow design is shown in Figure 1.

01ce9ab0-6720-11ed-8abf-dac502259ad0.png

2 System Hardware Design

The system hardware circuit is shown in Figure 2.

2.1 STM32F103RCT6 Core Control Module

The STM32F103 is a high-performance, low-cost, low-power 32-bit microcontroller with a mainstream Cortex core and powerful software support and rich software packages. The STM32F103 has 256 KB of FLASH, 48 KB of RAM, 3 x 12-bit ADCs, 1 x 12-bit DAC, two 16-bit basic timers, two DMA controllers, three SPI, two I2C, three USART communication ports, five serial ports, one USB, and a clock frequency of up to 72 MHz. The STM32F103’s interrupt controller supports 19 external interrupt/event requests, each with status bits and independent trigger and mask settings for each interrupt/event.

01e2bac2-6720-11ed-8abf-dac502259ad0.png

2.2 OpenMV4 machine vision module

OpenMV4 is an open source, low-cost, powerful machine vision module. The machine vision algorithms on OpenMV4 include color block finding, face detection, eye tracking, edge detection, mark tracking, etc., which can be used for trespassing detection, defective product screening, tracking fixed markers, etc. The STM32F427 used by OpenMV has The USB interface is used to connect to OpenMVIDE, an integrated development environment on the PC, to assist in programming, debugging and updating firmware, etc. The TF card slot supports a large-capacity TF card, which can be used to store programs and save photos, etc.

2.3 MLX90614 Temperature Acquisition Module

The MLX90614 is an infrared non-contact thermometer with a TO-39 metal package that integrates both an infrared sensing thermopile detector chip and a dedicated integrated chip for signal processing. The thermometer is factory calibrated and includes digital PWM and SMBus output modes. The module has the advantages of small size, low cost, easy integration, high accuracy and high resolution. The circuit is shown in Figure 3. To ensure that SDA and SCL are high when the bus is idle, two pull-up resistors are used to connect to the power supply.

2.4 Ultrasonic module HC-SR04

The HC-SR04 ultrasonic distance measurement module can provide non-contact distance sensing function from 2 to 400 cm, and the distance measurement accuracy can reach 3 mm. The ultrasonic wave propagates in the air and returns immediately when it encounters an obstacle on the way, and the ultrasonic wave receiver stops timing immediately after receiving the reflected wave. According to the time difference and the speed of the ultrasonic wave can be estimated from the transmitting position to the distance of the obstacle. The principle of ultrasonic distance measurement is shown in Figure 4.

The ultrasonic transmitter circuit is shown in Figure 5. When the HC-SR04 receives a 40 kHz PWM square wave transmitted by the microcontroller, it will drive the CD4049 chip, and the inverter CD4049 outputs AC voltage to the ultrasonic transmitter under the drive of the square wave to resonate the ultrasonic sensor. When HC-SR04 receives the echo signal, it outputs the echo signal, and the pulse width of the echo signal is proportional to the distance.

3 System Software Design

A perfect software control system is the core of the smooth operation of this system. The system is based on Keil μVision5 programming environment, and the code is written in C language. The overall software design flow is shown in Figure 6.

024b899e-6720-11ed-8abf-dac502259ad0.png

3.1 Portrait detection function design

The system detects whether there is a person in the field of view through OpenMV4 portrait recognition, and if there are multiple people in the field of view at the same time, the closest person is the one who is active. This function uses the haar algorithm of OpenMV4 to achieve portrait recognition, and once a person is detected, it will frame the person and return the current coordinates to STM32F103RCT6. The feedback effect of the portrait detection function is shown in Figure 7 and Figure 8.

025fb3d8-6720-11ed-8abf-dac502259ad0.png
0274f9aa-6720-11ed-8abf-dac502259ad0.png

3.2 Human body temperature measurement function design MLX90614

The MLX90614 infrared temperature measurement module and ultrasonic distance measurement module are used to create a human body temperature measurement system [7]. Since the distance factor affects the temperature measurement accuracy of the MLX90614, in order to maximize the performance of the MLX90614 within the direct blowing range of the air conditioner, this paper compensates the corresponding temperature by measuring the distance between the human body and the air outlet of the air conditioner. The flow of the human body temperature measurement system is shown in Figure 9.

3.3 Control design of the wind flap

When the microcontroller receives the data from OpenMV4, it makes a judgment. If there is no one in the direct blowing range, the servo will keep the initial state, i.e., the air conditioning damper will be raised; if there is someone in the direct blowing range, the human body temperature measurement function will be invoked and the microcontroller will receive the human body temperature data in real time, and the rotation angle of the servo of the secondary damper will be adjusted to control the air supply in real time by combining with the human body temperature. The air damper control flow is shown in Figure 10.

4 Experimental procedure

In the field test, the test subjects were 2 young men and women. The experiment was divided into three cases: (1) no one in the direct blowing range of the air conditioner; (2) young women with normal body temperature appeared in the direct blowing range of the air conditioner; (3) young men simulating strenuous exercise appeared in the direct blowing range of the air conditioner. The overall device is shown in Figure 11

02b3acae-6720-11ed-8abf-dac502259ad0.png

The first scenario is that no one is active in the OpenMV4 field of view. At this point, the servo remains in the initial state and the air conditioning damper is continuously raised. The results of the feedback from the Scenario 1 device are shown in Figure 12.

02cb6736-6720-11ed-8abf-dac502259ad0.png

The second scenario is that there is someone in the OpenMV4 field of view and the subject’s body temperature is within the normal range. At this time, the servo drives OpenMV4 to track the portrait and frame the portrait with a white frame in real time, and the servo drives the air damper down to the air conditioning outlet. The feedback results of the Scenario 2 device are shown in Figure 13.

02e496ca-6720-11ed-8abf-dac502259ad0.png

The third scenario is when there are people in the OpenMV4 field of view and the subject’s body temperature is high, such as after strenuous exercise or in hot summer. In this scenario, the servo drives OpenMV4 to track the portrait and frame the portrait with a white frame in real time, and the servo drives the wind shield down to the air conditioning outlet. The feedback results of scenario 3 are shown in Figure 14. According to the experimental results, the design can achieve its corresponding functions well according to different scenarios. 5 Conclusion The design is based on controlling the lift of the air conditioning damper and the degree of air supply. The study of intelligent air conditioning air supply design should not only consider the current room temperature, but also the distance between people and the air conditioner. The STM32F103RCT6 is the core controller that can receive and process the data returned from each module in real time, and can effectively control the operation of each module according to the processed data [8-10].

02ffbc98-6720-11ed-8abf-dac502259ad0.png

The design has the function of automatically controlling the lift of the air damper and reasonably controlling the thinness of air supply according to the change of body temperature, integrating intelligence and personalization, and is committed to creating a safe and convenient air conditioning environment for users, bringing them a more comfortable experience while protecting their basic needs.

    GET A FREE QUOTE

    FPGA IC & FULL BOM LIST

    We'd love to

    hear from you

    Highlight multiple sections with this eye-catching call to action style.

      Contact Us

      Exhibition Bay South Squre, Fuhai Bao’an Shenzhen China

      • Sales@ebics.com
      • +86.755.27389663