#Smart mailbox - Tells me when I have mail

67 messages · Page 1 of 1 (latest)

mighty vigil
#

I made a more detailed post about this over on lemmy.world, but I might as well show a couple pictures here too.

slow pumice
#

Everytime I see these mailbox projects, I always think to myself, "I can't be the only one who gets mail almost every damn day and don't need a sensor to tell me crap is in there" Do you not get mail pretty much daily too?

round spoke
#

We get an email each day telling us what we’ll get in the mail, and motion sensing camera to let us know when mail arrives. TBH if we didn’t have both of those, something like this would be perfect!

long fern
celest holly
mighty vigil
mighty vigil
long fern
mighty vigil
#

If you have trouble I could try and draw something out from scratch.

mighty vigil
#

I did use much higher valued resistors, though.

#

Since even now I think it loses more charge through the voltage divider than powering the SoC or sensors.

lusty bloom
#

You should be able to connect the GND side of the divider to a GPIO, then you can turn it on when you want to measure it.

mighty vigil
#

Looks like I used a R1 of 360 kOhm and a R2 of 1 MOhm

mighty vigil
lusty bloom
#

The safer method would be a mosfet on the battery line since you're slightly over-volting the input, but it should be fine.

mighty vigil
#

Analogue electronics is not my forte ^^;

mighty vigil
#

I'm pretty sure the max for the analogue input is 3.3v and the divided voltage should max at less than 3.1v

lusty bloom
#

At least the original ESP32 chips are 5V tolerant.

celest holly
#

(I'm interested in doing some solar ESP stuff eventually, but want to make sure I do it right.)

lusty bloom
celest holly
#

Aah I see. That makes sense, thanks!

slow pumice
long fern
celest holly
slow pumice
#

Sounds like someone is just being shy! Don't you worry, they're on the way

long fern
#

@mighty vigil the power supply its not a my problem, I've the intercom near the mailbox, I waiting the VCNL sensors and then I want try to replicate your solution.
I want also add a BME280 to monitoring the external temperature, humidity and pressure.
This is the mailbox usally in use on my country

#

so I can draw current from the intercom power supply and then power the device (with a voltage reduce).

mighty vigil
#

Interesting. My concern would be that my solution works by allowing the mail to land flat on top of the sensors, making it really obvious when there's mail or not. With something like this the mail might land upright and avoid the sensor. You might need to put some on the lower back as well as the bottom, perhaps.

#

Oh that's nice.

#

Oh right, you wanted the circuit diagram.

long fern
#

The mailbox have 2 hole in the back: one up about in 1/4 from top and the other below about 1/4 from bottom.
You use the i2c so you connected the sensors in the same pins of the GPIO of the ESP, right? (example D1 and D2)

mighty vigil
#

So, the VCNL sensors I got both had the same address, which meant I had to put them on different pins for clock and data each.

long fern
#

If I understand right I need to wrote in the code something like that to manage more sensors:

`i2c:

  • id: bus_a
    sda: GPIOXX
    scl: GPIOXX
    scan: true
  • id: bus_b
    sda: GPIOXX
    scl: GPIOXX
    scan: true`
mighty vigil
#

Yes

#
i2c:
  - id: bus_a
    sda: 21
    scl: 22
  - id: bus_b
    sda: 25
    scl: 26

This is what I used

long fern
#

oh ok

mighty vigil
#

Actually, hang on...

#

Now, I've made it sleep frequently to preserve power, but you could probably do a much simpler setup since you have a power source for it.

#

In lieu of a circuit diagram, here's a photo of the underside of the prototype board I used. However everything except the white and blue wires is to do with power delivery and battery level sensing.

#

Basically all that leaves is connecting the 4 GPIO pins to the sensors, 2 each plus power.

#

The white and blue wires connect to this JST connector in the back right, for easy maintenance.

long fern
#

Yes, the sleep isn't necessary to me... but no one place mail in the late evening or in the early morning, so a sleep of check its a good option to evaluate.

mighty vigil
#

I might have an earlier version of the config file around somewhere...

long fern
#

Thanks a lot, I'll update you when my sensor arrive... I need to wait some week. The shipment from Cina to Italy its very long also when you order on some big ecommerce site 😦

mighty vigil
#

Ah yeah, I got most of my parts from aliexpress and it takes a while to get here.

#

I do hope you can find a good sensor position that works for your usecase.

#

The worst case scenario I can think of is if the mail lands vertically on the far side of the sensor. Because then how do you tell the difference between the light hitting the far wall of the mailbox, and the light reflecting off the mail?

#

Perhaps if you can put some dark black matte paint on the opposite side to the sensors? Something that absorbs the light emitted by the proximity sensor so the value for unobstructed is very different from obstructed.

long fern
#

one of the sensors will surely have the letters near it, the problem should be the newspapers of my wife... due the mailbox format.
Embroidery magazines and other monthly magazines have a lot of pages. So the postman folds the magazine and puts it in, but it doesn't go all the way down. It's usually tucked in halfway.
I think and hope that vertically it will be enough for just one sensor to detect presence.

mighty vigil
#

If not, you will need an i2c multiplexer.

#

I don't know how exactly those work with ESPHome, though.

long fern
#

Finally I received the sensor, but I've an error with my ESP8266 device in the last steps of install.

lusty bloom
long fern
#

Hi @mighty vigil, I'm trying my prototype.
Over the weekend I'll do some tests by inserting the sensors into the mailbox, I need to see what the minimum threshold value is to assign.
The depth of my mailbox is different from yours, I want to be sure it doesn't trigger unnecessarily. So if the weather is nice I'll do some tests trying to adjust the threshold too.
I added also a DHT11 to measure external temperature/humidity.

mighty vigil
#

Funny you should mention the ESP8266, someone actually submitted an issue to the VNCL4010 library I made with a similar chip.

#

They ended up swapping to an ESP32 derivative

#

And nice, I look forwards to hearing about your results 🙂

mighty vigil
#

Ahhh, I wondered if it was

gilded adder
#

Add a camera at the top with some imaging and some simple machine learning to decide if the top item is junk mail or not