Why Make Microwave Radar Motion Sensors?

Unlike infrared motion sensors, a microwave radar-based motion sensor can detect motion through a solid concrete wall and so can be installed in invisible locations, such as behind a wall or false ceiling. The footprint is also lower when compared to infrared motion sensors.

Motion sensors can also help you save energy by automating light switches. You can integrate the sensor with a home automation server, such as Home Assistant, to trigger other smart home devices, lights, switches, etc. installed in your home or office. You may also enable notifications that you can receive on your smartphone or via an Echo Dot (Alexa).

There are many ways to use motion sensors. Also, you can get started with home automation by deploying a Home Assistant server on a Raspberry Pi.

Things You Will Need

To build a DIY microwave radar-based motion-sensing light switch, you will need the following:

RCWL-516 microwave radar sensor ESP-01 module USB-to-Serial adapter 5V micro-USB power supply micro-USB module 3D printed case Soldering iron, tin, and a few thin wires

Flash the Tasmota Firmware

Connect the ESP-01 module to the USB-to-Serial adapter and connect it to your Windows PC. Then follow these steps to download and flash the Sonoff-Tasmota firmware that will be used to build this motion sensor and integrate it with your Home Assistant home automation system.

Download the tasmota-sensors. bin firmware file and the Tasmotizer tool. Run the Tasmotizer tool, click Refresh, then select the COM port where the ESP-01 USB-to-Serial adapter is connected. Click Open and select the downloaded tasmota-sensors. bin firmware file. Click Tasmotize and wait for the flash process to complete. Once completed, click the Send config button and enable the Wi-Fi option. Type the Wi-Fi SSID (name) and the password. You must enter the 2. 4GHz Wi-Fi details as 5GHz is not supported. Click Save. Click Get IP and note down the IP address displayed. Open this IP address in a web browser. This will open the Tasmota Web UI.

Configure the Motion Sensor

Once the Tasmota Web UI is opened in the web browser, follow these steps to configure the motion sensor.

Click Configuration > Configure Module and select Generic (0) from the drop-down. Click Save. The page will automatically reload in a few seconds. Click Configuration > Configure Module and select D4 GPIO2 > Switch_n > 1. Click Save. The page will reload. Click Console and then paste the following commands in the Command field and press the Enter key. Run one command at a time. SwitchMode1 1SwitchTopic 0Rule1 on Switch1#state=1 do publish stat/%topic%/motion ON endon on Switch1#state=0 do Publish stat/%topic%/motion OFF endonRule1 1 This will configure the microwave radar motion sensor MQTT topic that will send an ON/OFF status to the %topic%. You can find this under Configuration > Configure MQTT.

Solder and Assemble the Components

Use a soldering iron and wires to connect the ESP-01 module to the RCWL-0516 microwave radar sensor module and the micro-USB module as shown in the diagram below.

Since the radar sensor has a built-in 3.3V regulator, we don’t need to use the AMS1117-3.3V regulator.

You can print this mini enclosure on Thinigiverse on your 3D printer and then assemble the components as shown in the image below.

You may use hot glue to stick the radar sensor to the case’s lid cover, or you can stack the boards over each other and close the lid cover.

Integrate the Sensor Into Home Automation Software

Once everything is connected and enclosed, connect the 5V micro-USB power supply. You can load the Tasmota web UI on the IP address and check the console for the output. If motion is detected, the output will display the status.

At this stage, you can add this microwave radar-based motion sensor to your home automation software, such as Home Assistant, by following these steps.

In the Tasmota web UI, go to Configuration > Configure MQTT. Type the Home Assistant MQTT host IP, username, and password. Click Save. The page will reload. Go to Configuration > Configure Other, enter a friendly name, such as MotionSensor, and click Save.

Home Assistant Setup

Now log in to Home Assistant and follow these steps:

Go to Configuration > Devices & Services and click +Add Integration. Search for and select the Tasmota integration. If already added, you can view the motion sensor under Tasmota devices on the Devices & Services page. Once added, restart Home Assistant and then go to Configuration > Devices & Services. Click on MotionSensor in the Tasmota device list and then click the + icon under Automations. Create an automation to trigger a smart device or entity when motion is detected by this sensor. Save it.

Now whenever motion is detected, the automation will run and trigger the devices, entity, scene, or event you have set up. For instance, you can install this motion sensor beside your CCTV camera to trigger recording or capture images when motion is detected. You can build a $10 wireless IP security camera for your home for this purpose or purchase one from the market.

You can also use these sensors on a staircase or open areas to switch smart lights on during the night when motion is detected. The possibilities are endless.

Use Radar Motion Sensors to Avoid False Positives

Motion sensors are one of the key components of a smart home or security system. They help detect motion and presence, based upon which you can set up an automation in Home Assistant or other software to trigger an alarm, a smart switch to turn on/off lights, capture pictures or record video, and send notifications on your smartphone. They can also be used in combination with existing sensors to confirm human presence or motion and avoid false positives.