Introduction: Opened Window Detector
This Instructable is about creating an opened window detector. I did for the two windows in my office, but you can easily adapt it for more or less windows, doors, traps...
You will need :
- 3 arduino uno
- 2 door switch sensors
- 3 RF24 modules
- 2 leds
- some jumpers
- wood for laser cutting
- access to a 3D printer and a laser cutter
Some knowledge in arduino programming is recommended, even if I tried to keep it as simple as I could :)
Step 1: Wiring Sensors and Station
First, take some jumpers, the arduinos, RF24 modules, door switches and the two leds.
Follow these two schemes to assembly the sensors for your window and the receiving station.
Note that the RF24 modules are powered with 3.3V only, so it will not work with all arduinos.
Step 2: Inject Code to Arduinos
Now that your arduinos are wired with all the sensors and modules, it's time to add code in it.
To do so, you'll have to download the arduino IDE and install few libraries. For those who don't know how to had libraries, there is a really clear guide on Arduino's official website, that explains everything about it.
The RF24 library is really poorly documented, I recommend this great tutorial to start playing with it and understand its basic usage.
To test the door switch sensors, I recommend using the "bounce" example. Then, you can for example alter it to light a led when the sensor is open.
The code for this project is available on github : https://github.com/UzfulLab/opened-window-detector
Feel free to use it or fork it to create your own :)
Step 3: Create Boxes
Now that our hardware and our software are up and running, we need to protect them inside little cases.
I used this 3D model for the sensors. It's a simple arduino case.
For the receiving station, I needed something more customizable, so I created plans for laser cutting.
You can download the laser cutting plans from the github repository.
Now just put your hardware inside the cases and you are good to go !
We have a be nice policy.
Please be positive and constructive.