Home Hacks: Arduino Mail Waiting Alert

We love a good hardware hack and here’s a great one from Automated Home reader Martin Howell.

A Velleman IR kit plus a makeup mirror and some Arduino jiggery-pokery allows Martin’s home to let him know when there’s something in his mail box on the gatepost.

My mailbox is on the gatepost, and the erratic timing of mail deliveries round these parts means sometimes several trips per day out in the pouring rain to check if there is mail. I built a detector from a Velleman kit to let me know when there was mail in the box, and this is how I did it.

The Velleman kit is an MK120 IR light barrier kit. It creates an infra red barrier, and sets off a squawker when the beam is broken. The kit needs to be soldered together, and for my purposes I needed to modify the kit slightly, as follows:-
  1. Make the infra red LEDs separate from the circuit boards
  2. Remove the squawker and replace it with a bright LED
  3. Also make the device send a signal to my Arduino based monitoring system.
First, the easy part – mounting the circuit boards in a weather-proof box. I had a spare aluminium box left over from another project and simply marked out the position of the holes and drilled and tapped them, then mounted the circuit boards on small plastic spacers to ensure that they couldn’t touch the box.
The wires all come through the bottom of the box, and I put rubber grommets in the holes to seal them from the weather and stop the cables from chafing against the edges of the holes. Once all the holes were drilled, I sprayed the box and lid with satin black from an aerosol can.
In the picture, the green and yellow cables are the feeds to the IR LEDs, the other loose wires feed the LEDs that are fitted into the lid of the box.
To mount the LEDs remotely from the circuit boards I used a short length of coaxial cable (from and old audio lead) for each one. I tried CAT5 twisted pair cables and they were very prone to false alarms, I think because they picked up noise from each other and from the power cable – the coax solved that problem.
The LED end of these cables is exposed to the weather, so I encapsulated the end of the cables and the soldered connections in epoxy resin.
The ‘Mail Waiting’ alert is a bright orange LED that is fixed into the lid of the box (drill a 5mm diameter hole and secure the LED in it with a dab of super glue) with a short length of flexible cable to connect it to the squawker connection on the PCB. Note that a 220 ohm resistor is used to limit the current to the LED, and the LED was selected to give a bright light from around 5 volts – the box sits in direct sunlight most of the day, and a standard brightness LED can’t be seen easily. Keep the unused squawker in your spares box for another day 🙂
To seal the box from the weather I ran a small bead of silicone sealer around the edge of the lid and screwed it down tight. The sealer gets squeezed out of the joint, so the excess needs to be cleaned off before it dries (scrape most of it off with a screwdriver, then scrub it down with a wet cloth)
I feed the device with power from a central 12 volt power supply fitted in my central Arduino box, and a second (green) LED fitted into the lid of the box shows that power is present. This power supply also feeds the water leak detectors in the house. The Velleman kit is designed to run on a 9 volt PP3 battery, but will happily work on 12 volts. When I built the house, I had a duct laid under the driveway to the gatepost and laid both CAT5 cabling and a mains power cable in it, so power is fed to the mailbox via the CAT5. This is not ideal, as the long cable run means that the voltage drops considerably and the 12v at the power supply ends up being around 8v at the mailbox. I plan to modify the power supply to fix that, although the mail detector works fine at this low voltage.
The same CAT5 cable also lets me feed the ‘alert’ signal back to the Arduino so that I can see on a screen in the house if there is mail in the box. I originally tried just using the raw output from the squawker connections, but could not get the Arduino to reliably read it, then realised that this was because the power supply is separate from the Arduino – instead, I use the squawker output to fire a small 5 volt relay which switches a connection between the Arduino’s own 5v power rail and the data pin which monitors the mailbox status. Works a treat, although the low voltage sometimes makes the relay chatter instead of latching solidly.
My mailbox is a simple tin affair with an opening door at the front. I mounted the LEDs into some short plastic tubes glued to an aluminium plate across the back of the box, and angled in towards each other at around 45 degrees.
 
A cheap make-up mirror is fixed to the inside of the door with double sided tape and reflects the beam when the door is closed. Drop a letter into the box and the beam is interrupted and the warning light comes on. Hooray!  It works fine, I just need to jack up the power a little so that the relay latches reliably. No more abortive trips in the rain out to the gatepost for me!

UPDATE– A quick follow up on this following an investigation today into the power issues and some mods to cure some erratic operation over the past week.

First, the power supply was only dishing up around 9 volts which fell to less than 8 by the time it reached the gatepost. Luckily, its a PSU salvaged from an industrial-strength network switch, and the output is adjustable with a small potentiometer, so a quick twiddle and voila! around 12 volts at the gate.
 
Still erratic in operation though 🙁 A bit more research later and I think I’ve found the cause. The Vellemann kit is designed to run off a couple of 9 volt PP3 batteries, one each for the transmitter and the receiver, and their web site/forum says that its OK to run the whole shebang at 12 volts. However, I discovered that if I drop the power to 9 volts on the receiver and leave it at 12 on the transmitter the instability goes away – no idea why, and finding out is well beyond my electronics knowledge. I’ve added a simple 9 volt regulator in the box and all seems well.
Just as well, as Mrs Grizzly was getting increasingly ticked off by trekking out to the gate to find the box was empty – a bit ironic, as when I announced I was going to make this gadget I got the standard roll of eyes and ‘what on earth for??….’ 🙂
 

No products found.

Republished with Kind Permission of grizzly-grizzlysblog.blogspot.com

Last update on 2024-03-29 / Affiliate links / Images from Amazon Product Advertising API

7 Comments on "Home Hacks: Arduino Mail Waiting Alert"

  1. Could you share some pictures of your arduino & display ?. I have completed some projects with Arduino’s and think they are fantastic for home automaton. I am currently following the progress of the Uk developed Nanode £25 with Ethernet port. Thanks

  2. Great idea, how much does this project cost for you? and what about infinite numbers?
    what is arduino

  3. http://www.arduino.cc/ Extract from the website :- Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software.

    I found the best source for inspiration was http://www.youtube.com search for Arduino clock, Arduino lcd display, Arduino relay, Arduino Rfid etc. I started wanting to make an Rfid operated relay, Loads of helpful people on the Forum http://arduino.cc/forum/ and I found loads of example code to get me started.

    As mentioned I hope the nanode takes off is low cost and an ideal building block for Diy home automation http://nanode.eu/

  4. The arduino is rack-mounted in a box in my ‘server room’ (the cupboard next to the bathroom), I will try to organise some pictures, there is one on my blog which shows the outside of the enclosure. The arduino display is only 16 x 2 and its not big enough to show all the information I need, so I have knocked up a VB program which just shows the condition of the external doors, internal and external air temperatures and the status of the mailbox. My plan is to extend this to include a couple of water leak detectors and to make it web-based for access from a couple of old Ameo devices that I have.

  5. The Vellemann kit costs around £10 from Maplin and other places in the UK. Arduino is a cheap open source microprocessor, available from many places – see their web site at http://www.arduino.cc

  6. Might be an idea to use something like this item on ebay 180761170472

    “Adjustable Infrared Sensor Switch is a set of transmitter and receiver in one of the photoelectric switch sensor”

    Just thinking of size & packaging

  7. Or if you already have a rfxcom, get a visonic door sensor and attach it to any part that moves ones the mailmen is there.

Leave a Reply

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