Saturday, July 6, 2019

Optoisolator cum voltage level converter circuit using 4N35


All digital devices work at a voltage level of 5V/3.3V but many field devices work at a much higher voltage level (12V, +/-15V, 24V).

For example 8051 microcontroller input works in 0-5VDC signal and a sensor may work at 24VDC. Interfacing the sensor with the microcontroller will irreversibly damage the microcontroller. In such situation we are required to change the signal level of sensor from 24 VDC to 5 VDC to make the interfacing possible.
Also it is very important to isolate the signal from field devices as they may carry high voltage spike picked up from machines like motor.

An optoisolator can offer both solution at a time. It can provide isolation voltage of the order of few kV and convert the signal level. Here we are talking only about digital isolation.

I mostly use 4N35 IC for isolating digital IOs. It offers isolation of 1.5kV between input and output.
I will share the schematic and selection of suitable values of components.

The circuit in Fig-1 perform an invert operation. When sensor o/p is present, photodiode will be ON and emit light towards phototransistor. This will turn the phototransistor ON. Resultant output to load will be short to ground.

We have 24VDC output from sensor which has been converted to 5VDC by using 5  volt supply. It can be changed to whatever level just by replacing the output side supply.

Also note that the Ground label is different. We shall not short the ground of sensor supply and output side supply for better isolation.

Fig-1
In fig-2, the output follows input albeit at different signal level. When input signal from sensor is present, the circuit outputs 5V (actually 3.5V considering 1.5V drop across collector-emitter CE) and when input signal is absent, output is connected to ground via 10k resistor.
Fig-2
Input resistor R1 is selected after looking into the datasheet of 4N35 as well sensor.
The maximum forward current I(f) for 4N35 is 50mA. For 24VDC and 1k resistance at its input side, it will draw 24/1k- 24mA current which is less than maximum rating.

We must also check if sensor output is capable of providing this much current.

For very low value of I(f), voltage drop across CE will be large.

3 comments:

  1. I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. 2cl2fl

    ReplyDelete
  2. Thank you for the appreciation. I am putting information I have learned while working with them. Suggestions for further improvement are welcome.

    ReplyDelete

Modbus and OPC comparison Table

  Modbus vs OPC Comparison between Modbus and OPC Feature Modbus OPC (OLE f...