You Have Mail

You Have Mail senses mail in a roadside mailbox and alerts the user of this via an SMS or email.

Similar projects worth following
You can now receive an email or SMS when new snail mail arrives in your postbox. No more trips to an empty mailbox or mail stacking up because you forgot to check. It can also accept delivery of your internet shopping when you are not at home. This is handy with Amazon and eBay orders arriving and laying at your front door for easy collection by thieves...

You Have Mail is a mailbox sensor unit that will let you know when you have new mail or when it is has been removed.  It will also accept delivery of your internet shopping into a locked mailbox.  The courier enters the order number/tracking number via a keypad and You Have Mail will unlock the mailbox and accept delivery of the package.  No more shopping items left at your front door or stuck at the post office.  It sends a SMS/Email over WiFi to your mobile phone to let you know you have mail/packages.  (You mobile does NOT have to be in the same WiFi network as You Have Mail.)   It is battery / solar powered and use and hence only turns on every so often to sense the presence of mail etc.  A light sensor is included to enable the unit to sleep for longer periods at night since no mail will be delivered anyway - except for junk mail...

The goals of this project are as follows:

  •     Solve the above problem of alerting the user that there is mail in the mailbox or that it has been removed
  •     Solve the issue of packages (internet shopping) left at your front door.  (or a locked mailbox that can only accept one package.)
  •     Be a universal solution to be used as a basis for other similar connected projects.
  •     Be a platform to learn new technologies.
  •     Have fun.

The Learning goals for this project are as follows:

    * Texas Instruments MSP430 processor and tools. (launchpad development board MSP-EXP430G2)
    * Infra Red Sensing.
    * Electric IMP, WiFi, Zigbee and Bluetooth configuration and use.
    * Battery charging and power management.
    * KiCad (Schematic & PCB Layout + 3D modelling & Design Rules Check)
    * Google Sketchup
    * PCB manufacturing requirements
    * Using Git for hardware and software version control
    * Shortlist PCB manufacturers and assembly services for future projects

The prototype will be based on the Texas Instruments MSP-EXP430G2 Launchpad, an Electric IMP and supporting hardware.  Source code will be developed in C  and Squirrel and be Open Source - of course...

System Design Overview

For the detailed System Design Document, see

Concept Video

  • 1 × MSP430G2553IN20 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based MicrocontrollersMSP
  • 1 × XBEE ZNET ZigBee Module, Chip Antenna, XB24-BCIT-004 XBEE module
  • 1 × BQ24210DQCT Power Management ICs / Battery Management ICs
  • 1 × MCP9700AT-E/TT Sensors / Temperature, Thermal
  • 1 × LTC1998CS6#TRMPBF Power Management ICs / Power Supply Support

View all 14 components

  • Update May 2016

    PK05/17/2016 at 22:43 0 comments

    I can't believe it has been over a year since my last update - I have been a little side tracked onto other projects. Too many projects too little time... :o) Long story short, I have discovered a few things on this project I think are worthy to report.

    The FET I used to turn off the sensors etc (ZVP4105) did not fully turn on (Vth too high) which caused a drop in the supply voltage to the sensors etc. This was just a FET I had laying around at the time and not quite suited to the job. This was swapped out for a more suited part which now works perfectly.

    I also discovered that the power consumption was still too high, around 40mA or so more than expected. I found this was consumed by the debugging circuit which I forgot to disconnect, removing the jumpers on the Launchpad board resolved this issue. I still ended up fitting a larger solar panel, +/- 3/4 times bigger, about half the size of an A4 page. The software was also tweaked a little to wake up at longer intervals apart at night.

    The ESP8266 works very well and is put into low power mode by its power down pin rather than turning off power to it. (Did not want to re-initialize anything at wake-up etc. although I don't think that is necessary anyway.) Come to think of it, an ESP-12E board will be a nice solution and easy to program in Arduino.

    Initial tests in the post box went OK. I found aligning the sensors in a small space challenging and ended up having both the IR diode and the receiver on the same side, i.e. mail not breaking the beam, but rather reflecting it. After a lot of tweaking and also trying another IR sensor (from, I am a little stuck. The sensors work perfectly on the bench, but don't work reliably in the postbox. At first I thought it was stray IR from sun light blinding the IR from the LED, but I found testing outdoors everything worked fine. I suspect it may be IR reflections inside the postbox or something along those lines. I have to do more testing to get to the bottom of this, but other than that everything is working great.

    I have also added some Test Driven Development based unit tests to the Digital IO Driver which is pretty handy. A little painful to add after the fact, but well worth the effort as a learning exercise of TTD for Embedded systems.

    Hopefully my next update will not take another year. :o)

  • Update April 2015

    PK04/25/2015 at 01:08 0 comments

    The RN-171 WiFi module has ended up stuck in WPS mode and is practically bricked - I cannot get it out of this mode at all. I suspect it has something to do with removing and plugging in the module with power connected... Lesson learned. I have switched over to an ESP8266 module which works pretty well. Only problem with WiFi is that it is power hungry. At least extending the range was pretty easy with an off the shelf range extender.

    I did some initial testing with the solar panel and found that the battery was running out even on a sunny day. Measurements revealed that the unit is consuming around 160mA - the solar panel was only delivering around 50mA. No wonder. This was with no low power mode and running continuously.

    I have since added low power mode and the unit only wakes up every 30 minutes during the day and every 3 hours during the night. Current consumption in low power mode (Wifi low powered as well) is between 5-10mA - still high, but nowhere close to what it was.

    Next step is to clean up the software a little and do some rough outdoor testing to get an idea of battery life and whether the solar panel charging is enough. Then mounting it in the postbox and putting it to good use.

  • Update March 2015

    PK03/25/2015 at 02:03 0 comments

    I have been very busy with other projects and have not touched YHM in a while. I have done some testing at the mailbox and found that the XBEE range was not good enough, +/- 30m but there are walls etc. in the way. (My XBEE modules use the onboard chip antenna.)

    My options now is to either add another XBEE module as a repeater/router or add a WiFI range extender and rather use WiFi. At this stage I am leaning towards the WiFi option. (I will also use this for other things.)

    My solar panel has also arrived from China, but I need to mount this in an enclosure and it is a little bigger than ideal. I have since picked up a solar mobile phone charger from Aldi (for $10.00) which is about half the size and in a nice enclosure. It should mount nicely behind the postbox.

    I hope once I have the WiFi extender in and switched over to WiFi it will be up and running. So many projects so little time... :o)

  • Update September

    PK09/18/2014 at 22:41 0 comments

    Another busy month, but a lot of fun!  I now have the RGB LCD (from Adafruit) working, the RGB backlighting gives a very nice effect.  The source code have also been divided into cleaner modules and can easily be re-used on other projects.  (It is not available on GitHub yet.)  I am currently busy cleaning up the keypad code and the battery management code.

    You Have Mail did not make the cut for the final 50 of TheHackADayPrize, bummer...  This means that I will now get back on track with the goal of the project of solving the problem.  This means using the XBEE module rather than Electric IMP because I want to get the status information to my existing webserver and for that I need UDP - which Electric IMP does not support.  (There are other ways, but it seems to get a little messy...)  Not quite sure about future project logs etc, however the project will be completed very soon.  If there is further interest in the project or you have any questions, please let me know. 

    I have enjoyed taking part in TheHackADayPrize, looking forward to more similar competitions in the future.  I have learned a lot in a relatively short time and have more code modules/hardware etc. to use in future projects. :o)

    Best of luck to the 50 finalists - there are some awesome projects in there!!!

  • Update August - It Works!

    PK08/19/2014 at 13:12 0 comments

    Well August and the Stage 2 deadline is upon us!  It has been a very busy month, but exciting and successful.  The System Design Document is now ready and all components have arrived in time for prototyping for Stage 2.  My goal was to have a working prototype with an Electric IMP by the Stage 2 deadline and I am happy this has been achieved.  Not only is SMS's sent on mail delivery via the Electric IMP, but unlocking of the mailbox upon valid order/tracking number entry is also working.  A dummy website has been setup on my computer to enter order numbers and lock/unlock the mailbox remotely.  (It's not pretty (yet), but works a treat...)

    The Electric IMP code is now available on GitHub as well as the System Design Doc.  Please note that the Electric IMP code will be cleaned up a little more, it is a little messy for comfort.  The MSP430 code is progressing well, but not quite in a state for GitHub - still some cleanup left to do and more layering to make it a little more portable.  

    I hit a few snags in the past month with code size restrictions on the Demo IAR Workbench I was using. (still not sure why manufacturers don't just make their tools available for free - what better incentive for using their parts? - nudge, nudge TI...)  I am now using MSP430-GCC and Code Blocks which works pretty well.  (Command line compile and program is also available.)  I still have to get the debugger working, but the serial port and IMP server log is pretty useful.  The other snag I still would like to figure out is why the Electric IMP would not connect to my WiFi unless I disconnect the second router from the network, i.e. physically pull out the CAT5 cable and it connects - no problem.  After this the cable can be reconnected.

    The goal for this month is to cleanup the MSP430/IMP code and get it all on GitHub, finalize the schematic (at least on paper) and make the website a little prettier.  Would be nice to have the prototype on PCB by the Stage 3 deadline, but that may be a little too optimistic given the deadline is a little over a month away.  Better get cracking...

  • Update July

    PK07/25/2014 at 10:00 0 comments

    Well it has been a busy month with a lot of project developments and Stage 1 complete.  The initial design (as available in GitHub) has been significantly improved - practically re-designed.  The current design will make provision for Zigbee, WiFi and Bluetooth for future/other projects and the mainstream project (the focus here) will be based on an Electric IMP.  This makes solves the problem of WiFi connectivity because the Electric IMP can be configured to connect to your WiFi via Blinkup, i.e. by using your mobile phone display and flashing the settings to the Electric IMP.

    The prototype is just about complete with the first SMS notification successfully transmitted to my mobile phone via a RN-XV WiFi module.  (Electric IMP is still in progress).  The keypad is also connected and the software to read it is done.  The software has also been layered making it easy to re-use in other projects.  (I plan to clean up the software a little more before making it available on GitHub.)

    The goal for the coming month and Stage 2 is to get the unit working through the Electric IMP and figure our a way to get the order numbers/tracking numbers of packages onto the unit easily.  (May also have to add non-volatile storage for this - note quite sure yet.)  This can either be done by sending an SMS to the unit or entering the order numbers/tracking numbers on a website and the Electric IMP reading it from the site.  It will be an interesting month learning the Squirrel language (for the Electric IMP), possibly PHP for the server-end and getting the display going as well as finalizing the hardware design...  I'm excited!!!

  • Update June

    PK06/18/2014 at 01:35 0 comments

    Prototype currently in progress using the MSP430G2553 launchpad and the Booster XL battery pack for launchpad ( This will require some additional vero-board work to house circuitry not included on the dev boards. Software development is progressing well, the design is based on re-usable modules which can easily be configured without code changes. Software will go onto public GitHub repo as soon as a reasonable version is available. Exciting!

  • Update

    PK05/20/2014 at 22:05 0 comments

    Schematic, PCB Layout, 3D models and bill of materials now available on GitHub.

View all 8 project logs

Enjoy this project?



Eric Tsai wrote 07/09/2014 at 21:00 point
PK, we made the same project! I didn't realize there was another "you've got mail" project until now. Funny.

  Are you sure? yes | no

PK wrote 07/10/2014 at 05:39 point
Eric, that's funny! It must be a good idea. ;o) Let me know if you have any questions etc. I'd be happy to share.

  Are you sure? yes | no

Adam Fabio wrote 06/19/2014 at 04:47 point
Great project - anyone who has had to make the long walk out to the mailbox (in the snow, uphill both ways) knows how much of a help this project is! Thanks for entering it in The Hackaday Prize!
Our community voting is about to begin, so make sure your documents and images are all set, and hold on tight! It's a bumpy ride into space!

  Are you sure? yes | no

PK wrote 05/19/2014 at 10:08 point
That's correct. There are 3 sensors, one for the pipe area of the mailbox (for news papers etc.) and two for the letterbox - one in the front and another a little further back.

  Are you sure? yes | no

Eric Evenchick wrote 05/19/2014 at 09:04 point
So how does the mail sensing itself work? It looks like it's IR based?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates