The following post describes how to drive a relay by using an isolated method, or through an opto-coupler device.
The question was asked by one of the interested members of this blog, Miss Vineetha.
Before studying the proposed design, let's first understand how an opto coupler works.
How an Opto-Coupler Works
An opto-coupler is a device which encapsules an LED and a photo-transistor inside a hermetically sealed, water proof, light proof package in the form of an 8 pin IC (resembling a 555 IC).
The LED is terminated over a couple of pin outs, while the three terminals of the photo-transistor is terminated over the other three assigned pin outs.
The idea of operating a relay with an opto-coupler is simple, it's all about providing an input DC from the source which needs to be isolated to the LED pin outs via a limiting resistor (as we normally do with usual LEDs) and to switch the photo transistor in response to the applied input triggers.
The above action illuminates the internal LED whose light is detected by the photo-transistor causing it to conduct across its relevant pin outs.
The photo-transistor output is normally used for driving the preceding isolated stage, for example a relay driver stage.
As shown in the following circuit diagram, the relay driver may consist a NPN transistor or a PNP transistor.
If it's a PNP transistor, the base is coupled at the collector of the photo transistor, alternatively, if a NPN transistor is used in the relay driver, the trigger is received from the emitter of the photo transistor quite like a Darlington paired configuration.
The rest of the operations are self evident.