Hi,
I'm still new to working with electronic components so please bear with me.
Here's my setup:
On my workbench, when I set my variac to 17V and close the switch, I get a LOW reading on the input pin, which is correct. When I turn off the power, it goes back to HIGH. So far so good.
The problem is when I plug the board into the actual analog machine that runs off 17VAC, when I turn the machine on, the Arduino line goes LOW indicating there is current flow even though the switch is OPEN! When I plug the Arduino back into my test bench, everything works fine; when I turn on the power it reports as HIGH and then when I close the switch it shows LOW.
I have no ideas on how to diagnose the issue. The only difference should be power is coming the machine rather than the variac. Any suggestions would be greatly appreciated. Thanks.
I'm still new to working with electronic components so please bear with me.
Here's my setup:
- I have a 17VAC power line that runs through a switch.
- I'm using an H11AA1 optocoupler to detect voltage/current in the line configured as follows:
- Pin 1 - power through a 1500 ohm resistor (which should produce about 10ma current for the opto)
- Pin 2 - through switch to power ground
- Pin 4 - to Arduino ground
- Pin 5 - to Arduino input
- a .1uF capacitor across pins 4 and 5
- My program configures the input as INPUT_PULLUP so if there's no voltage/current in the line it'll read as HIGH
On my workbench, when I set my variac to 17V and close the switch, I get a LOW reading on the input pin, which is correct. When I turn off the power, it goes back to HIGH. So far so good.
The problem is when I plug the board into the actual analog machine that runs off 17VAC, when I turn the machine on, the Arduino line goes LOW indicating there is current flow even though the switch is OPEN! When I plug the Arduino back into my test bench, everything works fine; when I turn on the power it reports as HIGH and then when I close the switch it shows LOW.
I have no ideas on how to diagnose the issue. The only difference should be power is coming the machine rather than the variac. Any suggestions would be greatly appreciated. Thanks.