The Mail is HERE! Preventing wasted trips to the mailbox!

Am I the only one who is regularly waiting on some sort of mail to arrive which causes you to keep checking the mail box before the mail actually arrives? :smile: This has happened to me frequently lately and I figure its time to create a Particle Photon Mail Box notifier so I get a Email or Text message every time the mail is dropped off.

This should be a very simple project but there are a few things that need to be decided before moving forward.

  1. What type of sensor is best for this task? A Light Sensor to detect light changes?
  2. A linear movement sensor to detect when the mail door is opened or closed?
  3. A magnetometer to detect door movement?
  4. A button for the mail man to push?
  5. Something else I have never thought of?

Power - How should this be powered?

I’ve just started testing the Photon’s DeepSleep and time based wake function for reading temp every 5 mins and its working perfectly. With a 1200mAh battery I can get 45 days run time using the deep sleep.

Solar panels are a option but I don’t think the extra cost or extra install/mounting is really necessary since we can just use regular batteries and end up with a years of battery run time possibly. Need to explore this more and I want to get every bodies feedback on this considering I want this to be a group effort if anybody else thinks that this is a useful device.

I figure the Photon can be setup to Deep Sleep until woken up when the mail box door sensor is triggered so it spends most of its life in Deep Sleep only consuming 80uA which is really good for battery life.

The Photon will wake from deep sleep when the sensor is triggered when the mail is delivered, it connects to WiFi, Sends the code to trigger a SMS or Email to notify you that your mail has actually arrived.

We could create a custom case and PCB for this and just offer it as a kit, it shouldn’t cost much.

A external Wifi Antenna is needed.

I’m curious how others would like to see a device like this turn out. I know now all mail boxes are the same and there is a huge variety of mailbox and mailbox locations in this world.


There are a couple of people with similar interests.

I think it would be popular if it was made into a product.

@Rockvole Thanks for commenting on this. I was beginning to think I may be the only one who watches for the mail :smile:

I’m just going to build something to go on my mailbox and post it up here and see if anybody else has any feedback along the way.

This should be rather simple.

I just need to do some testing on run times of the Photon off some sort of easy to source battery, not sure which one or type yet.

I’m currently using a 1200mah LiPo with a Adafruit 500ma charging chip for recharging and its working pretty dam well.

I like your idea :smile:! I always forget to go to my mailbox and it gets really full. Have you come up with a concept? Perhaps the trigger is when the postman touches the mailbox? Capacitive sensor?

(Though this uses an alternate product, I thought I’d share as the design issues are the same).

Here’s a mail alert device I made a while back. It happens to be Electric Imp (Imp-002) based, but could likely be converted over to the Photon or P0. (I’ve picked up some P0’s recently and will probably do a design based around that too … this platform should provide a good way to compare RF performance, standby, etc.). It’s a simple gizmo … just uses a photocell to initiate wakeup … this approach has worked fine. Text alerts are sent via Twilio … rssi, battery voltage, and internal temperature are posted to a Phant stream in order to monitor unit operation and health.

RF performance is surprisingly robust, even within the metal mailbox … there’s currently about 20-30dB margin above the minimum specified operating RX level. I didn’t want to use an external antenna, so was happy about this. (RF is often ‘magic’ to me … perhaps re-radiation within the mailbox is at work)? The router is about 50’ away, mounted along the interior front wall of the house.

Two AAA alkalines are used for power. The device has been operating for about a year and a half now … the longest stretch without a battery change being about 8-9 months. (Lithiums should yield 2+ years, so I should probably switch over to those at some point). Given this performance, I haven’t seen the need for rechargeables.

(Here’s a link for the enclosure).

1 Like

@ljd2 That’s a sweet setup and it’s nice to hear that a simple light sensor is enough to reliably get the job done.

Did you use a interrupt to get the Light sensor turn the Electric Imp to turn on send the alert?

I also just bought 10 of the P1 module’s so it would be perfect for this application it seems.

Did you use a voltage regulator circuit for this to regulate the battery voltage to a constant 3.3v? Based on your run times it seems to be a efficient regulator setup.

Thanks for Sharing :smiley: This is for sure something i want to tackle considering its so useful.

I’m still learning about Photon deep sleep and wake functionality, but the Imp has a pin that can be used to bring the module out of deep sleep, so I just used that to wake the device up when the photosensor input changed state.

Re: the regulator, I just copied that portion of one of their reference designs. You can learn more about it here and here. (I’m running at Vdd = 2.8v).

@ljd2 I have the Deep Sleep up and working now and its really easy.

You can wake the Photon from a deep sleep via the WKP pin.

Using the Photo sensor to trigger the wake pin sounds like a pretty easy way to accomplish the job so I may have to give this a try.

Thanks for the info. I report back here once I actually get this working.

Sounds good @RWB. Thanks for the note on the WKP pin. (I do recall seeing this now, though have not used it yet. Most of what I’ve done so far has been with timed wakeups).

Good luck with your project … I’ll be interested to see what you come up with. (I’ll report back also if I get things going with the P0).

@peekay123 @ScruffR Hey do you see any problems with using a simple light sensor’s output to bring the Photon out of deep sleep when ever the mail box is opened by the postal carrier?

I know there is a issue at the moment with bringing the Photon out of sleep using a Interrupt pin but does that also apply to the WKP pin?

AFAIK the WKP functionality works (alomost) relyably :wink:

I say almost, because I have not tested all thinkable use-cases, but the ones I looked at seemed OK.
There only was a post a while back that told of problems in connection with the SparkFun Battery Shield, which I don’t own so can’t test.

But you can always test.

Another thing to consider here is, what light sensor are you intending to use? Can it provide a signal suitable for interrupt triggering and how will its current draw impact battery life?

Hmm I am having issues with a photon not waking from sleep but I am using the sparkfun battery shield… I can’t see how that would change the wkp pin waking up though. I use a reed switch to the wkp pin and it works for a few hours to a day and then sleeps until I reset. I am thinking of changing the reed to the reset pin… hope there is a fix in 0.4.8 :slight_smile:

I have been looking at light and proximity sensors with Interrupt outputs but they all seem to be more complicated than I think they need to be.

Could we use a Light sensor like this one which I already have to test.

Now I’m wondering if we power the Photon or P1 directly from a 3.7v battery and use this light sensor to feed its output pin to the WKP pin on the P1 so sends us a alert when the mail has been delivered.

Is there any parasitic power draws when using a light sensor like this inside a dark mailbox since it’s a analog sensor that does not use Interrupts & I2C communication.

Since you have got one, just test it - can’t harm :wink:

@ScruffR I know it will work to trigger the wake up, I just wasn’t sure about if there was any parasitic draw on the battery in the uA range while it was hooked up.

I think I found the answer to that question in the Datasheet.

Can somebody confirm that I’m reading this right and that is looks like under zero light conditions if I’m feeding the light sensor from a 3.3v power source that the max consumed current per the data sheet should be 1uA?

If that’s correct then this light sensor looks to be a great low power choice for triggering the WKP pin in theory at least.

I searched the documents but didn’t find anything about what voltage level change actually triggers the WKP pin and brings the Photon/P1 out of deep sleep. Does anybody know this or can we just assume it needs to be half of 3.3v/ 2 = 1.65v ? I will test this but if anybody has any info on this it would be appreciated.

I’m not sure if you should not rather look at the supply current and not the output current.
Unfortunately they don’t show the supply current under “no light” condition, but have they not got a chart for that in the datasheet?


The whole Datasheet is linked below but I don’t see anything else to help us figure out supply current under no light conditions.

I have a uCurrent Gold around here but I need to pick up some coin cell batteries before I can put it to use.

I found another light sensor from Sparkfun that does supply the Supply Current when Dark in its data sheet and its normally 3 nA which is pretty dam good so I may just go with that one if the supply current on the sensors I have turn out to be to much more current than that.

1 Like