I have a classical doorbell (with transformer) that I would like to connect to the “internet”.
The idea is when someone rings at my door that this sends an MQTT message to my MQTT broker (or alternatively communicates this to my home assistant)
The requirements are:
existing doorbell system should be kept.
can be installed with a minimum of changes.
As solution I was thinking of detecting the current using a current sensor.
This current sensor is then connected to an ESP8266 NodeMCU (or other cheap device) that will detect increase in current when doorbell rings and publishes an MQTT message to my MQTT broker.
Here below a picture of my transformer showing the wires that can be used to measure current.
What you’re looking at needs a permanent power supply. Can you not use the voltage across the bell, as switched by the bell push? Use that to power your ESP (with a suitable rectifier and regulator of course, because the voltage across the bell is likely to be “interesting” and certainly not a nice sine wave - much the same as the current would be) and on power-up your ESP would automatically send the message?
or you could redirect the door button to the esp and on the esp have it send the mqtt and trigger a relay to ring the doorbell when the button is pressed … say using wemos r2 mini and a relay then you have lots of accessible gpio say if you want to put in reed switch to also know when the door is opened as well
That is another alternative solution - thanks for sharing.
The problem with that is that a big part of the low voltage cabling is unaccessible (behind the wall) - this includes the part going from my doorbell to the transformer. So this option is not that easy in my case.
I told you the second part - with a rectifier and regulated power supply. If you have a suitably large smoothing capacitor after the rectifier, it will store enough charge to run everything for long enough. I don’t have an ESP so I don’t know how long it might take to start up, it should not be long.
You only need access to the wires to the bell, somewhere between the transformer and the bell itself. The doorbell circuit has three components and three wires connecting them. Usually, you have one of these configurations: (1) a twin wire from transformer to bell push, a twin wire from transformer to bell, and one wire from each joined together at the transformer; or (2) a twin wire from transformer to bell, a twin wire from bell to bell push, and the join made at the bell. If it’s (2) that you have and you do not have space in or behind the bell, then it looks as if you do need to measure the current.
There are several things to be aware of if you do decide to use the bell transformer to power your EPS.
The transformer regulation - the ratio of voltage full load to no-load, is likely to be quite large.
If you have a “trembler bell” - one where the current energises an electro-magnet that attracts an armature to strike the bell, but also breaks the circuit - then you must be aware that there will be a high voltage spike appear across the coil at the instant the contact part, so those will need to be suppressed.
You will need to take the voltage switched by the bell push, rectify it, and charge a large smoothing capacitor that will store enough energy to power the ESP while it sends the message, and a regulator to give a smooth constant 3.3 V to operate the ESP8266. If you don’t need the full output power, it looks as if it will need about 120 mA for maybe a second or two while it starts up and sends a message - that includes the time the visitor’s finger was on the button. As I’ve said, I don’t have an ESP8266 so I’m guessing it won’t need the stored power to last for more than a few hundred milliseconds while it sends the message.
That’s the general outline. You must measure the transformer voltage - it almost certainly will not be exactly the 3, 5 or 8 V printed on it, then you will work from there. When the bell is not ringing, you might have 12 V or maybe even more on the transformer terminals, that would give a voltage on the capacitor of about 17 V, so you will need a 3.3 V regulator that can give you the required current for the ESP - say 200 mA, and will withstand at least 17 V on the input and has a power rating of about 2.5 W, this is a switched-mode module that looks suitable.
. I can also provide the code for the ESP01 if required. As I already had a handy 12v supply outside close to the bell push I just mounted it all in an IP65 weatherproof box next to the front door and have no problems connecting to my WiFi through the door/wall.