I have tried to detect an AC connection using just a diode resistor and a capacitor. I am not trying to detect zero crossing. i would just like to return true or false.
The issue i have is that the LED of the optocoupler remains on. when i measure the voltage coming from the switch it return 33V eventhough the switch is open. removing the switch connection turns the led off.
Not having experience with AC i am inclined to think that i should connect a 10K pull down resistor across the switch output and neutral since there is a large length of cable between the switch and diode +-1m- much in the same way you pull down a mosfet gate.
Is this logic correct and safe?
The issue i have is that the LED of the optocoupler remains on. when i measure the voltage coming from the switch it return 33V eventhough the switch is open. removing the switch connection turns the led off.
Not having experience with AC i am inclined to think that i should connect a 10K pull down resistor across the switch output and neutral since there is a large length of cable between the switch and diode +-1m- much in the same way you pull down a mosfet gate.
Is this logic correct and safe?
Attachments
-
11.8 KB Views: 24