Mailbox notification

Hey @JerryW - I did receive my parts from Digikey, and had a few minutes to play around with them … primarily just taking a couple R vs. light measurements. (Fyi, I’m using this device … http://www.advancedphotonix.com/ap_products/pdfs/PDV-P9203.pdf … looks to have a slightly higher sensitivity than the Sparkfun part, but otherwise similar characteristics).

Nothing surprising so far. At first blush it looks it looks like I can design around a dark resistance of > 1M, and a light resistance of < 100k. This would suggest a fixed R of a few hundred K, (i.e. significantly above the 10k value).

I’ll have more time today to work in the shop, hopefully nailing down the characteristics of the part under actual use conditions (I’m thinking of perhaps just enclosing the whole thing in a translucent enclosure). Should be able to come up with design values shortly. Will post when I know more.

I wonder if it would be easier to use a phototransistor? The voltage goes down across the divider if you use a photocell, right? I was able to get it working with a phototransistor.

@JerryW - also, if you could post voltage and/or resistance values of your photocell/circuit under your anticipated lighting conditions, I think that could help further the discussion. Thanks.

@jwehr - part # or location of part?

Yep, phototransistor sounds like a good possibility too … lotta options here. I just started looking into this, so will have a look at that alternative too. Good suggestion.

@LarryJ - thank you. I am learning but wished I knew a lot more about this stuff. Just want a simple mailbox notifier. Simple, huh!

I’m just using one of the recommended phototransistors for the Imp module blink-up circuit:
http://www.digikey.com/product-search/en?x=14&y=17&lang=en&site=us&KeyWords=SDP8405-003

I was able to wake an Imp by turning a light on and off over it in a fairly dark room.

Thanks. (Shoulda had a couple of these on that last Digikey order :slight_smile: ) Looks more straightforward than the photocell.

It would be nice to know what the lowest voltage that is recognized as a HIGH on pin one would be?

I would set this project up, but my mailbox is metal, and my WiFi barely makes it to the post light in my front yard as is. I’ll have to get a non metallic mailbox, and figure out how to boost my signal.

@jwehr - how did you wire the phototransistor?

Just put it in series with a resistor between 3.3v and GND. I think the resistor was 10K or maybe 100K. Then connect Pin 1 between the PT and the resistor. As the light level goes up, the voltage goes up. All you need is to get a high enough voltage to trigger Pin 1 to wake. It might take a more sensitive PT for a dark day. I’ll put it in box and do some more testing.

The Imp can handle 3.6V, maybe you want to use three 1.2V AA rechargeables or similar, and use VIN instead of 3.3v, then you get higher voltage reference for Pin 1. Someone please tell me if my DC circuit logic is way off here. :slight_smile:

@jwehr:

High = .7Vcc = .73.3 = ~2.3V
Low = .3Vcc = .33.3 = ~1V

The imp’s internal pulldown is 40kΩ.

After doing some math, it looks like you need the photocell on the top side of a voltage diver circuit, and 4.7kΩ on the bottom to make this work (assuming ideal conditions where it’s 1kΩ when light, and 10kΩ when dark).

The downside of this solution is that you’re going to have a continuous 235uA (substantially more than the imp’s sleep current).

You’re best bet for battery life is probably using a hall switch.

Please see: http://www.youtube.com/watch?v=pe9j5MuXuz4 I have already tried conacting Jon Lee but no response. In this video you will see exactly what I am wanting to do and have tried to replicate but for some reason cannot get it to work.

Y’now @jwehr - I’m testing it out within a metal (but RF leaky?) mailbox, and am seeing a fairly stable rssi in the -60 to -65dBm range … pretty robust. Fortunately I’ve got the router near the front window, with a 40’ to 50’ line-of-sight to the box.

@bi - Fortunately I think the dark R is significantly higher than the Sparkfun numbers. I measured well over >1M for my device (I think there’s is likely similar in total dark conditions). So, there may be hope for the photocell approach without totally compromising leakage current. I’d think the circuit should pretty much operate in dark conditions except for a couple seconds a day.

@LarryJ - how are you wiring yours? again, I have tried a few different methods and got the same results but I need to go back and measure directly from pin1 and not the photocell. I currently have it wired with one pole going to 3.3v, the other going to pin1 and 10k resistor between pin1 and gnd.

I guess that is why I thought about the PT… if there is no light, it won’t draw much or any current, right?

@LarryJ Maybe I should get an antenna for a module and hang it out the back. :slight_smile:

I live in a town where we usually have the same mail delivery person every day. My neighbor who doesn’t walk very well asked the mail person to put their flag UP when the mail is delivered. They look out their window to see if the mail arrived. Sometimes I just look for their flag … if their mail arrived, mine did too.

But using the imp is way cooler. It just seems like so much work. You’ll learn a lot though by making it work … and it’s fun.

@jwehr don’t use rechargeables here:

  • when full, a typ 1.2v NiMH is 1.4v. 1.4*3 = 4.2v, which is over absolute maximum
  • people could mistakenly insert alkalines and go to 4.5v