Mail Box Monitor


When I had the house and garages built, I ran a conduit from my mailbox to the house to allow the future addition of a wired mail box monitor.  I finally decided that the time had come!

I often make a number of trips out to the mailbox to get my mail, only to find it has not yet come.  A friend of mine bought a wireless monitor which sounds a musical alarm when it detects a certain level of vibration in the mailbox.  This is good, but has some limitations.  It sometimes sets off the alarm when a neighbor opens or closes their box.  (They have an area box with multiple boxes on one stand.).  Also, sometimes it fails to sound when there truly is a delivery to the box.  I believe they have an indicator that shows if the alarm has sounded, so if they do not hear it, they can still tell if it activated.  I wanted at least the reliable equivalent of this.

For my alarm, I thought of a variety of ways to detect the mail's arrival:  Several were: 
  1) A weight detector on the mail box floor 
  2) An optical detector that would sense the presence of mail
  3) A switch that detected the door being opened
  4) A vibration sensor similar to my friend's

There were several other more off-the-wall ideas also.  I decided that to start, the most practical system would be to sense when the door was opened.

After evaluating several techniques to sense the position of the door, I bought a door/ window alarm sensor switch from Radio Shack.  This consists of a powerfull magnet in a plastic housing, and a reed switch in another plastic housing.  When the gap between the properly aligned sensors is less than an inch, the circuit is closed.  When the gap is greater than that, it is open.

I initially discovered that mounting the magnet and switch directly to my steel mailbox and door reduced the sensitivity to less than 1/4 inch, so I re-mounted the magnet on a small piece of 3/8 thick aluminum and mounted that to the door.  This isolated the magnet from the door steel, and also allowed me to align it with the reed switch better.
 
 

This shows the reed switch inside the mailbox and the magnet on the aluminum plate on the door.  (It also shows my trash barrel waiting to be brought back to the garage.)

The wiring from the switch goes back a few inches inside the box, then through the wall to the inside of the stone faced structure, then down to where the conduit comes up through the concrete base slab..

I did not remember whether I had merely run the conduit before the driveway was poured, or whether I had been smart and also run the wire in it.  Of course I found I had only run the conduit.  Actually the "conduit" I had run was really a length of 1/2 inch plastic drip irrigation feed hose, and of course it had kinked somewhat in a couple of locations.  After fussing with my electrician' fish tape and the wire for well over an hour, and making numerous crawling trips under the house to where the conduit came out, I had a wire run from the mailbox to my patch panel in the garage where I connect all my computer network, TV, and telephone wires.  I plugged this cable into my network panel connection to the utility room and verified my connection there.  All was OK.  Now I had a make or break circuit located where I want the alarm to be, that tells me if my mailbox door is open or closed.  All I have to do now is design and build a quality alarm.
 
 

This is my "patch panel" in the garage.

The top strip is the network connection panel, below that is my TV connection area.  The bottom section is the telephone punch boards.

The shelf in the upper-left corner holds my cable modem, my Internet phone box, and my wireless router.

The Mailbox switch is connected to the network strip with the long blue wire.  The connections I used were two conductors in the cable that the CAT-5 network does not use.  This prevents any possibility of a conflict if a network device is accidentally connected to the mail box switch.

I decided to use another LCDX module like I used for my motorhome tank level monitor.  This is a 4 line LCD display with a BasicX microprocessor, RAM, EEPROM, and a number of inputs and outputs.  It is a bit of over-kill for this project, but at $80 it saves me a LOT of custom building.

I added a jumper that converted one of the voltage inputs into a 0 to 10,000 ohm resistance input and I connected my switch there.  If the resistance is at or over 250 ohms, the door is read as open, if less than 250 ohms, it is closed.  So far, my implementation is in the form of my LCDX breadboard setup.  This is an LCDX panel monuted to a board with a keypad, and terminal strips for all the input/output connections.  After complete checkout I will mount my other LCDX panel in a small case which mounts on my cabinets.

I then proceeded to write a program that would use the time the door was opened and display it as how long ago it was last opened.

I started with my tank level monitor program, kept the menu structure and a few utility routines and deleted the rest of the code.  I then wrote the code needed to time and display the duration since the last door closed-to-open transition.

I initially had a little trouble with the timing routines which used year, month, day, hour, minute, and second, and eventually re-wrote it to use the seconds since midnight timer.  When I see that the timer has reset to a low number (midnight), I add 24 hours to the total time.  This seems to work, and with the variable types I have selected should give me a maximum duration of just over 22 days.  I hope I never skip my mail for that long!
 

 

This is my completed, installed monitor.  Of course it is still in the form of my LCDX breadboard.  My final configuration will be a small case with just the LCDX module in it.

The blue cable at the top is plugged into the network cable to which the mail box switch is connected.

This is the normal display.  The "6690" at the end of the 2nd line is a count of displays (every 10 seconds) I have temporarily left as a debug tool.

During the course of developement, I added several additional functions: 

If I hit the DOWN arrow key, it displays the times since the 2nd, 3rd, 4th, and 5th last times the door was open.  Of course the main display shows the time to the most recent opening.  These extra times help assure me that no one has opened the box other than the mailman. or at least that the box was only opened once since I last accessed it. 

New menu items let me look at the raw minutes in this history log, and to set the running timer to 10 times real time.  This helps me troubleshoot various functions without having to wait nearly as long. 

I also added an audible alarm that gives a warbling tone for several seconds when the door is first opened.  There is a menu item to turn this on or off.
 

 

By pressing the DOWN key, you see this display of the times to the last 4 openings before the main displayed one.  This can assure the box was not opened when you were not expecting it to be.

I suppose I really should do a better job of formatting this display, so all the columns line up!.

So far, the alarm has functioned flawlessly.  It has always properly shown me how long it is since the door was last opened, and I have yet to make an unnecessary trip to the mailbox.

Update of 9/20/07
I finally made the case for my monitor and mounted it on the wall.

I used one of the interim oak mounting frames I had made for the motorhome tank monitor project.  This was a double frame which I sawed down to a single frame.  I then did the cardinal sin of cabinet making:  I painted my beautiful oak frame!

I made an aluminum front panel similar to, but less complex than my motorhome tank monitor.  After making another push button circuit board, again like the one in the tank monitor, and painting the front panel, It all went together quite easily.

I printed a front panel on white paper, laminated it in plastic, and attached it to the front panel with double sided tape.  That completed my monitor.
 

The final monitor hangs on a picture hook on the utility room wall.  It has all the functionality of the breadboard model, but is much smaller and off the counter.

Update of 10/2/2009

Since I installed the whole house fan, I have felt I should have a timer for it.  As I  never got around to buying and installing one, I had a thought!  My mailbox monitor is a fairly powerful computer based controller, which is doing very little in the way of using the power built into it.  I decided to add a fan timer function to it.

I actually had to add very little additional code to add this function.  I had to write modules to input my desired setting, a few lines of code to actually do the timing, and several new display screens.  I also had to add a relay to actually switch the fan on or off.  I used the 2 remaining spare wires of the Cat-5 cable to connect this relay to the fan switch.  The connector for the Cat-5 cable and the fan switch are only a few inches apart, with no wall stud between them, so the wiring was simple.

To start the fan function, I press the UP key.  This takes me into a time selection screen.  In setting the time, the UP key increments the run time in 1 hour steps.  The DOWN key decreases it in 15 minute steps.  Hitting ENTER sets the timer to the selected time and starts the fan, which then continues to run for the set time.


The normal display has been changed to allow the 4th line to be dedicated to the fan operation.

Here is the normal display when the fan is not running.

After pressing the UP key, the data input screen appears for setting the fan run time.  The UP key increments the time by 1.0 hours and the DOWN key decrements it by 1/4 hour increments.  (The odd time shown is the result of re-entering the setup screen after the timer had started running.)

Pressing Enter sets the timer to the displayed time and starts the fan.

When the fan is running on the timer, the 4th line displays the remaining run time.  Once the time is down to 1 hour, the display shows minutes remaining, at one minute the display merely says < 1 minute remaining.  I did this as the default display changes to scientific notation for small numbers and gave really strange readings when truncated to 3 digits and a decimal.

To stop the fan early, you enter the time set screen and set the time to 0.

Update of 5/1/11

Last season I had several occasions where I wished I could set the timer for more than 10 hours.  Also, on the few times I have wanted to shut off the running fan, I found it somewhat awkward to continually decrement the time by 15 minutes to clear the timer.  I decided to correct these two factors.

With a very small software modification, I increased the maximum time to 16 hours, and wrote a routine which senses a double-press of the down button while in the time setting mode.  This clears the fan timer.

<BACK>


Dick Mason, Prescott, AZ 8/31/06