Mailbox Phone Alert

86,115

445

65

Posted

Introduction: Mailbox Phone Alert



The mailbox phone alert sends you a text whenever you get mail. I remember anxiously checking my mail multiple times a day during the spring of my senior year of high school as I awaited letters back from colleges. Nervously, I would walk up to the mailbox. My heart would skip a beat as I opened it. Nothing inside. I would then go through the same process an hour later. I thought, if only there were a solution to this nerve wracking struggle of checking the mail all the time. I have come to the solution, but sadly I am two years late. Fortunately, this is still a super handy device that I enjoy using and now YOU can prevent future mail angst by making it for yourself. 

This project is perfect for you if you're anxious to get your mail, you have issues with mail theft, you like to be updated by phone on every aspect of your life, or you just want to make something cool.

The device uses a photoresistor to detect the light levels in the mailbox. When the light is above a certain threshold, the Arduino knows the mailbox is open. There is a red button on the front of the device that you press to arm it. After you press the button, the next time the mailbox is opened, presumably by the mailman, you will get a text. It will not send you a text again until you have armed it again. This ensures that you don't get a text every time you open the mailbox. Every time you pick up your mail, arm the mailbox phone alert and enjoy instant mail notification.

Preliminary advice: Inform your mailman of your contraption so that he does not think you have a planted a bomb in your mailbox and use a non-metal mailbox for good cellular connection.

Step 1: What You Need

(x1) Arduino Uno (RadioShack #276-128)
(x1) GPRS/GSM Shield (RadioShack #276-246)
(x1) Prepaid SIM Card (RadioShack #17-8167)
(x1) CR1220 coin battery (RadioShack #23-793)
(x1) Photoresistor (RadioShack #276-1657)
(x1) Project Enclosure (RadioShack #270-1805)
(x1) SPST Pushbutton Switch (RadioShack #275-646)
(x1) Grid-style PC Board (RadioShack #276-149)
(x1) M-type power plug (RadioShack #274-1569)
(x1) 9 volt battery (RadioShack #23-1134)
(x1) 9 volt battery snap (RadioShack #270-324)
(x2) 10kOhm Resistor (RadioShack #271-1335)




Step 2: Set Up GPRS/GSM Shield

Insert the coin cell battery into the holder on the bottom of the shield. Activate your SIM card by inserting it into an international phone or by calling the service provider. Slide the SIM card into the slot provided. 

Step 3: Drill

Drill two holes about a 1/4" apart on the front of your enclosure using a 1/16" drill bit. You will thread the two wires of your photoresistor through these holes.

Drill a hole next to the two 1/16" holes you just drilled using a 1/2" drill bit for your pushbutton. 

Step 4: Pushbutton and Photoresistor

Insert the two wires of the photoresistor into the 1/16" holes drilled on the front of the enclosure. Glue it in place. 

Insert the pushbutton in the 1/2" hole. Fasten it in place with its mounting nut.

Step 5: Power

Take apart the M-type power plug.

Feed the black cover through the wires on the battery snap connector. 

Solder the red wire of the battery snap to the tip terminal on the plug and the back wire to the barrel terminal.

Fit the GPRS/GSM Shield on top the Arduino and plug the M-type connector into the Arduino. 

Step 6: GPRS/GSM Antenna

Place the GPRS/GSM Shield which is now attached to the Arduino and the 9V battery inside the project enclosure.

You will screw the cellular antenna onto the gold connector on the left side of the GPRS/GSM shield (labeled in the first image above). However, you will need to drill a hole in the project enclosure in order for it to fit.

Make a mark where the antenna should go on the side of the enclosure. 

Drill a hole where you have marked the enclosure using a 27/64" drill bit. 

Insert the antenna into the hole you just drilled and screw it onto the connector.



Step 7: Program

Load the following code into the Arduino. Be sure to change the phone number in the SendTextMessage() method to your own phone number.

When the Arduino has power, a green LED labeled PWR should light up on the GPRS/GSM shield. Every time you reset the Arduino's code or disconnect a power source, you will need to hold down the button labeled PWRKEY on the GPRS/GSM Shield for a second to activate cellular connection.You know that the GPRS/GSM shield is working if a red LED labeled D2 is on and a green LED labeled D3 is blinking every few seconds.

Possible causes for the shield not getting cellular connection are low battery power (in that case, just switch out the battery) or no cellular service (move to a location with service or refill the SIM card).

Step 8: Solder

Make note of where the Arduino pins line up with the pins on the GPRS shield. You will need to use 5V, GND, A1, and pin 3.

Above is the circuit you will be creating.

Solder a red wire that will connect to 5V on the Arduino and a black wire that will connect to ground on the Arduino. 
Solder the two 10k pull-down resistors.
Solder wires that will connect to A1 and pin 3 on the Arduino.

Step 9: Solder Some More

Solder wire to the two lugs on the pushbutton.

Solder the pushbutton and the photoresistor to the PC board in the appropriate locations as indicated on the breadboard diagram.

Step 10: Put It Together

Connect the red wire soldered to the PC board to the pin on the shield corresponding to 5V on the Arduino, the black wire to the pin connected to GND on the Arduino, the green wire connected to the photoresistor to the pin corresponding A1 on the Arduino, and the other green wire connected to the pushbutton to the pin connected to pin 3 on the Arduino.

After you have connected everything, gently fit the top onto the enclosure.

Step 11: Close It Up

Fasten the top on the project using the screws provided with the enclosure.

Step 12: Use

Put the mailbox phone alert in your mailbox and enjoy instant mail notification!

Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    65 Comments

    Hi, I've done mine one with a Photo resistor while the other acts with a push button to activate sms signal. It works when connected to the laptop.

    I do need assistance as to why when connected to a 9V battery or even 4AA batteries, the chip will not work and the status will disappear after a while. (I figure its due to a dip in the voltage supply?)

    Can anyone help me to a solution. Cant make it mobile as of yet.....

    Would really appreciate it!!!!

    I made mine using Infrared Proximity detection, and it works fine.

    Very thorough Instructable, great photography!

    @fenwaydog The radioshack website no longer shows any of that stuff, but it's from SeeedStudio and it's their Version 1 GPRS shield. They are now on version 3.

    When the battery dies, grandma might start to worry about if the battery has any charge left, lol. Maybe add a second routine where it sends a text to let you know the battery is almost depleted, lol.

    hello i'm new to arduino. can someone change the sketch so it is a button that triggers send sms command insteed of the light sensor?

    hi there

    can i get the library that you use?because i have implemented the circuit exactly and it cannot function. can i get the library?

    thank you :)

    I'm having trouble with this, It will not send a text and i have checked everything. Could it be that i am using a TracFone sim card and not a bigger name provider? It was just the cheapest one i could find.

    Neat idea. Not sure it would work here in my area. Our mail delivery person doesn't show up until 7:30pm. I'm not sure there is enough light to trigger the LDR or Photo Cell. I'd probably have to go with some kind of a contact switch to register when the mailbox door is opened.
    I feel bad for our mail carrier. They Must either start very late in the day, or has too many stops. A real bummer when you pay for Priority Mail, or Next Day Air and you don't get the item until 7:30pm...
    I'm thinking of doing something similar, except using the RF Transmitter / Receiver in the 433Mhz range. I'll probably use a momentary switch triggered by the mailbox door opening. Maybe add a Solar Cell on top of the mailbox to keep things powered up.

    Great project, nice idea as a gift for those with mobility issues, good work