New SnailMail Detector

Hi Guys and Gals,
A project I have on the drawing board is a SnailMail Detector. My mailbox is about 1/8Mi away and through a wooded area. The idea, as of now, is to have a reed switch attached to a Nano with a Transmitter. Whenever the door is opened and closed the Open and Close times will be transmitted to a another Nano with a Receiver. That Nano will display that Mail was delivered, display the time of delivery(door closed time) on a 1602 LCD and change an RGB LED from Red to Green.

The transmit side, and likely the receive side, will run off of AA battery packs.

FUTURE ADDITIONS: On the transmit side I may add a small pressure plate(or even scale) to detect if mail was indeed taken and/or dropped off. Additionally I might like to add a rechargeable battery and a solar panel or perhaps a solar panel and capacitor if possible. On the receive side I may add a WiFi module and have it notify me via text/email.

I was thinking of using one of those cheap dollar store door alarms. I have a few laying around. I pulled one open today(will post pics later when I can) and I was wondering if I could possibly use it by hijacking the signal it would normally send to the Piezo to detect the mailbox door state. If so what would be a good starting point. Additionally this alarm runs off of 3 1.5 LR44 batteries equaling 4.5V… Would the Arduino's 5V kill it?

This would be my real first project outside of the nifty pinger/lcd/LED/piezo/button thing I made that only pings while the button is pressed and displays distance in CM and inches and then flashes my Red LED and alarms the piezo once a certain threshold has been crossed…. That was more of a way for me to familiarize myself with the IDE and brush up on C though. Given that this little demo project I did was extremely easy I don't imagine my above SnailMail project ought be very difficult at all. I'd love to hear your thoughts and input! Thanks!

When you can connect a LCD, you can make a wireless detector.

A solar panel plus capacitor is not enough, the super capacitors do leak.
You could use 3 AA batteries, and run a barebone or stripped Pro Mini from the 4.5V. The ATmega328P would directly run on that 4.5V. With a sleep mode, it will run for more than a year.

1/8Mi is that 1/8 of a mile ? and that would be an american land mile ? that is 1609 meters.
1/8 of that is 200 meters, but with trees and bushes in between I assume. You might need a transmitter for 500 meters, or perhaps you can set the transmitter higher.

A range of 50 meters is easy, but 200 meters is not so easy.
Start here to select a transmitter/receiver : Wireless Buying Guide - SparkFun Electronics

nothingClever:
On the receive side I may add a WiFi module and have it notify me via text/email.

You could also use a Raspberry Pi (or BeagleBone Black) on the receiver side: it will be able to send you an email when you've got mail and delete it from your inbox when you retrieve it.

nothingClever:
Additionally this alarm runs off of 3 1.5 LR44 batteries equaling 4.5V… Would the Arduino's 5V kill it?

You can use a 4.5V power source (of your choice) to power both the Arduino (or, better, barebone ATmega) and the alarm.

The real tricky part will be to get a 200m range. Maybe you need zigbees for that or maybe an RF set with big-ass antennas. First thing would be to test your alarm system I reckon.

nothingClever:
I was thinking of using one of those cheap dollar store door alarms. I have a few laying around. I pulled one open today(will post pics later when I can) and I was wondering if I could possibly use it by hijacking the signal it would normally send to the Piezo to detect the mailbox door state. If so what would be a good starting point. Additionally this alarm runs off of 3 1.5 LR44 batteries equaling 4.5V… Would the Arduino's 5V kill it?

The doorbell transmitter is only good for a few yards. 1/8th of a mile (220yds) will be far outside its range.

Thanks for all the responses... This may be a bit trickier than I originally assumed. I did mean 1/8 of a US mile. However its likely closer to around half of that from point to point, rather than the path my driveway and road takes. I'm going to have to look into a better RF solution I think. I initially wanted to keep it as contained in the MB as possible as my mailbox is on a rack with 5 others and the land immediately behind it belongs to a nature preserve. They would not be very happy if an antenna was mounted up on one of their trees... I was looking to keep this as inexpensive as possible(and uncomplicated too) therefore, at this point, a RPI or BBB is probably out. Plus I can think of many other, better, uses for either.

I checked out the SF page that was linked. Ironically the best option looks to be 433Mhz transmitter I was initially considering. Perhaps I could put together a little repeater box at the half way point...

One more thing is there any way to reliably increase Tx power on one of those 433Mhz transmitters?

Also, Bianco, I was thinking of using one of those cheap $5 Chinese modules, ESP8266 I think, that have a really great MC built in with probably enough GPIO to spare. I was going to have the Arduino handle all the above mention receive side functions but I think the ESP could handle all the email/text functions if the arduino can't(though it should as it won't be very busy) Maybe an Electric IMP is an option? Off to do more research I guess.

EDIT: This may be a good RF option: http://www.seeedstudio.com/depot/2KM-Long-Range-RF-link-kits-w-encoder-and-decoder-p-321.html

Hey, nothingClever, we've actually been working on snail mail sensor project for almost 2 years now.
I can't talk about it too much right now, but we're going to kickstarter in 2 months.
It should work up to 500 feet in line of sight and we plan to create a signal extender too (up to 1000 feet).
So hopefully you can wait until March 16th. We plan to make it hackable too.

Arduino187 - can't wait to see it.

I've already made some more changes in the plan. I'd now like to use an UltraSonic module and reed switch to weed out false positives like if someone opened the mailbox just to check. The pinger will determine if something was placed in or removed from the mailbox and will be triggered by the reed switch. Also I was planning a basic weather station so I figured why not put my sensors there! So I'll be adding a BMP180 barometric pressure sensor and a dht11 humidity and temp sensor.

I'd like to have the reed switch at the front of the MB with nano and transmitter to the rear, magnetically attached. I'll then drill a small hole to place an enclosure to hold my weather sensors in the rear exterior as well as either a small whip or Yagi antenna. The batteries may go in the enclosure with the weather sensors for easy access. Also by placing them outside of the box it allows for an easier solar + rechargeable option in the future.

Hi,

No point putting the pressure sensor out there. It will read the same as it does in your house. Minimise the remote sensors to maximise battery life!

Paul

Good point, I haven't given a ton of thought to the power management yet but I know most of that will be implemented in the code and obviously in the final hardware design. I'm hoping 4 AA batteries will last at least 6 months.

Do it step by step please.

First step is to transmit some data.
I suppose the air is not filled with all kind of radio signals near you. So with a good receiver you should receive from a much longer distance than where I live. Keep the receiver away from computers and other electronics if possible.

Another step is battery powered. I prefer a standalone ATmega328P chip at 8MHz or a Pro Mini board (8MHz version) with the voltage regulator removed.
This is about power usage : Gammon Forum : Electronics : Microprocessors : Power saving techniques for microprocessors
And I use this : Google Code Archive - Long-term storage for Google Code Project Hosting.
And I use 3 AA batteries, without voltage regulator. Not 4 batteries.
With 4 batteries, you need the voltage regulator, or perhaps you want to use a complete Arduino Uno board. That will last perhaps a day or so, not a year.

Well I was hoping to use a nano clone, a DCCDuino actually, as I have few laying around. I suppose I could wire up a perfboard using a 328 DIP package. I would have to figure out a way to program it as I only have nanos but from what I've read it should be doable with a nano connected to the right pins on my finished custom board if I were to go that route. I wonder if its possible to down clock a nano. I'll have to look into that. However if I'm working with 3 AA batteries any 5v accessories is out, correct? Forgive my ignorance but as I stated in my first post I am new to this.

Thanks for the BTW there is some great info there. I wonder how much sense it makes to utilize the narcoleptic library as the code posted on the Gammon forum all looks pretty straightforward.

You can use a nano as ISP.

Your RF emitter will likely be able to work under different voltages (3 to 9 for instance) and will accept to work at 4.5. However, you might need to increase the voltage to improve its range. Testing will tell you.

About the chinese WiFi modules, I don't know how they stand (in terms of range and power consumption), I have a little experience with cheap chinese 433 MHz modules only.

Are Zigbees out of the way? I don't like them but they seem to work long distance. Here is Ben Heck's example:

Well I ordered 5 pairs from China for around $4 shipped so I'll see how they work out. I have seen some hacks where others have attached whip and Yagi antennas to them for better results. I still need to look into that a bit more as a could of solid copper wire may work as well but I think there is a formula for determining the length. I don't know all that much about rf but maybe there are some low energy amplifiers out there? I think that would badly damage my power consumption budget though. Either way Ive already bought them, if they don't work out I shouldn't have much difficulty unloading them on eBay.

O no :confused: 5 bad pair together can't make a good one.

I don't use the 433MHz receivers with the coil tuning anymore, only with a crystal. If you have 433MHz transmitter/receivers, at least use a good receiver. Search Ebay for RXB8 for example.
The cheapest transmitters need 12V for maximum power, but others are for 3V...5V and have a good power output at that low voltage.

Peter_n:
I don't use the 433MHz receivers with the coil tuning anymore, only with a crystal.

And you're right. But $4 for a bad pair would be quite expensive.

nothingClever> It would be nice to see a picture of your receiver.

For the antenna, I would advise you not to read anything on the internet (especially not on electronics websites) but to find ham radios locally and create a design with them.

Peter - well they were only $4. They will likely not work for the mentioned application but if they are OK for short range stuff I may find some uses for them. I did find some ZigBee compatible stuff for about $20(trans + recv) so that may be the route I go if possible.

Bianco - I'd like to find some hams locally and when I have some free time I'm going to try to. There are, however, some good articles out there in regards to antennas with all the requisite math and real world tests. I think the ZigBee option you mentioned may be a better option. I don't want a giant Yagi on top of my mailbox. Its strange that those tiny FRS radios can(or claim to) do 5-10 miles. That band is likely restricted for voice use though. RF appears to be a very in depth topic that requires a lot of time to truley learn and understand.

With $4, you can buy a decent pair of Tx and Rx. Of course, some might as well sell you crap at gold price.
That's why we would like to see pics (eBay link) of what you bought. If the description contains the word "superheterodyne", that's a good sign.

I don't know if the NRF24L01 (the one with an actual antenna, not the PCB one) stands the comparison with Zigbees. If you find testing comparing ranges, I'll be interested in reading them.

The analog electronics are a bit of a headache, that's why I was advising you to speak with hams rather than digital tinkerers. They'll have hardware to test your antenna design that will beat any math equation.