Introduction: The Household Informer

Who wants to go outside to see if the mail has arrived? In the cold winter or rain I’d rather not have to put on a jacket and shoes, only to find that there was no mail. This project will notify you of the mail carrier’s visit, and as a secondary function it will remind you that the garage door has been left open. It can even be expanded to include other sensors

Step 1: Schematic

The project is based on the Atmega 168 chip. Since the design requires only minimal resources, most of the AVR chips would be acceptable substitutes. But having extra resources means adding functionality is easier than a redesign.

The device contains only a minimum number of parts (see schematic) .
The design has two sensors, the Garage door magnetic reed switch, and the Mailbox Light Dependent Resistor (LDR).

Step 2: Design

Garage Door feature
The garage door sensor is a magnetically operated reed switch. The magnet is placed on the garage door and is in close proximity to the reed switch when the door is fully closed. I chose a reed switch since it was easier to accommodate the loose mechanical tolerances of the garage door’s movement.

When the garage door opens, the magnet moves away from the switch. The switch opens which signals the microcontroller to turn on the LED and gives a short beep. This is so simple, you may ask “why bother using a microcontroller when a simple circuit will accomplish the task. But here’s where the power of the microcontroller can be quickly applied to make a more useful device without changing any hardware. What I really wanted was a feature to remind me when I forget to close the door. If the door opens and stays open for an hour, I probably forgot to close it. I may not notice the LED, so at that point it will beep once every 10 minutes to get my attention until I close the door.

Mailbox feature
I used a Light Dependent Resistor (LDR) for the mailbox sensor. Once again I could have used a mechanical switch, but I was concerned with the loose mechanical tolerances of the door hinge. I wasn’t convinced that I could get the switch to operate reliably with a wobbly door. The LDR works great and is easy to install in the back of the mailbox. When the door is closed it reads as a very high resistance - several mega ohms , and about 10K when the door opens – even on an overcast day. If it’s the middle of the night it probably won’t register, but the mail carrier doesn’t come then anyway.

The handling of the mailbox is significantly different from the garage door. The Mailbox is only active for a second or two, but I want to remember that an opening was detected, beep the speaker once and then keep the LED illuminated until I reset it – or it will automatically reset after 8 hours.

Future possibilities
Since there are several more analog and digital pins available on the AT Mega chip, so I could definitely see adding more features to my little project. One idea would be a light beam and LDR sensor mounted on the path to the front door, so I could get advance notice of someone approaching the house. Any suggestions?

Step 3: Project Case and Wiring

I wanted a small case to mount the circuit board, and I found a used surface mount RJ45 Box that is just the right size for my project. I installed the LEDs and the reset button so that they would extend up through the top of the case - this means that the case can be removed without any connecting wires.

This is the unfortunately the most time consuming part – running a pair of wires out to your mailbox may be a bit of a hassle. I would recommend using either a twisted pair or shielded cable. This will reduce any stray electromagnetic fields from causing an induced current in your wiring which would upset the microcontroller. I had a sufficient run of coaxial cable on hand, so that's what I used.

My mailbox is at the end of my driveway - perhaps 40 feet from the house. I was fortunate in that when I had my driveway re-paved, I ran the wire under the concrete before it was poured, so that saved me a lot of digging.

Then there is the matter of the wiring through the house which may also be time consuming.

Hummm.... perhaps a wireless solution...

Step 4: Source Code

Here's the source code - it's short and simple.


.PDE files are Arduino source code files - It's almost identical to 'C'.

You can view the code by downloading and opening in a text editor.

(Updated Feb 14, 2011  Workaround for compiler math bug. and change mailbox tones to ascend in frequency)


Ksw1234 made it!(author)2012-02-23

Love your project. Awsome when people build their own solutions. You seem like a no-nonsene guy and would value your opinion. I know there are dedicated burners, but not sure how those folk prototype. I was thinking of trying an Arudino board for prototyping, and there appears to be a way to use the board to burn the bootloader and later upload the program on a separate AltaMega chip (link below). As there are apparently infinite ways to get started, could you describe your setup for prototyping/burning?
( )

diy_bloke made it!(author)2011-11-27

"Any suggestions?"
The possibilities seem endless:
A humidity sensor to remind you to water the garden
Indicators for other doors/windows you may forget to close
A PIR or an optical interrupter to give advance warning someone is coming up to the house (can double to see if you had any visitors while u were absent)
Switching on/off lights to make potential burglars think you are at home while u r not (switch off the main light downstairs, followed by briefly switching on the light in the bedroom)
A switch alarming you when your daugther is climbing down the pergola at nite to be off with her boyfriend who rides a motorcycle (just referring to a classic theme in american movies)

Just one question: What happened to the custom that mailmen wld push down the flag on yr mailbox to indicate 'you've got mail' :-)

pmounica made it!(author)2011-10-07

can i do it using PIC microconroller

diy_bloke made it!(author)2011-11-27

Yes, you can. You can do it basically with any microcontroller, but You'd have to write your own code, unless you can copy what someone else might have done for you.

I bet somewhere there is a project like this with a PIC controller and a guy asking: "Can I do this with an Atmel?"

jkster107 made it!(author)2011-02-19

I'd like to make something like this, but I'm concerned about the distance to my mailbox (one of those community box things). How long were your wiring runs? And have you run into any interference issues using the coaxial line as signal line?

I don't have good line of sight for wireless communication either, which makes me sad, since a small wireless sensor would probably be less suspicious then running a wire up to the back of a community mailbox.

BrianH made it!(author)2011-02-21

I ran about 40 feet of coax from the house, under the driveway to the mailbox. Inside the house there is perhaps another 40 feet of twisted pair to get to my office. I'm not a big fan of wireless since there is always the possibility of RF interference.
I've had no false triggering due to noise with the wired solution. The readings from the LDR are relatively stable. In a test version of the project, I had the readings from the sensor displayed on a LCD. This was how I decided on the threshold value.

Perhaps you might want to try a combination of wired and wireless.
Run a wire where you can, and wireless for the rest of the way.

placko made it!(author)2011-02-18

Why are there 5 wires coming out of the enclosure? shouldn't there only be 4? (2 for reed switch, 2 for LDR)

BrianH made it!(author)2011-02-18

The power also comes in on this connector, and used a common ground.
I get the power from my doorbell transformer which is rectified, filtered and reduced to about 7 volts before it enters my little box. Once in the box, it is regulated down to 5v.

Actually the connector has one more unused pin, I may use this for another input in the future. I've learned to leave room for expandability during the design - it makes upgrading easier in the future.

scottinnh made it!(author)2011-02-18

You could use some cheap wireless daughterboards and save yourself a lot of wiring:

I don't get why these things are not more popular... people always think wireless is expensive, requiring ZigBee or 802.11..

Hope this reminder helps someone. :-)

About This Instructable




More by BrianH:Car Podcast downloader and playerThe Household InformerRechargeable Battery Capacity Tester
Add instructable to: