Re: detecting analog doorbell
Posted: 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.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.
Just a guess but perhaps the AC changes (50Hz) is too fast for the reed to react.sander815 wrote: Sunday 27 January 2019 20:26 ok
but why doesn't the xiaomi door sensor(reed switch) pick up the magnetic field?
Maybe add a capacitor over + and -. Now you get a 100Hz signal on your relayfreijn 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