Right next to the mail box, will I have a box, with a ESP32 to control the reed and the lock. The box will have a button, that when pressed (or from HA) will unlock the lock for 5 seconds so the door can be opened.
The plan is to use ESPHome. The reed switch I have done before.
But the solenoid lock is new, and I would like some hits. Guess the way to go is with a configuration like this: https://esphome.io/components/switch/gpio.html and the Momentary switch (Activated from the push of the button or from HA GUI).
But the really tricky part, is how to connect the solenoid lock to the ESP32. As I can see, the lock needs 5 volts. So ground to one side of the lock, and then the pin in the ESPHome config to the other side of the lock - guess that is the one with power.
But as I understand, the ESP32 only delivers 3 volts, and the lock needs 5 volts.
So, what do I put between the ‘pin’ and the lock to raise it from 3 to 5 volts.
And is that the way to do it ?
The clean and correct way of doing this is to power the lock separately and use the esp32 with a relay to complete and break the lock circuit.
Not so clean which is dependent on the esp32 board that you have (I’m assuming it’s some form of devkit powered by usb). If so it ‘is’ (with caution) possible to do but depends on variables like the amount of current draw and being careful with your circuit. The 5v line in this example is essentially taken from the usb input
Thanks for responding.
And I can see that I’m missing some info.
Yes - I’m planning on using af ESP32 dev board.
Power - since I also need 5 v for a HC-SR04, I have taken a USB cable and using the 5 v and gnd to power the units. The ESP32 with the VIN/5v pin.
And back to the lock. It needs to be controlled by one of the GPIO pins - and I guess those are only delivering somewhere between 2.8-3.3 v.
Trigger - from the GPIO,
Direct positive - from the USB 5v
com - also the usb 5v (can this one go as low as 5 volts ?)
NC - to the lock (only power when relay is active).
guess the question is - can this relay also pass 5v on the ‘interface’ side, eventhough it says 250v ?