I have this circuit built. Basically I am clamping on to a switch in an existing system as a signal to turn something, in this case an LED, on and off.
In this diagram, the microcontroller is the load. With the switch closed, it's almost a short so the led in the optocoupler turns off when the switch is closed and turns on when the switch is open.
The LED on the 12v line is on when the switch is open and off when the switch is closed.
I want the opposite effect. When the switch is closed, the LED goes on.
I figured using a 4049 inverting buffer would get me the desired effect. But when I built this circuit, the LED is on with the switch open or closed. I'm not sure what I have wrong here.
In this diagram, the microcontroller is the load. With the switch closed, it's almost a short so the led in the optocoupler turns off when the switch is closed and turns on when the switch is open.
The LED on the 12v line is on when the switch is open and off when the switch is closed.
I want the opposite effect. When the switch is closed, the LED goes on.
I figured using a 4049 inverting buffer would get me the desired effect. But when I built this circuit, the LED is on with the switch open or closed. I'm not sure what I have wrong here.