I like to integrate my doorbell, to get push notifications when someone is ringing.
The bell is a simple AC to AC step-down transformer with two buttons and two bells.
I like to run a cable to the Pi and sense the voltage from one of the bells, safely.
Whats the cheapest solution to do this?
I saw some I/O boards and some voltage sensors online, but I don’t have enough experice on electronics to understand which one protects the RasPi in case of an overvoltage.
The best protection is to not connect it at all.
My advice is get an ESP and use that as your messenger.
If that burns then “no harm” done.
As I see it you could either set up a voltage divider and a diode bridge to convert it to DC.
Or depending on position of the bells and general loudness in your house.
Add a microphone and “listen” for the bell.
Interesting idea with the relais, but I think the voltage drop might be too high driving a third “magnet” with these hair-thin wires. Have to test that - thanks!
A microphone isn’t a good idea, too much noise in the background to pick the bell out.
My other idea was to use a Zigbee door/window sensor and place it next to the bell. Since it’s using an electro-magnet it might be enough to be picked up
No need to overengineer things. Why add another RF pathway when you have a wired connection ? It’s just another component that can fail, another battery you have to replace.
Use an optocoupler, like the PC 817 to get galvanic isolation between your doorbell and the Pi. These things are just a few cents each. It protects the output up to 5 kV, so 24 V should be safe
So why was the optocoupler invented?
Many things has happened that is “not possible”, I would rather pay the price of a ESP board than relying on something that is “not possible”.
Oh sorry, I think I missed to write that bit. I just want to use the bistable release to make the signals easier to read. Instead of small pulses I’ll get flips on each button press.
Still going the route with an wireless transmission to the RasPi (:
Notice the section that product is under?
Solid state relays.
Optocoupler is a type of relay.
It’s pointless arguing with you, after all my 20+ years experience as an electrical engineer means nothing. A traditional magnetic relay cannot leak between the coil pins and the switching pins.
Mostly for scenarios like the OP mentioned. To galvanically isolate signal paths with different voltage or ground potentials to avoid damage, ground loops and similar. And that at very high frequencies. Relays are for low frequency switching higher power loads, not data signals. Using a relay is not a good choice for the OPs situation, but well. It’s inevitably going to fail at one point or another, especially the cheap ones.
Never say impossible. Look at the thing the OP found on AliExpress above. We’re talking about the cheapest of cheap, scrapping the bottom of the barrel of bad quality, $0.01 counterfeit relay here. Everything is possible with crap like that. There is no guarantee for appropriate isolation between coil and actuator/contact side. I’ve seen crap relays like that where the coil heated up so much that the internal isolation melted away. That said, with a good high quality relay, leaking between coil and contacts is very unlikely, unless the relay suffered heavy mechanical damage.
Oh and optocouplers are not a type of relay. They’re not a type of solid state relay either. An optocoupler is a type of galvanically isolated transistor. A solid state relay uses MOSFETs or Triacs. It may use an optocoupler as part of its circuit to provide better isolation, but the relay function itself is performed by the MOSFET/Thyristor/Triac part.
Yeah. My point is, that I put constant power to this relais. And just get one wire from behind the switches which goes to the bells to the trigger.
When someone is pressing very shortly on the button the state change is extremely short and then back to normal.
So any sensor needs to have a high sampling rate to make sure to catch the ‘bell press’.
With a flip-flop relay the state change is permanently, and a much slower sampling rate is enough to catch the state change, even when someone presses the bell twice.
I really don’t care about latency here, since it has to go through Wifi and Bluetooth to my smart watch to notify me - which are both much slower
Yeah I know what quality to expect. But since I won’t ever come close to switching 10 A or the voltages this thing is supposed to handle I think I’m pretty safe.
I expect it might fail and thus only connecting stuff wirelessly to it.