Optokuplör devreleri

guclusat

Tanınmış Üye
Süper Moderatör
How to Drive a Relay through an Opto-Coupler Circuit

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.

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 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.



 

Eklentiler

  • opto-coupler-relay-driver-circuit.png
    opto-coupler-relay-driver-circuit.png
    86,7 KB · Görüntüleme: 9
Optocoupler Relay Driver

These simple optocoupler relay driver circuits can be used in variety of electronic projects. There are two types of circuit shown here. The circuit shown in figure 1 will drive the relay through optocoupler in same circuit with same power supply. But the circuit shown in figure 2 is completely isolated from
the trigger source. In this circuit the relay is powered with the separate circuit / power source, this is one of a great task of optocoupler in electronic circuits. These circuits can be simply replaced by the LEDs placed in the electronic projects.
Both the circuits are very simple and using very few components which are a PC817 optocoupler, one transistor, one relay and two resistors. The optocoupler is a device which contains an LED and a phototransitor in a small package. They are manufactured in many different packages. The simple one contains one LED and one phototransistor which we have used in the circuit, other types contains many LEDs and phototransistors. The working of photocoupler is simple when power is applied to the LED in the photocoupler the phototransistor receives the LED light and become switch ON. But the output of that transistor will not directly drive the relay due to which we have used a 2N3904 NPN transistor. The circuit will work on wide supply voltage like from 3.6V to 12V DC. The relay should be used according to the operating voltage.


optocoupler-relay-driver-circuit.gif
 

Eklentiler

Microcontroller Relay Interface and Driver

Many microcontroller designs typically mix multiple interfacing methods. A microcontroller (µC) system can be viewed as a system that reads from inputs, performs processing and writes to outputs. Microcontrollers are useful to the extent that they communicate with other devices, such as sensors, motors, switches, keypads, displays, memory and even other micro-controllers. Often a need arise to interface output of the microcontroller with an electromagnetic relay (EMR).

Relays are devices which allow low power circuits to switch a relatively high Current and/or Voltage on/off. Here is a simple microcontroller-relay interface circuit with perfect “galvanic isolation”. “Galvanic isolation”means an isolation between two circuits, i.e. no metal conduction between those circuits. Transfer will then take place for instance optical or by induction. Galvanic means “related to DC”. Galvanic Isolation says that the driver circuit is separated from the signal source in such a way that DC current cannot bridge the connection. The widely accepted method for galvanic isolation is the use of optical isolator (optocoupler/photocoupler).

Relay with Microcontroller Schematic




CNY17-1
from Vishay Semiconductors is an optically coupled pair consisting of a gallium arsenide infrared emitting diode optically coupled to a silicon NPN phototransitor. Signal information can be transmitted by the device while maintaining a high degree of electrical isolation between input and output.


Interfacing this circuit with a µC is very simple and straight forward. Input of the circuit can be connected to the selected output port of the µC through the input terminals. However keep an eye on the supply polarity. Logic 1 (H = 5V) at the input of the optocoupler PC1 (

CNY17-1
) will switch on the electromagnetic relay, and logic 0 (L=0V) will turn it off. The whole circuit can be powered from any DC source capable of delivering about 50 mA at 12V DC.


Notes

  • Prototype was tested with 1K resistor in place of R1. If you are using a different optocoupler, try to alter this value as per the requirement
  • Typical current transfer ratio (CTR) of CNY70-1 is 40 % to 80 %
  • The 12V/320Ω SPDT relay in the prototype draws about 38mA
  • The power diode D1 (1N4007, 1N4001 or similar) connected across the relay coil, protects the transistor T1 from damage due to the B-EMF pulse generated in the relay coil’s inductance when T1 (BC547) turns off
  • C1 (100µF) is a bypass capacitor to absorb the current transients when the relay turns on and off. This will ensure more reliable operation, and help prevent interference with the operation of the control circuitry
 

Eklentiler

  • microcontroller-relay-driver-interface.jpg
    microcontroller-relay-driver-interface.jpg
    73,2 KB · Görüntüleme: 6
This circuit is being used for mains detection. Input is being fed directly from 220V 50Hz mains and output goes to Arduino which is running on 3.3V. Theoretically the optocoupler LED should burn out during reverse polarity of 220VAC in the circuit given below:

 

Eklentiler

  • aYjYr.png
    aYjYr.png
    16,4 KB · Görüntüleme: 5
PC817 Motor Drive Circuit
Fig. 5.2.6 illustrates a typical example where it is required to drive a 12V DC motor requiring 40mA of current from a logic circuit (or typical computer port) that can only support a few mA of current at 5V or less.

As the current available from typical computer input/output ports may only be a few µA, as computer port lines are usually designed to drive some type of logic input, the input to this motor drive circuit is via a HCT Schmitt inverter gate, which only requires an input current of 1µA, with the 12V 40mA motor being driven by a 2N3904 transistor. The optocoupler infrared LED is driven at about 4mA via a 1kΩ resistor from IC1 output. As the CTR of the PC817 is around 115% the phototransistor can supply about 9mA as the supply to the phototransistor output is now taken from the 12V motor supply. This is more than the 5mA minimum required to drive the 2N3904 into saturation. It is important that the transistor is fully saturated in order to reduce the power dissipation in the 2N3904 to a minimum, therefore although the transistor current (ICE) is 40mA there will only be about 0.3V across the saturated transistor, so the power dissipation in the transistor will be 0.3V x 40mA = 12mW and the maximum dissipation for the 2N3904 is 1.5W. Although this basic interface only allows for switching the motor on or off, it could easily be adapted by changing IC1 to include a pulse width modulated speed control either from a computer, or hardware generated as described in Oscillators Module 4.6.

This simple interface has one more safety feature; diode D1 connected across the motor will effectively prevent any nasty back EMF spikes generated by the inductive load (the motor) from causing damage to either the interface, or worse still to the computer.

 

Eklentiler

  • opto-motor-cct.jpg
    opto-motor-cct.jpg
    29,7 KB · Görüntüleme: 9
Geri
Yukarı