For several years, I have wanted to make a mailbox monitoring system, so I wouldn't have to walk out to the mailbox in bad weather, etc., only to find the mailbox was empty! When a boat on a runaway trailer took out my mailbox, I figured the time was right. The reason my mailbox is "sleepy", is that it spends nearly all of it's time in a power-down sleep mode. I have utilized the lowest power sleep mode available, to maximize battery charge life. When no mail is present, mailbox is in sleep mode 100% of the time, and requires an input from interrupt to wake up. When mail is in the mailbox, it wakes up just long enough to flash the status LEDs for 0.1 seconds, check if door is open, and check battery voltage. It then goes back to sleep for 2 seconds, resulting in 94% time in sleep mode when mail is present. Overall, the time spent in power down sleep mode is probably on the order of 98~99%!
Note: as an added feature, if battery voltage falls below 6.2 volts, Status will flash 3 times quickly as mail indication, instead of just once, indicating battery charge needed.
This system uses a photo-transistor to detect door open state on the street side, for when the mail carrier deposits mail. A set of LEDs salvaged from a cheap LED light, and a photo-resistor are used to sense the presence of mail. 2 Red status LEDs mounted on the rear of the mailbox display the presence of mail, and are also used to blink results in any of the 3 test modes incorporated. One allows checking of battery voltage, and the other 2 monitor the photo transistor reading, for calibration and testing.
The Illuminator LEDs are powered by a small adjustable DC-DC converter that is adjusted for the correct brightness for mail detection. The output from the LEDs is intentionally made quite low, as they are extremely bright at full power, which is not needed. This output adjustment is made just by adjusting the output voltage of the DC-DC convertor. The specific converter I chose was selected because it was controlled by a LM2596 adjustable buck regulator IC. Pin 5 of this IC is a control pin, grounding pin turns on converter, pulling this pin high turns it off. I simply unsoldered the control pin (pin 5) of the IC on the DC-DC converter, bent it up so it was not connected to the pad, and wired it directly to the output pin of the Arduino Nano, digital pin 2.
The software incorporates extensive use of the Power Down Sleep Mode, to conserve battery power. If no mail is present, the Arduino enters the power down state, with no timeout, requiring input via interrupt from the photo-transistor door sensor to wake up. Mail presence is checked as follows: When the street side door is closed, testing is initiated, turning the LED illumination inside the mailbox on. The photo-resistor is then checked to see if light is increased from the empty box value. If so, mail is detected, and the status LED blinks once, then Power Down Sleep Mode is entered, with a 2 second timeout, and then the Loop repeats, flashing the LED every 2 seconds. If the rear door is opened, with mail present, the photo-resistor senses the increased light, and initiates the mail check again after the door is closed, to ensure the mail was removed from the box. As an added feature, if battery voltage falls below 6.2 volts, the status indicator will blink 3 times fast, instead of just once, to indicate the presence of mail, and alert the user that battery needs charging.
The test modes are initiated by first putting a piece of paper, etc in mailbox, and closing door, putting it in a mail-present state. The door is then opened again, and the photo RESISTOR covered for about 10 seconds, (while not obstructing the photo transistor) putting the unit into test mode. 1st test mode blinks battery voltage on the LEDs. Other 2 monitor the photo resistor value, one with the LED illumination off, and the other with it on. All test modes timeout after 1 minute, and unit returns to normal operation mode.
The LED illumination light came from a common LED flip light, available at many locations. I disassembled it, and kept the LEDs and left them attached to the reflector assembly, which became the circuit board mount/LED illuminator. The phototransistor is mounted on the front edge of the reflector, pointing out of the mailbox. The photo resistor is mounted in the middle of the circuit board, which is then mounted on the reflector frame so the photo resistor points down, through the center hole of the reflector.
Batteries and wiring are all located in the hollow area between top of mailbox interior and exterior. A 3" x 3" access hole was cut near the rear door of the mailbox, on the inside, for battery maintenance/replacement. Eventually, solar charging will be implemented.
















Comments