Introduction: Low Power Door/window Sensor
In this manual we will show how to create cheap, secure door/window sensor network. We could monitor our door/windows status from desktop computer or mobile phone in web browser. Properly configured sensor could work between 5 and 10 years on 2 AA batteries. Power consumption of this sensor is so low that I'm using wasted batteries from electronic toys and sensor still work. You can use up to 254 sensors per one server.
See more tutorials at http://iot-playground.com/build
Step 1: Materials
EasyIoT server:
Raspberry Pi
NRF24L01+ module
USB power supply
Sensor node (up to 254 sensors per one server)
Arduino Pro Mini (Hacked for low power consumption)
NRF24L01+ module
1M resistor
AA battery holder
Magnetic door/window reed switch
Step 2: EasyIoT Server
Connect Raspberry Pi and NRF24L01 transceiver.
Download EasyIoT server image and copy it to SD card. EasyIoT server download. Windows users can write EasyIoT server image to SD card with Win32 Disk Imager.
Step 3: Door/window Sensor
Connect Arduino Pro Mini NRF24L01+, batteries and reed relay. For extra low power consumption follow Arduino low power.
After connection all wires program arduino with this sketch. Make sure that NRF24L01 channel and speed is the same as later used in EasyIoT server (see MyConfig.h file for settings).
Step 4: Configure
Power on Raspberry Pi and go in Web browser on computer (Raspberry Pi and computer must be on the same network). In browser type Raspberry Pi IP address. When asked for username and password use: admin and test.
In Web browser go to Configure->Drivers->MySensors->MySensors Driver and then Add Node. Now you power on your new sensor. If you are successful you should see new sensor address (no timeout message). After that create new group Configure->Groups and Modules->Add Group. Add new group and go in newly created group. Now add new sensor. After that you should see new sensor in main page. You can add up to 254 sensors.
Step 5: Mount Sensor
Place sensor to door or window.
Step 6: Monitor
Monitor door/window status from everywhere. If you enabled logging database you can also see door/window status history.

Participated in the
First Time Author Challenge
32 Comments
5 years ago
Can I use attiny85?
5 years ago
Can i use pir sensor on low power arduino?
5 years ago
Great project!
I was wondering... if the NRF24L01 has "Arduino capabilities", why do you still have to use the Arduino Pro Mini?
5 years ago
Very cool your project, does not work on RaspBerry Pi3?
Cesario
5 years ago
Very cool your project, does not work on RaspBerry Pi3?
Cesario
5 years ago
That's a great tut, by the way, how do you add a new sensor? and how do
you identify it? I'd like to try adding a few sensors around the house.
thanx!
Reply 5 years ago
hi, here you have more tutorials:
http://iot-playground.com/build
5 years ago
Hi! great tut! Could you clarify "Properly configured sensor could work between 5 and 10 years on 2 AA batteries." ?
Reply 5 years ago
and this:
http://iot-playground.com/blog/2-uncategorised/9-arduino-low-power-sensor
Reply 5 years ago
thanks for the info. so you:
1. removed the regulator of the Arduino Pro Mini
2. removed the power LED
3. reduced the internal oscillator frequency from 8 to 1MHz to operate at 1.8V
This way you reduced power consumption (Arduino) from 4.8mA to 6uA, resulting 10 years from 2 AA batteries.
I also noticed (from the door_window_sensor.ino) that you are using interrupts to wake the arduino on event (reed switch opened = door opened), otherwise the arduino is sleeping.
So the 10 years life can also be affected by how many door openings happens in between.
anyway, nice tricks!
Reply 5 years ago
yes, look at this link:
http://iot-playground.com/blog/2-uncategorised/10-low-power-door-window-sensor
6 years ago
Hey, I did this project but for some reason I cant get the EasyIoT to recognized my sensor. When I switch on device I cant get anything an it timeout. I dont know how to troubleshoot this. Thanks
6 years ago
Thanks for the great idea. You brought me to the MySensors library, which I use with OpenHAB. But the battery consumption is in my case horrible. I removed the power led, but I left the power regulator active. After that I measured 400 Micro Ampere in power down mode, what seems quite good for the effort. After filling the sensor with two new AA cells it showed me 100% battery capacity. After only one day I see 97% ?!
My 3,3 V Arduino Pro Mini from China seems to work stable only until the battery voltage reachs 2,7V. If it drops below this line, it seems not to be work reliably. Power is connected to VCC (not RAW). How can you use drained batteries? I would need al least 3 drained AA cells to stay over 2,7V.
7 years ago on Introduction
Very nicely done! This looks extremely useful for parents of teenagers.
Reply 7 years ago on Introduction
Thx. Basically I've done this project because I always forgot if I closed all windows or not. Now I can check from remote locations. But be careful: if you fix sensors to door/window poorly then it can fell of and it will show status open. This happened to me once. You can also upgrade sensor functionality to trigger alarms. I will write post about this on my web site http://iot-playground.com/.
Reply 6 years ago
I have done this project and its great, thank you
I have also added the beeping when door/window close/open,
only one bug I guess, when the sensor is disconnected (like dead battery), the server show it as CLOSED, which is sometime missleading. is there a work-around to change the default status ?
6 years ago
i did the project with the arduino as-is without the low power edition, the battery barely last a week and starts nit working, specially that i have added a buzzer to make a sound on the sensor
6 years ago
This is exactly what I'm looking for. I started down the road with Z-Wave, but really like the idea of building them myself. The only thing I don't see anywhere is what case you used to house the entire project in.
6 years ago
thanks for the great project
I was wondering if it is possible to use a desktop for the server. Both hardware-wise: is there a nRF24L01 that goes on a desktop with Linux installed? And software wise: is there a version of this IoT that works on a desktop?
Thanks
6 years ago
Is there any way for the Raspberry pi to process a audio file over speakers in your house when a window/door is opened?