DIY Presence Detection Sensor: Never Miss a Thing!
Table of Contents
- Introduction
- The Acara FP1 Millimeter Wave Sensor
- Difficulty in Access and Cost
- Building a DIY Millimeter Wave Sensor
- Discovering the DF Robot Sensor
- Arduino Compatibility and Code
- Basic Operation and Output
- Connecting the Sensor to Home Assistant
- Exploring ESB Home Integration
- Pin Configurations and Wiring
- Uploading the ESP Home Code
- Configuring Detection Distance and Latency
- Testing and Performance
- Detection Speed and Motion Sensitivity
- Detection of Non-Human Movement
- Comparisons to the Acara FP1 Sensor
- Limitations: Direction and False Positives
- Price Comparison and DIY Potential
- Total Cost and Availability
- Possibilities for Automation
Article
Introduction
In the world of smart homes, the Acara FP1 millimeter wave sensor has been hailed as a game changer. This sensor is capable of accurately detecting the presence of humans, even when there is no movement. However, there are two major challenges with this sensor – its limited availability due to supply shortages and its high cost. In this article, we will explore the possibility of building our own millimeter wave sensor that can deliver similar results at a more affordable price.
The Acara FP1 Millimeter Wave Sensor
The Acara FP1 millimeter wave sensor has garnered significant Attention in the smart home industry. Its ability to detect humans without relying on movement has made it highly desirable. However, the sensor's availability is scarce, and its high price tag makes it inaccessible for many users.
Difficulty in Access and Cost
To get your hands on an Acara FP1 millimeter wave sensor is no easy task. The Current supply shortages have made it incredibly challenging to find one. Additionally, the sensor's price is relatively high, further inhibiting its accessibility. These factors prompted me to explore alternative options for a millimeter wave sensor that could provide similar capabilities at a lower cost.
Building a DIY Millimeter Wave Sensor
During my research for a DIY millimeter wave sensor, I stumbled upon the DF Robot sensor. Working on the 24 gigahertz spectrum, this sensor not only provides a quoted range of nine meters (four meters more than the Acara FP1) but also offers a straightforward connection Diagram for Arduino. The sensor's wiki page provided comprehensive documentation, including sample code, making it an attractive option to explore.
Arduino Compatibility and Code
Upon examining the code provided on the DF Robot wiki page, I was pleased to discover its simplicity. Working with this sensor seemed incredibly straightforward, which was a significant AdVantage. The sensor operates on the UART communication protocol and outputs a text STRING indicating the presence or absence of a human. The sensor also has two I/O pins that can signal movement detection, providing two different ways to Interact with the sensor.
Basic Operation and Output
To test the sensor's functionality, I connected it to a Wemos D1 Mini, which has a native 5-volt output - a suitable match for the millimeter wave sensor's power requirements of 3.6 to 5 volts. Once the code from the DF Robot wiki page was uploaded onto the Wemos, I opened the serial monitor to observe the sensor's output. True to its simplicity, the sensor output a 0 for no presence detected and a 1 for presence detected. This basic operation provided valuable Insight into the sensor's functionality and how to interface with it.
Connecting the Sensor to Home Assistant
Next, I turned my attention to integrating the millimeter wave sensor with Home Assistant, my preferred smart home automation platform. Typically, I utilize MQTT for connectivity due to its universal compatibility and ease of implementation. However, before diving into MQTT integration, I decided to search for any existing implementations of the DF Robot sensor with ESP Home, a popular smart home framework native to Home Assistant.
Exploring ESP Home Integration
To my delight, I discovered a thread on the Home Assistant forum by user CR Logic, who had already successfully integrated the exact same sensor I was using. CR Logic had generously shared detailed information and code in the thread, which proved immensely helpful. Although CR Logic used an ESP32 for their setup, I chose to stick with my ESP8266 and adapted their instructions accordingly.
Pin Configurations and Wiring
To set up the sensor with the ESP8266, I first had to determine the pinout configuration. By referring to the datasheet and considering the sensor's requirements, I identified the three essential pins: VCC, ground, and IO2. Wiring only IO2 would result in a binary sensor in Home Assistant that detects presence effectively. However, to adjust the cooldown period and detection distance, which ESP Home allows, I needed to connect the RX and TX pins as well.
The RX and TX pins on the sensor can be wired to various GPIO pins on the Wemos, but IO2 specifically requires GPIO16 (or D0) because of its need for a pull-down resistor. As space was a consideration, I chose to stack the sensor on top of the Wemos, soldering header pins for VCC, ground, RX, and TX accordingly. This configuration allowed for easy stacking and supported the weight of the sensor.
Uploading the ESP Home Code
With the physical connections complete, I connected the Wemos to my laptop to upload the ESP Home code. If You are unfamiliar with installing and configuring ESP Home, I recommend referring to a comprehensive guide. To save time, I pasted the code provided by CR Logic, modifying it slightly to accommodate the pinout changes for the Wemos D1 Mini. After saving the code and installing it onto the Wemos, I monitored the log output to verify successful execution.
Configuring Detection Distance and Latency
Upon successful installation, it was time to configure the millimeter wave sensor in Home Assistant. Navigating to the device's settings in the ESP Home Integration, I accessed the entity's parameters. Here, I found options to adjust the detection distance and latency.
The detection distance option allows users to configure how far the sensor should detect movement. Based on my experience, I recommend a maximum of nine meters to avoid false activations. Additionally, the latency option controls the cooldown time between detection and the transition from "detected" to "not detected" states. It is essential to strike the right balance to prevent the sensor from continuously flipping between states.
Testing and Performance
With the setup complete, I proceeded to test the sensor's performance. One of the sensor's remarkable features was its rapid detection speed, surpassing the three to five seconds delay of the Acara FP1. The DF Robot sensor's ability to detect even slight motion was impressive. I could slide a couple of fingers into a room, and the sensor would promptly pick up the movement. As the name suggests, the millimeter wave technology underlying the sensor's operation is truly remarkable.
Detection Speed and Motion Sensitivity
Compared to a traditional motion sensor, the DF Robot sensor proved to be just as quick in detecting movement. The difference in detection speed between the two sensors may not be significant. As a result, I would recommend pairing the millimeter wave sensor with a regular PIR motion sensor for turning on lights, utilizing the millimeter wave sensor primarily for turning lights off. However, for DIY enthusiasts, combining both sensors within a single unit is entirely feasible and has been explored by CR Logic in their research.
Detection of Non-Human Movement
It is essential to note that the millimeter wave sensor detects all forms of movement, not just human presence. The sensor picks up movements such as a spinning fan, moving blinds or curtains, or even the opening of a door. Pet movement is also detectable, addressing a common question that arose in response to my previous video on the Acara FP1 sensor. Furthermore, the sensor's ability to detect small movements is evident, enabling precise and extended presence detection in scenarios where a regular motion sensor would fall short.
Comparisons to the Acara FP1 Sensor
While the DF Robot sensor showcased impressive detection capabilities, it does have limitations compared to the Acara FP1. One of the notable differences is that the DF Robot sensor cannot detect the direction of movement. Unlike the Acara FP1 sensor, which distinguishes whether someone is approaching, walking away, or moving left or right, the DF Robot sensor can only detect motion's presence. However, this limitation can be offset by strategically adjusting the detection distance to trigger lights just before entering a room, enhancing both detection and response speed.
Limitations: Direction and False Positives
Despite its strengths, the DF Robot sensor has a few limitations worth considering. As Mentioned, the sensor cannot detect the direction of movement, which may not be critical for some users. Additionally, I observed instances where the sensor, placed in a bedroom, turned off when I held my breath or made slight breathing motions while sleeping. This behavior did not occur with the Acara FP1 sensor, leading me to believe there may be variations in sensitivity or positioning optimization required for the DF Robot sensor.
Price Comparison and DIY Potential
One of the significant advantages of building a DIY millimeter wave sensor is the potential for cost savings. The total cost of this DIY sensor setup, including the sensor itself and the Wemos board, was around 35 pounds. Considering the availability issues and higher cost of the Acara FP1, the DF Robot sensor offers an accessible alternative within a reasonable budget. It is essential to note, however, that the cost may vary depending on individual access to tools, such as a 3D printer and soldering iron.
Furthermore, the DF Robot sensor opens up exciting possibilities for DIY projects. For instance, it could be used as a presence sensor under a bed instead of conventional load cell solutions, facilitating unique automations. Additionally, CR Logic has been actively researching other applications and combinations of sensors within the same unit. This versatility makes the millimeter wave sensor a compelling choice for creative automation solutions.
Highlights
- The Acara FP1 millimeter wave sensor is a game changer for smart homes.
- Accessibility and cost are major challenges with the Acara FP1 sensor.
- Building a DIY millimeter wave sensor using the DF Robot sensor is a viable and affordable alternative.
- The DF Robot sensor is compatible with Arduino and has a simple connection diagram.
- Integrating the sensor with Home Assistant using ESP Home provides seamless automation capabilities.
- The sensor demonstrates impressive detection speed and sensitivity, surpassing traditional motion sensors.
- The DF Robot sensor's ability to detect non-human movement offers unique automation possibilities.
- While the DF Robot sensor lacks direction detection, its position optimization can enhance detection and response speed.
- The DF Robot sensor offers cost savings compared to the Acara FP1 sensor.
- The DIY potential of the DF Robot sensor allows for creative automations and innovative project ideas.
FAQ
- Can the millimeter wave sensor detect human presence without movement?
- Yes, the millimeter wave sensor is capable of detecting human presence even without movement.
- Is the DF Robot sensor as reliable as the Acara FP1 sensor?
- The DF Robot sensor provides similar results in terms of detection but lacks some advanced features of the Acara FP1, such as direction detection.
- Can the millimeter wave sensor detect the presence of pets or other objects?
- Yes, the millimeter wave sensor can detect the movement of any object within its range, including pets.
- What is the cost of building a DIY millimeter wave sensor?
- The total cost of building a DIY millimeter wave sensor using the DF Robot sensor and a Wemos board is approximately 35 pounds.