Introduction: Arduino Snail Mail Notifier

My mailbox is across the street from my house because our mailmen don't walk door-to-door, so I never know when the mail is delivered. Sometimes, I'm waiting for something and I'd really like to know when it arrives. I got my first Arduino last week, and thought it might be a neat toy project to build a notifier that would tell me when the mail is delivered.

It's designed to live inside the mailbox (I have a big one) and detect changes in the ambient light level. When the mailbox is opened, it triggers a wireless doorbell transmitter, ringing the house's doorbell and letting me know the mail's there.

Step 1: Get the Stuff.

Things you'll need:
-Arduino (I used an Uno)
-9V battery pack
-Breadboard/Prototyping shield
-Wireless doorbell transmitter
-Transistor (I used an IRF510 MOSFET from RadioShack)

not pictured:
-10k resistor
-jumper wires for breadboard

Step 2: Disassemble the Transmitter.

Take the back cover off the transmitter. Remove the battery and any screws holding the board in the unit. Your transmitter may look a little different than mine does.

Remove the board from the enclosure.

Step 3: Remove the Switch.

Power up your soldering iron and break out the solder sucker and wick. Remove the switch from the back of the board.

Note which terminals on the switch were connected where. That's important for the next step.

Step 4: Install a Jumper and New Leads.

On my unit, the switch, when depressed, connected the negative battery terminal to the rest of the circuit, causing the transmitter to send a signal. Since I took the switch out, the transmitter won't fire until we give it a new means to close the circuit.

Solder one wire onto the solder point connected to the negative battery terminal. In the photo above, that's the black lead.

Strip enough wire to connect the other two points formerly connected by the switch (on my transmitter, only three points connected to anything — the two shown soldered together above and the negative battery terminal). Solder the end of the wire to the first terminal, then solder it to the second terminal. Then carefully bend the wire so that it more or less follows the other lead you soldered on.

Now, instead of a switch, the transmitter can be triggered by connecting the two leads you just soldered onto the board.

Step 5: Hook Up the Circuit.

Using a prototyping shield or a breadboard, build the circuit.

One leg of the photoresistor is connected to analog pin 0 (yellow jumper) and to ground, with a 10k resistor in between. Its other leg is connected to 5V.

The gate leg of the transistor is connected to digital pin 5 (white jumper). The other two legs form a circuit with the transmitter (red and blue jumpers). That circuit is also connected to the arduino's ground. UPDATE: As described, the circuit would sometimes continuously trigger the bell. Adding a 10k resistor between the transmitter circuit and ground (in place of the direct GND) corrected the problem.

Step 6: Upload the Program.

Put the following program into your Arduino IDE and upload it to your board (UPDATED to correct some cases of continual signaling).

Put the battery back in the transmitter and test the circuit. If everything works, disconnect the device from USB.

/* Trigger a transistor based on the light level measured by the photoresistor

Connect the photoresistor one leg to pin 0, and pin to +5V
Connect a resistor (around 10k is a good value, higher
values gives higher readings) from pin 0 to GND.


PhotoR 10K
+5 o---///--.--///---o GND
Pin 0 o-----------


Connect digital pin 5 to the gate of a transistor.
Connect the drain leg of the transistor to GND and to the ground leg of the circuit being switched.
Connect the source leg of the transistor to the other leg of the circuit being switched.
The circuit being switched must have its own power supply.


int lightPin = 0; //define a pin for Photoresistor
int outPin = 5; //define a pin for transistor gate

void setup()
Serial.begin(9600); //Begin serial communcation (for diagnostics)
pinMode(outPin, OUTPUT);
digitalWrite(outPin, LOW); //Close the gate

void loop()
int currentLight = analogRead(lightPin); //the current reading from the photoresistor
Serial.println(currentLight); //Write the value of the photoresistor to the serial monitor.
if(currentLight > 400){
digitalWrite(outPin, HIGH); //Hit the bell
digitalWrite(outPin, LOW); //Turn the gate back off
delay(4000); //Wait so you don't trigger again for the same light event
delay(100); //wait before checking light level again (but not too long or you might miss it!)

Step 7: Connect the Battery Pack.

Connect your 9V battery pack and install the device in its service location!

Step 8: Improvements?

Things that would make this project better:
-Maybe replace Arduino with an ATtiny chip
-Powering transmitter from Arduino (have to step up voltage to 12V) instead of second battery