Infrared detection of human motion based on Dragonboard 410c
Infrared monitoring is a kind of sensor commonly used in security design. It can quickly detect moving objects. Many infrared camera motion detection switches are integrated on many cameras, which can quickly start the camera when there is a moving object. Observing and taking pictures, so that it can effectively avoid the waste of power and affect the service life of the camera in long-term work. This section of the blog will be based on the DragonBoard410c development board to detect the movement of the human body through the infrared motion detection sensor. The specific design is as follows: :
First, the preparation of hardware equipmentThe hardware equipment to be prepared here first includes a Dragonboard 410c development board, power supply for the development board, breadboard and Duban line, as shown in Figure 1:
Figure 1 DragonBoard 410c development board and related kits
The Dragonboard 410c development board is a development kit for Maker Group launched by Qualcomm. It is small in size but very powerful. The specific materials and related learning content can be described in detail at http://qualcomm.csdn.NET/.
Then, you need to prepare an infrared sensor module. This article uses the commonly used HC-SR501 infrared module, as shown in Figure 2 below. The technical parameters of the module are as follows:
1) Working voltage: DC5V to 20V
2) Static power consumption: 65 microamps
3) Level output: high 3.3V, low 0V
4) Delay time: adjustable (0.3 seconds to 18 seconds)
5) Blocking time: 0.2 seconds
6) Trigger mode: L can not be repeated, H can be repeated, the default value is H
7) Sensing range: less than 120 degrees cone angle, within 7 meters
8) Working temperature: -15~+70 degrees
9) PCB Dimensions: 32*24mm, screw hole distance 28mm, screw hole 2mm, induction lens size: (diameter): 23mm (default)
Figure 2 HC-SR501 human body infrared sensor module
The above is the hardware used, the preparation of the development software tools can refer to the Linux system based on the implementation of the DragonBoard 410c GPIO control software and hardware environment construction process, because we finally need to complete the control of the infrared sensor switch mainly through the GPIO Control to achieve.
Second, the establishment of the software environmentIn the process of designing the program, the Linux operating system is used. The installation and environment of the Dragonboard 410c development board linux system refer to the resources and tools on https://developer.qualcomm.com/hardware/dragonboard-410c/tools. The linux image and manual are installed according to the manual, and the linux environment is built.
After the completion of the linux environment, you need to install a QT library in the Linux environment. The library can refer to the blog QT+Opencv particle filter algorithm to achieve video target tracking. (3) QT environment installation and configuration, this library is mainly for Subsequent design and development of infrared human sensor modules provide corresponding display functions. The above is the construction of the software environment throughout the development process.
Third, the hardware connectionAfter the hardware is ready, our hardware modules are connected using the DuPont line, as shown in Figure 3 below. Here, the connection process needs attention. The power supply directly supplies power from the 5v power supply provided by the Dragoboard 410c development board to the infrared sensor module. After the connection is completed, if you have a multimeter in your hand, it is best to measure it first to see if there is a short circuit. In the process of I/O port connection, the output I/O port of the infrared module cannot be directly connected to the Dragoboard410c development board. The I/O voltage of the development board should be 1.8v, and the output voltage of the infrared module is 3.3. v, direct connection will cause the system to work without problems, the I / O port is burned out.
Figure 3 Hardware connection diagram
Fourth, software designAfter the hardware connection is completed, the software design can be carried out. In the software design, QT is mainly used as the interface, and then the system function is called to access and control the related GPIO port to monitor and read the level change of the output of the infrared sensing module. The output is monitored. The specific software design is the same as the GPIO program design based on the Linux system implementation of DragonBoard 410c GPIO control. It only adds QT to the upper layer for processing, and controls the GPIO access through a timer in the QT environment. The frequency, then the results obtained will be displayed on the interface, the core program is designed as follows:
Int get_Infrared _status(int Key){
Int tmp=1;
Int TIme=0;
Write_GPIO(Infrared_stat, 1) ;
Do{
Delay_ms(10);
If(Read_GPIO(infrared_stat, &tmp)==0){
TIme++;
}
Else return -1;
If(TIme>=100){
Break; // The level of the output is maintained for more than 1s , indicating that the human body is detected and the detection is exited.
}
}while(!tmp)
If(TIme>=50){ //The output level is greater than 0.5s and it is considered that there is human body entering, not interference.
Return 1;
}
Else return 0;
}
Five, testingAfter the software design is completed, use the qmake tool to cross-compile. The compiled file is downloaded to the Dragoboard 410c development board with linux installed, and the HDMI output of the development board is connected to the display. After running, it can be moved by hand on the sensor. See that the LED lights are on and off.
In summary, this article describes how to implement infrared sensor monitoring through the Dragobard 410c development board. Later, you can also combine the previous blog about using Dragobard and the camera to implement frame measurement, and realize an image based on the trigger method by using the infrared sensor to wake up the camera. And monitoring functions.
Efficient Lifting Column,Telescopic Lifting Columns,Desk Lifting Mechanism,Mobile Column Lifts
Kunshan Zeitech Mechanical & Electrical Technology Co., Ltd , https://www.zheteswitches.com