Detecting the presence of human beings is a critical function required for several applications in the modern world. And the human presence sensor is at the heart of this function. So if you have a project requiring human detection, we have covered this topic in detail below to help you get started. Take a look!
What is Human Presence Detection?
Human presence detection defines a range of methods and technologies that can sense and detect the presence of a human body in an area of interest. It could also mean software or hardware technologies for detecting people to verify or authenticate them to access smartphones, computers, etc.
A vector illustration showing how a human detection sensor controls lights and AC
Unlike human sensing, human presence detection primarily helps with security or safety by identifying the human. The software versions include technologies like CAPTCHA and reCAPTCHA.
But hardware technologies for human presence sensors include the following.
- Radar technology
- Security switch
- Image recognition
- Fingerprint sensors
- Acoustic sensors
- Infrared motion sensors
- Vibration sensors
A simulation of body temperature checking using an IR sensor
Why You Need Human Presence Detection
Detecting human presence has several applications and benefits. We will highlight two examples to show how you can use the technology.
Dell built an ExpressSign-In feature into the Latitude 7200 model based on Context Sensing Technology from Intel. Combined with Windows Hello and an infrared sensor, the technology gave users instant, touch-free logins into the laptop when on standby mode.
And this tech will keep the laptop awake as long as it detects your presence. But it will lock the device after a preset time when you walk away. It is vital to note that the human presence context sensor only senses if there's someone there. It can't tell who is there. This task falls on the Window Hello infrared camera.
This technology gives a high level of security if you work in an office or a public setting. Additionally, it offers convenience and might conserve battery life by locking the laptop quickly to enter hibernation mode.
Radar sensors installed in the home can sense multiple activity states, such as action during sleep or rest. So it can detect a human sleeping to turn off the lights to increase energy efficiency. Also, it can close the curtains and turn off the AC after sensing deep sleep. These units often have light sensors to detect changes in indoor lighting.
A radar sensor for a vehicle
On the security aspect, you can use the same microwave radar technology to detect intrusion, then send an alarm and record the event.
Configuring the AK9753 Human Presence Sensor with Arduino
Infrared motion sensors can detect human movements and the presence of any other infrared object. We will use the AK9753 human presence sensor in this project. It features four infrared sensors and an integrated circuit for characteristic compensation, so you can use it to detect an IR object's motion and the relative position of its movement.
An infrared motion sensor is mounted on the ceiling.
Also, it has an integrated analog-to-digital converter that provides 16 bits of digital data output to the I2C bus. Other features include the following.
- Low power (current) consumption
- Interrupt function
- Integrated temperature sensor
|Operating Voltage||3.3V or 5V|
|I2C Address||0x64 (default), 0x65 & 0x67 (both configurable)|
|Spectral Sensitivity||5-7 μm (5V)|
|Human Presence Detection Range||3 meters max (at 5V)|
|Power Consumption||10 μA (typ.), 100 μA (max) (5V)|
|IR Control Output Resolution||16 bit|
|Operating Temperature||-30°C to 85°C|
|Temperature Measurement Range||-10°C to 60°C|
|SCL||I2C serial clock||In|
|SDA||I2C serial data||In|
|VCC||Power supply pin (you can use 3.3V or 5V)||In|
|GND||Connects the module to the system ground||In|
|INT||The interrupt pin goes high when data is ready, then pulls low after the data gets read||Out|
You can use addresses 0 and 1 to alter the board's I2C address if several devices use the same address. Here's how you can change these addresses based on the different opened and closed jumper combinations.
|Address 0||Address 1||I2C Address|
If you don't want to use I2C, use the switch mode.
What You Need
- Seeeduino V4.2
- Base Shield
- AK9753 human presence sensor
Connect the AK9753 sensor to the I2C port of the base shield. Next, plug the base shield into the Seeeduino board, then plug in the Seeeduino MCU to your computer using a USB cable.
If you don't have a base shield, you can connect the sensor to Seeeduino directly using cables, as shown below.
|3.3V or 5V||VCC||Red|
Fiber Optic Cable Assembly: Coding
Download the Grove - human presence sensor library and install it into Arduino. You will find four demos, the first one being for the sensor. This demo has the following example projects.
- Basic Readings: This code reads the raw data from the four sensors in the module, then displays them in serial
- PlotDiff: This one reads raw data and then plots the readings in a serial plotter
- Detect Presence: As the name suggests, this code detects the presence of an IR object.
- Plot Movement: This code detects motion and then plots it in the serial plotter
Choose the demo code you want, then upload it to Seeeduino.
An infrared motion sensor
Fiber Optic Cable Assembly: Basic Readings Output
Open the serial monitor and set the baud rate to 9600. You will get results in an array format showing measurements from the four sensors. These values will range from -32767 to 32767 and reflect the detected IR light intensity. A high value means more intense IR light.
Since there is a built-in temperature sensor, the readings will include heat measurements. The last part is the millisecond (ms), which shows the elapsed time (response time) since the program started.
Fiber Optic Cable Assembly: PlotDiff Output
Instead of displaying the sensor output as raw data, this code converts the readings to current. After that, it plots the difference between IR sensors 1 & 3 as a blue line (IR1-IR3). Also, it draws a red line to show the difference between IR2 and IR4 (IR2-IR4). Remember to set the baud rate to 9600.
A project with a PIR sensor to test motion detection
Detect Presence Output
This program uses the derivative of the sensor value for detection. If this derivative exceeds the threshold, an IR object is within the sensor's range. The output shows the readings of all four sensors, with an O meaning no detection and an X meaning IR object detected. Consider the following result.
X O O O
It means the first sensor detected an object, but the other three did not.
Fiber Optic Cable Assembly: Plot Movement Output
This code uses the derivative of the difference value between IR1 and IR3 or IR2 and IR4. It displays four color-coded curves that mean the following.
- Blue curve: Difference between IR1 and IR3
- Green line: Difference between IR2 and IR4
- Red line: Movement in the direction 1-3 (a derivative of IR1 and IR3). A positive pulse means movement from 1 to 3, while a negative one implies movement from 3 to 1.
- Orange line: Movement in the direction 2-4 (a derivative of IR2 and IR4). A positive pulse means movement from 2 to 4, while a negative one implies movement from 4 to 2.
A motion detector sensor for a security system
In conclusion, human presence sensors are critical devices for security applications, conserving energy in buildings, etc. And you can group them with other sensing units to create a smart sensor package to secure homes and devices. That's it for this article. Contact us if you have any questions or need further assistance.