Triple Sensor Mailbox Alert Really Delivers

Messing with the U.S. Mail is not something we generally recommend. But if you build your own mailbox like [Bob] did, you stand a much better chance of doing what you want without throwing up any flags.

Speaking of throwing up flags, one of the coolest parts of this project is the toy mailbox inside the house that monitors the activity of the real box. When there is mail waiting, the flag on the toy mailbox goes up. Once [Bob] retrieves the mail, the flag goes back down automatically. A magnet in the real box’s flag prevents false alarms on the toy box provided the Flag Raised On Outgoing protocol is followed. Best of all, he built in some distress handling: If the mailbox door is left hanging open or the battery is low, the toy mailbox waves its flag up and down.

So, where do the three sensors come in? A magnetic reed switch on the wall of the real mailbox pairs with a magnet in the flag. To determine whether the door is open, [Bob] initially used another magnetic reed switch on the underside of the box. This didn’t work well in wet weather, so he switched to a mechanical tilt sensor. An IR LED on the ceiling and a phototransistor on the floor of the box work together to detect the presence of mail.

[Bob]’s homebrew mailbox has a false back that hides a PIC 16F1825. When the door opens, the PIC wakes up, turns on a MOSFET, and checks the battery level. It waits two minutes for the mailman to do his job and then reads the flag state. After comparing the IR LED and phototransistor’s states, it sends a message to the toy mailbox indicating the presence or absence of mail.

The toy mailbox holds a modified receiver board and a servo to control its flag. [Bob] has made the code and schematics available on his site. Walk-through video is after the jump.

22 thoughts on “Triple Sensor Mailbox Alert Really Delivers

  1. If I were to build something like this, I would go a couple of steps further… I would connect the indoor mailbox indicator unit to the web and log when the outgoing mail was put in the mailbox, when the mailman arrived, and when I collected any new mail.

    I might also be tempted to put a cheap TTL camera facing the mailbox if I was worried about people tampering with my mail/mailbox (though I wouldn’t do that unless some mail went missing or something like that).

  2. I had been planning for some time to do a version of this. The central location in my apartment complex where they have all the mailboxes is a decent walk around two sides of the complex by pavement, or maybe 2/3 that distance cutting through the constantly water-logged grass commons in the center. Due to the hassle, I end up checking my mail very infrequently.

    Unfortunately, being an apartment complex, I don’t own the mailbox. Worse, our mailboxes are an array of cubbies inside a large cabinet, the entire rear wall of which is a door the mailperson opens to have access to all our mailboxes at once.

    No way to hide such a sensor / transmitter and no option to permanently modify the mailbox. I am SOO jealous of [Bob] Well done!

    1. Hide it in plain sight, as a thick envelope addressed to yourself that happens to never leave your mailbox. The bigger problem is probably how to get wireless connectivity (assuming the mailbox is made of metal).

    2. usually those cubbies are deep. you could at least rig something up that fit well in the back that had a light or distance sensor and know when the mail person opened it. you might even be able to tell if something was closer than normal, indicating you might have mail. get creative.

    3. I’m having the same problem right now. Actually saw this right after starting my project. I’m running 5V through the mailbox and I have a spring that touches the mailbox door when it’s closed. When it opens, it breaks the circuit. So I can use a NOT gate and a cheap transmitter.

  3. If I did this again, I might take a different approach: a cheap cell phone in the mailbox that would take a picture of the mailbox contents on demand and then send the picture to me. That would certainly have longer range than the cheap 433Mhz eBay radio I used.

  4. Too bad. I was hoping that the indoor mailbox would just mimic the outdoor box. Flag up outside? Flag up inside. Door left open (or just opened by mailman), the indoor box’s door is open. Mail in box outside? Mail in box inside.

    Given the box isn’t stamped with USPS, I’m surprised they’ll even deliver mail to it.

  5. In my neck of the woods the Postal Service decides what is a mailbox regardless of what the owner wants. The woven basket outside my office door routinely gets mail (for everyone on the floor) despite being clearly marked for my organization’s grant package dropoffs.

  6. Technically its against the law to do this kind of stuff to a mailbox. Federal crime so be VERY careful. I have been thinking about doing this to my mailbox across the street because its a good stretch from the house as I live in a rural area. If I were to do it, it would be a Raspberry Pi hooked up to either my WiFi, or a Cell data network wtih Project Fi, using Firebase Notifications to send me a push notification on my phone. Problem is, federal law…

    and YES, even if the mailbox is on private property, USPS OWNS IT the second they deliver mail to it. (its the law).

    1. Can you cite the law? I’ve seen nothing about this in the USPS’s guidelines for mailboxes on their web site.

      As for being very careful because of the federal law: pfft! In the two years my sensor-laden mailbox has been up, I’ve had several different postmen and not a single one objected or, I suspect, even cared. Why would anyone in the PO object?

  7. Instead of having a circuit that constantly draws power, why not think up a mechanical swith that closes when mail sits atop it. Our US postage stamps cost $X for 1/2 ounce so the switch would need to be adjusted to close with only that amount of weight (or more) sitting on it.

    A second possibility would be a lever. Mail would press down on one end and at the opposite end one could have an adjustable weight such as a low value coin.

  8. An additional feature is one I saw in a YouTube video and that is an LED that glows when mail is present in the box. That way if you are not at home when the mail arrives, you see by the status of the LED that there is mail inside when you arrive home. Green LED = you have mail. You could have a red LED for error conditions such as a low battery. I would put my green and red LEDs on the side or under the box so I can see them as I drive up the street.

    Since LEDs can over time drain your battery power, If I were to incorporate any in the circuit, I would put them on a timer. Then flash them every so often. For example, on for 1 second, off for 3 seconds, etc.

    The status LED would also be helpful if you arrive home and the weather is bad (rain, snow, etc.) and you wouldn’t be a happy camper if you had to get out of your car only to find you had no mail.

    Finally, why not incorporate a white LED inside that comes on when the door is opened? That way if it is dark outside, I will be sure that I retrieved all of my mail. One could add logic to the circuit that said to turn off the white interior LED if the door were to be left open for any amount of time such as 5 minutes. That way your battery supply would not be drained.

    When I build my smart mailbox system, I don’t believe I will use “AA” batteries. I would think an 18650 rechargable battery would offer a longer service life. I have rechargable 18650 batteries around the house because I buy flashlights that use one or two.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.