Here's my proposed schematic:
What I have is a fan in an HVAC system that is controlled by a thermostat. The thermostat may turn the fan on or the HVAC system might turn it on. In either case the voltage across the switch will drop to zero when the fan is on. I want to be able to sense the state of the switch. Obviously I can't steal too much current from the circuit or it will turn the fan on. It will take some tweaking to get the right R1 value. I have no idea what the current draw across the line is, since I don't have an A/C ampmeter. I suspect the current is minimal and just enough to engage a relay.
My question is what value of C1 is reasonable. The output doesn't have to be super clean, but enough to cause the diode to enable the transistor to conduct. I plan on using a PC817 optocoupler, since I have some. I figure R2 needs to be large enough to limit the current to the optoisolator. It is rated for 50 ma. The output may be as high as 35 volts across the cap ( I think) so to limit it to 20 ma requires a resistance of a little less than 2K. I'll probably start there unless someone has a better idea.
What I have is a fan in an HVAC system that is controlled by a thermostat. The thermostat may turn the fan on or the HVAC system might turn it on. In either case the voltage across the switch will drop to zero when the fan is on. I want to be able to sense the state of the switch. Obviously I can't steal too much current from the circuit or it will turn the fan on. It will take some tweaking to get the right R1 value. I have no idea what the current draw across the line is, since I don't have an A/C ampmeter. I suspect the current is minimal and just enough to engage a relay.
My question is what value of C1 is reasonable. The output doesn't have to be super clean, but enough to cause the diode to enable the transistor to conduct. I plan on using a PC817 optocoupler, since I have some. I figure R2 needs to be large enough to limit the current to the optoisolator. It is rated for 50 ma. The output may be as high as 35 volts across the cap ( I think) so to limit it to 20 ma requires a resistance of a little less than 2K. I'll probably start there unless someone has a better idea.