-1

I'm trying to connect the signal from a doorbell to a Raspberry Pi Zero 2W to modernize the existing system with IoT capabilities. I did some measurements and I found that the terminal that powers the indoor unit changes from 0 V to 13.3 V DC when the doorbell button of the outdoor unit is pressed.

Since I plan to use the same power supply of the doorbell to power the Pi (using a 5V buck converter with a 2.5 A output current rating, but that's another matter), GND would be common to both devices. Searching for best practices to adapt the signal to the Pi's 3.3V logic, I came across this great answer:

GPIO level shifting diagram

So, I have two questions regarding the circuit above:

1) In case of an overvoltage transient, I understand the diode D1 starts to conduct and sources the current to the 3.3V rail while clamping the voltage. Do I have to disable the internal pull-up resistor from the GPIO pin for this protection to work properly?

2) With the given values for R1 and R2, the voltage divider would heat quite a bit when the doorbell is ON (roughly 190 mW power being dissipated by R1), is it OK to change the values to 6.8k and 1.2k ohms, or that would be detrimental to the overvoltage protection discussed above (higher series resistance)?

Finally, I'd like to add that the wiring between the doorbell's outdoor and indoor units is around 20m long, but it's done over a UTP cable.

Thanks a lot in advance.


EDIT: Here's a diagram of what I'm trying to do. The green box is the one that's related to the questions of this post.

Full circuit schematic

Seamus
  • 21,900
  • 3
  • 33
  • 70
  • I am the author of the post you linked but you have taken this out of context (which was an automotive environment with unlimited power). It is unlikely to work; indeed your doorbell is unlikely to have sufficient capacity to power a Pi. You also ignored the warnings included in my answer. – Milliways Feb 20 '24 at 10:16
  • @Milliways Hi, first of all thanks for passing by! I'm sorry if my post wasn't clear enough. I'm not trying to power the Pi directly through the indoor units terminals. The point of the connection of the post is to sense when the doorbell is active/ringing with the Pi. The power is supplied by another circuit but using the same power supply that powers the doorbell, since it has a lot of spare room to do so. (13.5V 2A, and the doorbell only uses 10W while fully ON as said in the manual). – SierraJuliettMike Feb 20 '24 at 10:27

1 Answers1

1

The interface below is cheaper and safer than the one you've selected. The Zener is readily available through distribution at a cost of less than USD$0.23.

You should not enable the pullup for this circuit (or the other one).

Taking the 13.3V doorbell signal you gave as input, the power dissipation for this circuit is:

P = V2/R + Vz x Iz
P = [(13.3 - 3.3)2/1000] + [3.3 x ((13.3-3.3)/1000)]
P = .1 + .033
P = .133 watts; 133mW

Alternatively, you may safely increase the size of R1 to 2.2K, and reduce that even further; I leave the calculations to you. But remember, this dissipation is only for the duration that the doorbell is pushed. :)

schematic

simulate this circuit – Schematic created using CircuitLab

Other Notes:

  1. The UTP cable should be fine. If the doorbell button is connected to some sort of inductive device (solenoid, etc); i.e. something that might put an indictive "kick" on the line, you may want to add a small ceramic capacitor (0.1u) across the doorbell wiring.

  2. You shouldn't need a 2.5 amp buck converter to power the Pi 2W. It consumes approx 350 mA at idle. OTOH, the "overkill" of the larger converter won't hurt a thing.

Seamus
  • 21,900
  • 3
  • 33
  • 70
  • Thanks a lot for your answer! Just for the sake of curiosity, in which way would you say that relying on the zener's line regulation is safer than a fixed voltage divider AND a zener/diode? – SierraJuliettMike Feb 20 '24 at 17:45
  • @SierraJuliettMike: If your input voltage increases above 13.3 V. The Zener remains at 3.3, but the voltage divider increases proportionally. – Seamus Feb 20 '24 at 22:37