loading

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 :

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.

Then, download and install the libraries Bounce2 for the door switch sensors and RF24 for the RF24 communication modules.

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 !

<p>This is great for open windows in winter!</p>

About This Instructable

2,148views

48favorites

License:

Bio: MAKE - LEARN - SHARE
More by Uzful_Lab:Universal sound reactive lights for drums / guitar Opened Window Detector Toothbrush head holder 
Add instructable to: