Page 1 of 1

Re: detecting analog doorbell

Posted: Sunday 27 January 2019 19:29
by SweetPants
Try using a (bridge) rectifier and capacitor to convert the AC->DC and use an opto coupler to connect it to your raspberry GPIO.

Re: detecting analog doorbell

Posted: Sunday 27 January 2019 19:58
by l0gic
SweetPants wrote: Sunday 27 January 2019 19:29 Try using a (bridge) rectifier and capacitor to convert the AC->DC and use an opto coupler to connect it to your raspberry GPIO.
I did similar, 8v(ish) ac fully rectified gave me around 12v dc. I used this to operate a relay connected to a MySensors board.
Opto would be just as good, I had a relay in my spares box but no opto's

Been solid as a rock for a few years now.

Re: detecting analog doorbell

Posted: Sunday 27 January 2019 20:48
by l0gic
sander815 wrote: Sunday 27 January 2019 20:26 ok
but why doesn't the xiaomi door sensor(reed switch) pick up the magnetic field?
Just a guess but perhaps the AC changes (50Hz) is too fast for the reed to react.
I tried using a reed switch route originally but couldn't get it to work even if I laid it on the coil.
Hence I went for a bridge rectified relay.

Kevin

Re: detecting analog doorbell

Posted: Monday 28 January 2019 9:53
by freijn
Something like this

instead of GND you can use +5 I prefer using the internal pull up and then to GND

Re: detecting analog doorbell

Posted: Monday 28 January 2019 12:15
by SweetPants
freijn wrote: Monday 28 January 2019 9:53 Something like this

instead of GND you can use +5 I prefer using the internal pull up and then to GND
Maybe add a capacitor over + and -. Now you get a 100Hz signal on your relay