Introduction: Mailbox Phone Alert

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of Close It Up

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

Step 12: Use

Picture of Use

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

Comments

defjedi (author)2015-10-11

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

hibee (author)2015-07-18

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

w1bmw (author)2015-05-28

Very thorough Instructable, great photography!

w1bmw (author)2015-05-28

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

CyborgGold (author)2015-04-22

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.

alexander.r.bakke (author)2015-02-09

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?

pesogebra (author)2014-12-15

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

chris911 (author)2014-05-04

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.

IBMer (author)2014-02-02

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.

bedwards19 (author)2014-01-29

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

Inanimate111 (author)2014-01-21

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.

mrcurlywhirly (author)2013-12-30

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!

eddevine (author)2013-10-08

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

sdcharle (author)2013-10-02

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.

sl0j0n (author)sdcharle2013-10-02

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!

sdcharle (author)2013-10-02

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

fastenspy (author)2013-09-28

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

This one is not as good?

http://www.befr.ebay.be/itm/GSM-GPRS-Shield-for-Arduino-/221176159800?pt=LH_DefaultDomain_0&hash=item337f205e38&_uhb=1

nikoala3 (author)fastenspy2013-09-29

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:
http://www.seeedstudio.com/depot/gprs-shield-p-779.html
Hope this helps!

fastenspy (author)nikoala32013-10-01

tanks nikoala !

etkoehn (author)2013-10-01

neat stuff

hammer9876 (author)2013-09-27

First off, congratulations on being Featured. Great idea.

Second, I would want to put the notifier in the back of the mailbox and tie/glue it down. If I am having problems with people stealing mail out of my US mail box (a Federal offense by the way), then I would fear for this item, too.

etkoehn (author)hammer98762013-10-01

if people were stealing the mail then she could put a camera on it. that would be awesome

nikoala3 (author)hammer98762013-09-29

Thanks!
You're right! Good idea.

RedZone133 (author)2013-09-29

You have a great idea, there are many reasons why this device would be worth the cost . I had tried this w/ a wireless doorbell device, since we have a thief problem.I did write "Bell" on the outside.A wire with a magnet that drops a little flag down the back would be a good Grandma fix, so she doesn't have to walk back and fourth.
Here's a package tracker for Apple produces:https://itunes.apple.com/us/app/delivery-status-touch-package/id290986013?mt=8

LP2 (author)2013-09-28

Thanks !
Great Idea!, my Mail box is 1,000 feet from my house, Looong Country Driveway.
And we have Mailbox Vandels in my area.

MartijnD (author)2013-09-24

Nice project! However a bit complex maybe... The battery will only last 1 day I presume... What is the range you need to cross? Modifying a wireless doorbell will be much cheaper, a €30,- will reach 100meters, add directional coils to sender and antenna receiver could get you up to 250meters. The sender/ inside the mailbox is only active during sending, battery will last months, maybe even years. The receiver, connect to mains... Or walkie-talkie, a range of 2 kilometres, send a tune when box is open...

nikoala3 (author)MartijnD2013-09-24

Thanks! The benefit of the cellular shield is there is no limit to the range (except of course if you don't have cell service), so you can be notified even if you're not at home. I also thought the cellular shield was cool and wanted to experiment with it. I did not realize the battery limitations while originally making this project, so I would suggest using a power cord instead of batteries (if your mailbox is close to your house or if you have a slot mailbox). The doorbell idea is great! Definitely would work well. Thanks for the input!

Sky Woulf (author)nikoala32013-09-27

how about multiple battery setup with batteries in parallel, so you get continuous voltage, and replace batts every Friday or so. another idea is a higher voltage battery with voltage reduction circut for longer battery life

MartijnD (author)Sky Woulf2013-09-27

Or a solar powered battery pack...

chrissv (author)nikoala32013-09-26

I think what MartijnD means is that you put the GSM shield/Arduino unit in the house, connected to mains power and the wireless doorbell main unit. It replaces the photocell. Then in the mailbox, you simply have the doorbell button part (maybe with a tilt mercury sensor for the push button). Then you can still send the SMS message when the mailbox is opened.

sconnor2 (author)2013-09-27

Don't you think this thing might be a problem when your mail carrier sees it? It looks suspicious to the point that that your mail carrier will call the police and you will have the bomb squad at your front door.

angpal59 (author)2013-09-26

That's ironic, I don't work and I can't see my mailbox so I was actually thinking of figuring out someway to let me know when the mail man has come, I don't need a text or anything like that, just some kind of alert, like a light or a buzzer or something like that, but great instructable. Figure one out for me, LOL, just kidding

Sky Woulf (author)angpal592013-09-27

I too was thinking along those lines, like a speaker with a soundbyte like the old AOL email message "You Got Mail" to sound whenever someone gets in to the mailbox, we have mail thieves in my area

VansDesigns (author)2013-09-26

Maybe a version that could use the wifi on a home network router???

vroom350 (author)VansDesigns2013-09-27

Possible, have other Arduino Wi-Fi device.

Dylon124 (author)2013-09-26

And how much is this going to cost me! Why not an ethernet shield or better yet use the raspberry pi! I need a raspberry pi!

Ragooman (author)2013-09-26

nice project !
one thing, I'm not sure about is the requirement to activate the SIM card. You gave a very brief one line sentence about this step. I would expect there's an additional service charge from the Phone company, as an extra phone line, to operate this device.
is this true ?

nikoala3 (author)Ragooman2013-09-26

Thanks!
Yeah I was vague on purpose there. I think it can vary depending upon which provider you get the card from.
SIM cards do not exactly act as an extra phone line. They can be activated by being inserted into any international phone or prepaid phone. You can put plans or dollar amounts on the card, but if your card expires or you need to refill it, you should reinsert it into a phone and contact the service provider. So, yes, you are correct, there is an additional service charge.
Forgive me if my terminology is off... I am honestly not too familiar with SIM cards because before this project I had never dealt with them.
I hope that clears it up a little bit.

strick (author)2013-09-26

Cool idea, but if your mail lady opens your box and sees that she'll likely run away screaming and call in a bomb squad...

Marcaine Art (author)2013-09-26

I saw the picture and instantly thought "my mailman would have a heart attack thinking it was an explosive device"

bschran (author)2013-09-26

nice project looks cool only thing i would be afraid of is the mail man would think the thing is a bomb and call the bomb squad out...

vroom350 (author)2013-09-26

Or can use PICAXE code with wireless 433Mhz module in the mailbox and send to other PICAXE receiver can be connected to a bell or light, battery would long over a year or more, simple cheap than much cost GSM Shield and pay bill.

vroom350 (author)2013-09-26

Great idea! but battery would run out in few day no good, I made a project separate cheap PICAXE wireless transmitter 433Mhz just switch when open the mailbox and send to Arduino receiver 433Mhz with GSM Shield in the house use adapter power, final send a SMS, save battery can long over a year for switch only than photoresister in Mailbox, but another possible use a photoresister with PICAXE just low drain current maybe a month or less.

johngofast (author)2013-09-26

I have a different mail carrier every week.. Painting it white and writing mail alert on it seems like the best option, but still.. $115 to know when your mail hits the box is silly.

I'd rather tie a string to the box door and run it inside my house where it will be connected to a bell. Or better yet a soup can on both ends so the mail man can yell into my house "You got mail!"

flowercrafter (author)2013-09-26

Our mailbox is over a 100 yards away and it's frustrating walking out there especially in bad weather only to find it's empty. I really see this as a great tool for rural people that have mailboxes even further down the road or the elderly or disabled. If there was some kind of solar charger for the battery, I'd do it & I'm a novice at putting together a device. Besides warning the postal worker, I'd paint it a bright color & write "mail alert".on it.

cepinstruct (author)2013-09-23

What would be the estimated cost of this project?

nikoala3 (author)cepinstruct2013-09-25

I would say maybe 115 dollars?

Glowbot (author)2013-09-25

Its been awhile since I liked an Ible so much that I rushed out to go buy. My granny waits in the garden for hours for her mail. I'm making this for her this weekend. I do have some small solar panels and I'm thinking I could hook them up to a rechargeable battery and let that trickle charge all day so I don't have to uses so many 9volts that would sit in the back of the mail box in an enclosure with all the electronics and only leave the photoresistor near the front. This is probably one of the best and most interesting ibles Ive seen in a long time. Maybe I'll post pictures when I'm done. Great ible! Keep making amazing stuff

nikoala3 (author)Glowbot2013-09-25

Thanks! You should also check out the comment above this one. declanshanaghy offers good ideas for power management. If you do post pictures, send me a link! I'd love to see the finished product!

declanshanaghy (author)2013-09-25

Great idea! Here are some tips for power management which should help you extend the time between having to put new batteries in your device.

1. Add a solar panel and NiMH rechargable battery. There are many 'ibles on solar panels.

2. Instead of hooking the pushbutton up to an arduino input, use a pololu pushbutton power switch. http://www.pololu.com/catalog/product/750 Then the device will not be drawing power when it's not "armed"

3. Put the arduino in low power mode while its armed. You can have it wake up on a timer every few hundred milliseconds to check the light level. It will consume less power that way

4. Use AA or AAA batteries instead of a 9v battery. 9v batteries are designed for low current applications.

About This Instructable

84,519views

445favorites

License:

Bio: 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 ... More »
Add instructable to: