loading

If you are anything like me, you look forward to the mailbox arriving like a kid nervously waiting for his presents on Christmas Eve. Since the time my mailbox arrives is not always consistent, I checked my mail multiple times a day. To solve this problem, I created a wireless sensor that tells you whether there is mail in the comfort of your own home.

Here's how it works:

The transmitter will sit under the mailbox and when the door is opened it will send a signal to the receiver telling it the door has opened ( indicating that the mailman has put the mail in). The receiver will then light up a LED indicating that the door has been opened and that's it!

Step 1: Parts and Tools


Mailbox Detection Sensor:

- Arduino with 3.3v output

- nRF24L01+ Wireless Transceiver $6 (for two at Amazon)

- Breadboard and Cables

- Reed Switch $1.50 Sparkfun

- Magnet $1 Sparkfun

- Power Supplies ( I used 4 AA)

- Tape, Velcro or double side sticky tape to mount receiver

Receiver

- Arduino with 3.3v output

- nRF24L01+ Wireless Transceiver

- LED

- 330ohm resistor

- Power Supplies ( I used 6 AA)

Step 2: Hooking Up the Arduino to the Wireless Module

First, we have to get the Arduinos to talk to each other. Start by hooking one nRF24L01 module to EACH arduino following the image above. Make sure you hook up VCC to 3.3v on the Arduino and not the 5v pin or else the module might burn up!

Once you have made the connection, we will then hook up the indicator LED and the door sensor!

Step 3: Wiring the Door Sensor and Indicator LED

Transmitter:

We will detect when the mailbox door is opened by using a reed switch and a neodymium magnet. A reed switch is an electrical switch operated by an applied magnetic field. This switch is normal open when there is no connection and closes to make an electrical connection when a magnetic field is applied.

In our application, when the magnet gets close to the reed switch by the mailbox door opening, it will create a connection between pin four and ground. This will tell the Arduino that the door has been opened.

On one Arduino connect one side of the reed switch to GND the other side to pin 4. This will be your transmitter.

Receiver:

Now we will hook up the indicator light on the receiver. On the other Arduino (not the one you just connected the reed switch to), connect pin 4 to a the 330ohm resistor to the positive lead on the led(the longer one) and then the remaining pin of the led to ground like the diagram above.

This will be the LED that lights up when mail has been received.

Now on to uploading the code.

Step 4: Uploading the Code

Now we will upload the code to both Arduinos.

Download the Arduino IDE if you haven't so already and download Mailbox_Reciver and Mailbox_Detector.

Upload Mailbox_Reciver to the Receiver ( the one with the LED)

and

Upload Mailbox_Detector to the Transmitter ( the one with the Reed Switch)

Grab the magnet, bring it close to the reed switch and see if the light on the other Arduino turns on. If it does, you did it! Woo hoo! If not, check your wiring and try again

Step 5: Mounting the Transmitter

Now its time to mount the transmitter to the mailbox.

The reed switch and magnet activate when they are less than half an inch away from each other. So, when the magnet is more than half an inch away it will say the mailbox is on and when its less than half an inch away the sensor will say the door is open.

Mount your reed switch so that it is over half an inch away from the magnet when it is the mailbox is closed and less then that when the door is open. Refer to the pictures above, and yes I did remove my mailbox so I could take a picture for you gals and guys ;P

And that's it!

Step 6: Future Upgrades

Since this is my first Instructable I wanted to keep it as short and simple as possible. This means that there is room to make improvements. So let me know what you guys think, your suggestions and I might include it in a future update ;)

<p>I tried making this project today, but i couldn't get it working. When i open the serial monitor for the receiver it just says unexpected data received. How do i fix this?</p>
<p>Hi, I have been trying to use your code, and I am getting a lot of compiling errors from the arduino IDE. Any ideas to whats wrong? Thanks.</p>
<p>Sounds like you don't have the NRF24 library installed. </p><p>You can download it here: </p><p><a href="http://www.airspayce.com/mikem/arduino/NRF24/NRF24-1.14.zip" rel="nofollow">http://www.airspayce.com/mikem/arduino/NRF24/NRF24...</a></p><p>and here's a guide on how to intall it:</p><p><a href="https://learn.sparkfun.com/tutorials/installing-an-arduino-library" rel="nofollow">https://learn.sparkfun.com/tutorials/installing-an...</a></p><p>If this does not work, post the errors on here.</p><p>Good luck!</p>
<p>I'm having a problem with the code as well. I installed the NRF24 library, but still receive (No such file or directory #include &quot;nRF24L01.h&quot;) as an error. Can you help me out?</p>
<p>I recommend to use Arduino Nano 3.3V power version on both sides: transmitter and receiver. Very little power consumption, direct interface with nRF24L01+ and can be directly powered by LiFePo4 battery</p>
<p>Excellent post! Thinking about making similar system. What about:</p><p>1) Having transmitter in deep sleep mode, waking up by reed switch to send alert</p><p>2) Powering transmitter by LiFePo4 3.2V battery on solar charge</p>
<p>1. Have Green LED for have mail, red LED for no mail.</p><p>2. Add either 2 or 4 line LCD display to show initial conectivity, display mail status, and Date/Time when mailbox last opened.</p><p>Since 1 &amp; 2 are changes to the receiver, no additional current drain on transmitter. Might need a transformer for the receiver to minimize batter use. Starting to work on this shortly, will post circuit and details.</p>
<p>Great idea!</p>
<p>thanks, amazing project</p><p>how long does your battery last ? is there a way to warn (for example another led) when one of the 2 module are low power ?</p>
Smart idea! I really like this project. Thanks for shearig :)
<p>Nice writeup! </p><p>You might want to check out the MySensors project if you plan to introduce more NRF24L01 sensors into your setup. This will help route messages and builds a radio mesh of your sensors. <br><a href="http://www.mysensors.org/" rel="nofollow">http://www.mysensors.org</a></p><p>Arduino library on Github:<br><a href="https://github.com/mysensors/" rel="nofollow">https://github.com/mysensors/</a> </p>
<p>This must be a popular project, we had the same idea :)</p>
<p>Great minds think alike ;)</p>
<p>Good first instructable. Nice work! </p>
<p>Thanks :)</p>

About This Instructable

16,820views

50favorites

License:

More by 1Serg:Arduino Wireless Mailbox Detector Device 
Add instructable to: