I'm getting really into home automation as a side project of mine and one of the next things I would love to automate is my doorbell.

Short question: If I have a switch (momentary button in the form of an intercom buzzer) of an unknown voltage/current etc. how would I go about allowing the NodeMCU to read whether or not the buzzer has been pressed without risking frying the NodeMCU?

Long question: I plan to hook up my NodeMCU in some way to my intercom system so that when someone buzzes the door, it will send an http request to my Homebridge server which is running homebridge-http-motion-sensor, therefore allowing me to be notified as to when someone is at the door. I am capable of almost everything else including programming the NodeMCU etc. but can't seem to find anything online which tells you how you can get a NodeMCU to detect a switch closure on something not being run off the 3.3V out (i.e. something like this wouldn't work). Is there any sort of hardware out there like a reverse relay sort of thing which would allow me to do this?

If you would like a clearer picture of what I'm talking about; here is a rather poorly made diagram of mine which should allow you to get an idea of what I'm talking about:

nodemcu switch detection

I would really appreciate it if someone could give me some guidance on how to best do this.

Thank you in advance for any help,

Kind regards, John

  • 2
    \$\begingroup\$ First you should make the "Unknown" known. \$\endgroup\$ – Eugene Sh. Jul 26 '18 at 17:58
  • \$\begingroup\$ most intercoms use 12v dc. you can splice into the speaker and use a resistor divider and a diode to supply ~3.3v to the gpio. \$\endgroup\$ – dandavis Jul 26 '18 at 18:38
  • \$\begingroup\$ Since we don't quite know what the voltage range is this may not work but what about using a CC circuit to drive a opto device as seen in the linked answer? electronics.stackexchange.com/a/355166/71683 \$\endgroup\$ – SolveEtCoagula07 Jul 26 '18 at 19:03
  • \$\begingroup\$ @EugeneSh. Thanks for your response. If I were able to find the voltage; just to confirm, would you have recommended doing the same as "dandavis" or is there another possible method? \$\endgroup\$ – John Greeny Jul 26 '18 at 19:04
  • \$\begingroup\$ @dandavis Thank you for your response, that sounds like a relatively low hassle solution; I'll look further into that, thank you \$\endgroup\$ – John Greeny Jul 26 '18 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.