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!
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!
We will detect when the wireless mailbox sensor 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.
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.