Optocoupler demystified
[tronixstuff], who has wrote a ton of arduino tutorials, has posted a detailed guide to one of the most useful electronic components, used to trigger many low-voltage circuits: the Optocoupler.
It is a small device that allows the transmission of a signal between parts of a circuit while keeping those two parts electrically isolated. How is this so? Inside our typical optocoupler are two things – an LED and a phototransistor. When a current runs through the LED, it switches on – at which point the phototransitor detects the light and allows another current to flow through it. And then when the LED is off, current cannot flow through the phototransistor. All the while the two currents are completely electrically isolated (when operated within their stated parameters!)
via [TronixStuff]