Presence detection using IR+mmWave

I wanted a sensor in the bathroom that i can use to turn on the lights when someone enters the room and turn them off after a minute without movement. Simple enough, but IR motion doesn’t work well in this case, because it is unable to detect a person behind the shower curtain. Also, the shape of my bathroom makes it very difficult to reliably detect movement with a single IR sensor.

I tried a mmWave sensor. it can detect a person behind a shower curtain without any problems, it even detects through walls! It works very well at detecting the tiniest of movement. It detect presence even if you are standing still just from breathing alone. However, as i found out, the time it takes to initially detect movement is not always reliable. Sometime, i would walk halfway across the bathroom before the light would turn on. This is a problem a IR sensor does not have since it responds very quickly to movements.

Then i stumbled on a video where he talks about combining the two types of sensor and decided to try it. As he said himself, this is the holy grail of sensors, boy was he right. It’s amazing!

Basically, the IR sensor is used to turn on the lights only and the lights are turned off once the mmWave sensor no longer detect movements.

I decided to build my own board. but instead of having both sensors pointing in the same direction, i mounted the IR sensor sideways on the PCB so that it is pointing down. That way, i can install the sensor above the door and this allows it to turn on the lights as soon as i enter the bathroom.


I posted the design files on GitHub in case somebody is interested building it. All the components can be found on Mouser except the mmWave sensor SEN0395 from DFRobot. Right now, it’s out of stock but expecting a shipment in September.

Features:

  • For ESPHome (esp32-c3)
  • SEN0395 mmWave sensor
  • IR motion sensor
  • SHT45 temperature/humidity sensor
  • USB-C connector
  • Option to mount the IR sensor facing front or downward.

6 Likes

Shut up and take my money!

I was not planning releasing it as a standalone product. But if there is enough interest, i was thinking to selling it as a kit. Just the PCB with the basic components pre-assembled (ESP32, temp/humidity sensor and other smt components) so that all there is left to do is to solder the IR and mmWave sensor.

There are two ways you can mount the IR sensor on the PCB. Either facing front or downward, depending on where the sensor will be installed.

It is still early in development.

Problem is obtaining those mmWave components.

It’s very difficult right now, i won’t deny that.

At the time of writing, this is the stock status at Mouser

25: In stock
391 : Expected 12-Sep-22
101 : Expected 03-Oct-22

The stock is slowly bouncing back. If you look at the stock history on OctoPart, they were clearly caught off guard by the sudden popularity, but they might be able to adjust to the demand, time will tell. At least, they don’t seem to suffer from the year long lead time because to the chip shortage.

In stock, 2 left: Dfrobot Strong Anti-interference Mmwave Radar Sensor Fmcw Cw Multi Mode For Human Presence Stillness Motion Perception Detection - Pc Hardware Cables & Adapters - AliExpress

Is there a specific reason why you designed your PCB/Enclosure this way? From my point of perspective it looks like that the PIR points downwards when mounted to a vertical wall. I’m wondering why you designed it that way. Anyhow from the data sheet I can see that the Panasonic-Sensor you’re using has a detection range 45° in every direction is it ?