SmartMail – digital physical mail

Prototype of SmartMail
Prototype of SmartMail

SmartMail is a sensor augmented mailbox that notifies you on your email when you have mail. No more checking for mail unnecessarily!


Don’t you just hate it when you go and check your mailbox to find it empty? What if you already knew when you actually have something inside it beforehand? SmartMail was a budget solution for this problem. Know when your physical mail arrives digitally.


We used an Arduino Duemilanove, a Sharp 2Y0A02 F 98 IR range sensor, a photosensitive sensor and a WiShield v1. The IR range sensor detects when something is dropped inside the box. The photosensitive sensor detects when the box is opened, to remove the mail. The WiShield allows us to connect the Smart Mail to an internet enabled WiFi, used for broadcasting to our email when we receive mail.

Assembly video, prior to testing detection and performance


Smart Mail is connected to the internet, using the WiShield’s TCP/IP stack on the Arduino board. Reading the photosensitive sensor values and IR values, three different states were controlled:

•mail_received: when the IR detects movement and photosensor detects dark.
•mail_taken: when the photosensor detects light.
•mail_reset: when the photosensor toggles from light to dark.

The WiShield allows us to perform an HTTP POST to a WebService we created using CodeIgniter PHP framework. Calling the WebService with the different states, triggers sending an email notification to your inbox, alerting you when you receive mail.

Flow of actions from SmartMail
Flow of actions from SmartMail

If there is no mail detected (IR did not detect any movement), if the user opens the door, nothing happens. On the other hand, as soon as the IR detects movement, an email is sent to the owner of the Smart Mail to notify him/her that there is new mail. When the door is opened, the Smart Mail status is reset, notifying the user that the mail was collected with another email. This case is useful if you have someone else at home that can check the email for you.


When we first built the prototype, we were interested in detecting when new mail arrived. As we tested the first prototype, we noticed that although we could detect new mail, we could not detect if someone took it away. Adding a photosensor to the prototype, allowed us to detect when someone opened the door. Although it fails to actually detect if the mail was taken, it is safe to assume so.

After a week using the prototype, we realized a problem. We did not notify the user if the mail had been taken. This lead to sometimes the user opening the Smart Mail and not finding anything inside it. Hence, we had to notify the user when the mail had been collect, as in a family house the likelihood of finding an empty mail box would be recurrent.

While I used HTTP POST to test the prototype, I further tweaked it to use XMPP protocol with a PHP wrapper, allowing you to be notified using GTalk IM.

Leave a Reply

Your email address will not be published.