Sensor to accurately detect letters in letter box

I have a letter box like this:

And I’m trying to find a way to accurately detect if it currently holds mail or not.

I’ve tried many things, but nothing really works reliably. Just to name a few:

  1. Sensor that detects when the lid is opened
  • False positives when I quickly check for mail by looking through the lid.
  • False positives because the mail man often opens my letter box even if he doesn’t put in any mail.
  1. Laser barrier sensor at the top
  • False positives because sometimes the paper boy shoves a new paper in there and then pulls it out again when he sees the “No newspapers or ads!” sign.
  1. Laser barrier sensor at the bottom
  • False negatives because sometimes a letter or small package gets stuck at the top
  1. Laser barrier sensor beaming from top to bottom
  • False positives because sometimes a small letter ends up on the side where it doesn’t block the beam

Ideally, I would like to have a cheap low power device that scans the letter box whenever it detects vibrations. Maybe this can be done reliably using mmWave?

Has anyone done something like this before?

Paint the inside vantablack and have a couple of light emitter/detector pairs at appropriate angles.

Won’t work because when a package is too long, the lid will stay open.

Ultrasonics?

Tried that as well, but I got a lot of false negatives, when a smaller letter landed next to the sensor instead of in front of it.

ESP32 IR camera? If you want to be really crafty, add a computer vision system to identify non-empty states - https://www.reddit.com/r/esp32/comments/vhjs2f/esp32_camera_with_night_vision/

You’d probably still get some false positives from bugs, etc. on the lens.

If one laser sensor doesn’t cover all angles, then surely adding more would do the job, right?

The day you manage to make it 100% reliable, fail-proof, idiot-proof, water-proof, you’ll find that somebody stole your mailbox…

1 Like

You need a sensor that can detect a letter in the box and then you need to have multiple check for a detection over time.
The multiple checks should solve many of the false positives and laser, ultrasonics, hall or whatever should Matter less then, as long as it is detection of the letter in the box and not the action of putting it in.

Where in the world are you? Maybe you could use this custom integration and skip the mailbox sensor (or augment it)?