There is switch inside a commercial gate operator that I need to monitor with my RasPi.
The switch has two ~18 AWG wires, when the switch it closed, it's 50V AC connection. When the switch is open, there is not current. I believe it's a reed switch, and I believe the current/amps are very low on account of the small gauge of wire.
I need a binary output that I can read with the GPIO on the RasPi, however I'm not going to connect 50V AC directly to a GPIO. I am happy to splice into the switch lines and/or solder together a simple circuit if needed. Ideally someone has already solved this, and I can purchase a ready made solution.
I have done some searching and suspect I might be able to wrap a wire around the AC line to induce a small charger that could trip a transistor, however I'm suspect there may not be enough current for this to work? I suspect I made need an ADC to read that kind of sensor. I'm no electrical engineer and could use some help.
Any suggestions or ideas?
From my research, this is the most relevant guide I could find: https://hackaday.com/2021/01/04/simple-ac-current-detector-built-on-a-9-volt/
Although I don't require a contactless solution, it just appeared easier than using a AC/DC transformer and then a voltage splitter to get down to ~3v
In summary, how can my RasPi know, if there is current on the wire or not.
For future reference, I used the following guides: https://www.instructables.com/LED-on-AC-Mains/ https://peppe8o.com/using-photoresistor-from-raspberry-pi-to-detect-light/
– RockWest Jun 23 '21 at 22:18https://www.allegromicro.com/-/media/files/datasheets/acs712-datasheet.ashx,
(2) Rpi Current Sensing Using ACS712 and INA219 - Rpi SE, Asked 2019feb20, Viewed 7k times: https://raspberrypi.stackexchange.com/questions/94403/rpi-current-sensing-using-acs712-and-ina219. Cheers.
– tlfong01 Jun 24 '21 at 05:11