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? 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.
What type of sensor is best for this task? A Light Sensor to detect light changes?
A linear movement sensor to detect when the mail door is opened or closed?
A magnetometer to detect door movement?
A button for the mail man to push?
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.
(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.
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).
AFAIK the WKP functionality works (alomost) relyably
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
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.
@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.