Mailbox Phone Alert




About: Hey! I am an Electrical Engineering major and I love making fun and useful electronics projects. I am also interested in crafts of all sorts. In particular, I enjoy baking and sewing. Check out what I've made!

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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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!

Microcontroller Contest

Participated in the
Microcontroller Contest

Be the First to Share


    • CNC Contest

      CNC Contest
    • Make it Move

      Make it Move
    • Teacher Contest

      Teacher Contest

    64 Discussions


    Question 1 year ago on Introduction

    Hi, this is simply elegant. Nicely done. Have some questions that I hope I can get some feedback on. I have a community mailbox with 13 mailboxes in a single pedestal. Would this work for multiple phone numbers? Could the code be modified to add a loop that goes through 12 individual phone numbers - all of which would receive the same SMS text message 'You got mail!'. Would a time delay be needed in order to cycle through the 12 numbers? Thanks!


    3 years ago

    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!!!!


    4 years ago

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


    4 years ago on Introduction

    Very thorough Instructable, great photography!


    4 years ago on Introduction

    @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.


    4 years ago on Introduction

    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?


    4 years ago on Introduction

    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 :)


    5 years ago on Step 7

    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.


    5 years ago on Introduction

    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.


    5 years ago on Introduction

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


    5 years ago on Introduction

    Ive been looking for something like this for a while, I am barely home and would like to pick up my mail when its there and not have to worry about it. Great project and I'm going to try it out and see if i can change the text message alert to maybe a email or something that is free.. But not sure how to do this, if anyone has any ideas that would be great.


    Very interesting project, I'm looking for some sort of alert, though i am fortunate enough have conduit close to where i will be setting up a mailbox. So i can easily run a pair of wires into the box and have a tilt switch on the back of the spring loaded brass flap the mailman will have to push letters in through, that was going to close the cct for a simple buzzer. Had not thought of this type of setup, Its very clever, though I would be more concerned about theft of the SIM and/or the Arduino than most of my mail!


    5 years ago

    What SIM card are you using? The ones I've seen require an expensive plan with a provider


    5 years ago on Introduction

    I was going to call you the most sophisticated spambot ever, but then realized you forgot to link to the nutritional supplements you are selling.

    1 reply

    Reply 5 years ago on Introduction

    Hello, "sdcharle".
    I'm not "selling" anything.
    READ the comment again.
    See if you can figure out what I was writing about.
    Have a GREAT day, neighbor!


    5 years ago on Introduction

    Nice Instructable, and you did a good job with the video, too.


    5 years ago on Step 2

    Hello, I can not find the GSM / GPRS shield on RadioShack.

    This one is not as good?

    2 replies

    Reply 5 years ago on Introduction

    Hi, yes, sorry it appears that RadioShack does not carry it anymore. I am not sure how the one that you have linked works, but you could try to use it. Here is another link to the one I used:
    Hope this helps!