http://www.ebay.com/itm/10PCS-PC817-PC817C-817C-Optocoupler-DIP4-SHARP/251035304539?hash=item3a72dec25b
This is like a mini relay version?
It's an opto-coupler. It's an LED and a photo-transistor in a little sealed package.
As Majenko said, this is an opto-coupler. They can be used for a wide variety of applications.
Renesas has a good article on them here: http://www.renesas.com/products/opto/technology/usage/index.jsp
So that would work as a analog switch?
Thanks guys
For certain values of "Analog Switch", yes.
Treat one side like any normal LED, and use it to turn the transistor on the other side on and off. Just like using an NPN transistor in your circuit, except you get what is known as Galvanic Isolation1 in your circuit like you do with a relay.
1Galvanic Isolation is complete electrical isolation between two parts of a circuit. Devices that use something other than electricity to interact between two parts of a circuit perform this function, such as relays, etc, where there is no electrical connection between the side doing the switching and the side being switched.
majenko:
For certain values of "Analog Switch", yes.Treat one side like any normal LED, and use it to turn the transistor on the other side on and off. Just like using an NPN transistor in your circuit, except you get what is known as Galvanic Isolation1 in your circuit like you do with a relay.
1Galvanic Isolation is complete electrical isolation between two parts of a circuit. Devices that use something other than electricity to interact between two parts of a circuit perform this function, such as relays, etc, where there is no electrical connection between the side doing the switching and the side being switched.
Got it, thank you