ERMEGM
- 19th October 2013, 06:00
Hello,
I currently am using a dual optocoupler to trigger an input on my pic. One LED is set to be a positive trigger while the other is set to be a negative trigger. They both pull one input on my pic to ground.
I am trying to consolidate my components and wires to be just one wire. What I am seeking to do is have a wire that when left unconnected, will do nothing. If either a positive or negative is applied to this wire, then the input it is connected to will be triggered.
I've seen other boards that use an input wire, but in order to select the trigger polarity, you must use jumpers.
Thoughts that I came up with would be to use the AD input and setup a voltage divider and have it connected to the trigger wire through a resistor.
So in essence, the AD input would see one value through the voltage divider. If the trigger wire was applied to ground, theoretically, the AD value would change. If a positive voltage is applied, then the value should change again.
In my head, this seems like it would work. Does anyone see a problem with this, or am I missing something?
Thanks,
Tony
I currently am using a dual optocoupler to trigger an input on my pic. One LED is set to be a positive trigger while the other is set to be a negative trigger. They both pull one input on my pic to ground.
I am trying to consolidate my components and wires to be just one wire. What I am seeking to do is have a wire that when left unconnected, will do nothing. If either a positive or negative is applied to this wire, then the input it is connected to will be triggered.
I've seen other boards that use an input wire, but in order to select the trigger polarity, you must use jumpers.
Thoughts that I came up with would be to use the AD input and setup a voltage divider and have it connected to the trigger wire through a resistor.
So in essence, the AD input would see one value through the voltage divider. If the trigger wire was applied to ground, theoretically, the AD value would change. If a positive voltage is applied, then the value should change again.
In my head, this seems like it would work. Does anyone see a problem with this, or am I missing something?
Thanks,
Tony