## How to test an optocoupler

An optocoupler or optoisolator, is a device that contains a light-emitting diode (LED) and a photosensor ( photodetector, such as a photoresistor, a photodiode, a phototransistor, …etc ). The purpose of an optocoupler is to transfer signals from one circuit to another yet keep them galvanically isolated.

Here I want to show you how to check if an optocoupler is working. So I’ve chosen one of the most commonly used optocouplers ( PC123 – 4 pins) for the demonstration, but you can use the same principle for all optocouplers ( note: check the datasheet first ).

Step 1

Using the diagram in the right identify the pins; first the anode and cathode of the LED ( in this case pins 1 and 2 ), and then using an ohmmeter set on the ‘X1 Ohm’ domain, measure between pins 1 and 2, and you should get one reading measuring one way and no reading the opposite way (just like you check a diode). If you get a value either way or no value at all, then certainly there is a problem with the LED, and you should find another optocoupler.

Step 2

If the LED is good then we should check the phototransistor, you could measure it with the ohmmeter just like the LED between pins 3 and 4 ( the emitter and collector ), and you should get a high resistance value both ways if the phototransistor is good. If you’ll get no reading at all, is probably because most phototransistors have such high resistance between emitter and collector that the ohmmeter can’t measure; if this is the case you could connect two ohmmeters in series thus increasing the measuring domain; …although i think most don’t have two meters so i recommend the ’empirical’ method, presuming you have a variable DC regulated power supply.

“Empirical” method

Connect the ohmmeter ( X1K Ohm or  X10K Ohm ) between emitter and collector ( 3 and 4 ) like this: red probe to collector and black probe to emitter. Now connect a resistor of a few hundred ohms ( ~300 ohms ) in series with the LED anode, after this turn on the power supply and start increasing the voltage from 0 to 2…3 volts, and you should be able to see on the ohmmeter how the output resistance decreases as the input voltage increases and viceversa.

1. written by: Viliam on September 7, 2012 at 1:07 am

Excellent info, thanks!

2. written by: Blumen on October 26, 2012 at 7:24 pm

Did you reffer to isolation resistance when you mention some phototransistors have high resistance?

• written by: mihai on October 31, 2012 at 9:58 am

I was referring to the junction resistance.
In some cases this can be as high as a few hundred MΩ, and the isolation resistance usually has values of GΩ order.

3. written by: saghesh on March 2, 2013 at 7:49 pm

thanks for your valuable info ……

4. written by: Michael on January 21, 2014 at 3:21 pm

thanks for the useful info very great

5. written by: Muhammad Akhlaq on May 30, 2014 at 9:16 am

Thanks for such an ellaborative procedure.

6. written by: hari sankar on July 15, 2014 at 3:15 pm

If i give the input of 0-2 V DC what will be the response of this optocoupler…. kindly please advice

• written by: Mihai on July 15, 2014 at 8:30 pm

If the input is at 2V DC, then the output resistance should be around 100 – 120 ohms.
For response time or frequency response data, check the datasheet.

7. written by: hari sankar on July 16, 2014 at 12:17 pm

Thank you for the information… and i have one more clarifications..
I have two circuits.. first circuit output range is 0 to 2 V DC and second circuit Input range is 0 to 2 V DC
i need to isolate this two circuits using opto coupler.
for example: if 1 V DC is given to opto coupler from circuit one… it should transfer same to the input of second circuit..please advice which optocoupler is apt for our application :)

• written by: Mihai on July 16, 2014 at 5:12 pm

I would say that PC123 or PC817 should be OK.

• written by: Shahid on August 7, 2016 at 1:35 pm

It depends on the 2nd circuit you are supplying the voltage on collector of the optocoupler, optocoupler will never transfer the voltages of circuit1 to circuit2, it decreases resistance between your supplied voltages at collector and emitter on the input of circuit2

8. written by: hari sankar on July 18, 2014 at 7:29 am

Thank you for the information.we ll try that and replay the results.

9. written by: Kannan E on July 19, 2014 at 9:17 am

Damn it. Please correct the pin numbers in image. it shows 4th pin is emitter and 3rd is collector. change the order.

• written by: Mihai on July 19, 2014 at 3:00 pm

Thanks for spotting that, and sorry for the mistake.

10. written by: Evis on November 12, 2014 at 7:01 pm

Well, very good. I tried that and worked fine. Thank u

11. written by: Ado on November 14, 2014 at 12:31 am

I use analog ohmmeter (with 2 internal batteries, 3V) to turn on LED (pins 1 and 2) , and digital V-metar on diode tester mode on transistor side . If optocoupler is OK , diode tester on pins 3&4 will show different reading when analog ohmmetar is connected to pins 1&2.

12. written by: marosomarco on January 26, 2016 at 12:43 am

I like the way you explain things..congrats.
You helped me understand how to use a tester on a optocoupler
Thanks.

13. written by: marosomarco on January 26, 2016 at 12:58 am

Just a question : i have an Arduino Relay module (2 relay) and only one of the realy are working.
I think it’s the optocoupler allthough i’m not sure. I was wondering if i could just bypass the optcoupler and see if it works.
The optocoupler is FL 817C F329, should i just join the emittor and collector pins?
To what i understand the optocoupler send thru a LED a signal to the photoresistor and the photoresistor acts as a sort of switch only that it’s a optical switch, Is that right?
I’m new to optocouplers and not a great expert in eletronics. Any help would be apreciated.

• written by: Mihai on February 2, 2016 at 5:54 pm

Yes, you understood how the optocoupler works, and yes, the phototransistor should close the relay circuit when voltage is applied to the LED pins, and if it’s short-circuited (emittor and collector pins joined) the relay coil circuit should close.
I hope it helps.

14. written by: Barış on March 2, 2016 at 11:44 pm

Hi,

First of all thanks for sharing such an useful information. I appriciate…
I tried that emprical method for H11B1 optocoupler. According to that emprical method the bjt’s are broken! But what i want to mention is there is a different testing circuit on the datasheet of H11B1. Here is the web site. http://html.alldatasheet.com/html-pdf/3038/MOTOROLA/H11B1/1036/4/H11B1.html

The question is which one is the right testing method? Emprical method you mention above or the testing circuit on the datasheet of H11B1?

• written by: Mihai on March 6, 2016 at 2:07 pm

Hi,
Both methods are correct. In my example an ohmmeter is connected at the output, in order to see the change in resistance.
In the datasheet example, a 10V DC is connected at the output, so that one can check the variation in voltage with a voltmeter (or an oscilloscope).

15. written by: john markus on March 14, 2016 at 11:21 pm

Thanks for clearity on ic 817.

16. written by: Arvind Vijaykumar on June 1, 2016 at 12:57 pm

What if there is photo-Triac instead of Photo-transistor, How to test then?

• written by: Mihai on June 10, 2016 at 12:05 pm

I’ve never used a phototriac. I guess, it should work mostly the same as a normal triac. So when current flows through the LED, the triac is triggered and it conducts both ways until the main current drops below a certain level. Better check the datasheet for a test circuit.

17. written by: Sanu sebastian on August 19, 2016 at 10:49 am

Hiii please help me … i have PC123 ic in pin 1& 2 am getting both side value its good or faulty ? Pls let me know

• written by: Mihai on August 27, 2016 at 10:01 pm

Hi, pins 1&2 are connected to the LED. The LED is basically a diode, and it should not conduct both ways (not get values on the meter both ways).
If you are getting values both ways, it means the LED is dead, and the optocoupler it’s not working.

18. written by: bablo on October 28, 2016 at 10:32 am

Thanks a lot for the useful informations.

19. written by: Sarfaraz on November 8, 2016 at 9:15 pm

Nice info

20. written by: Geert Van Droogenbroeck on November 18, 2016 at 11:10 pm

Hi,

maybe a stupid question :-)
what do I connect at the resistance : + or – of the supply?
Thx and best regards,
Geert

• written by: Mihai on November 20, 2016 at 1:29 pm

Hi,
Connect the resistor between the “+” of the power supply and the anode of the LED.

• written by: Wade on February 5, 2017 at 9:03 pm

Thanks for the easy to follow explanation of how to rest an optocoupler.

• written by: Mihai on February 6, 2017 at 11:14 am

No problem!

21. written by: Nupra on March 18, 2017 at 6:44 pm

Hi, I have 6 pin MOC3021 optocouplers to be used in a cct I’m working on. But it seems the there’s an issue with them. I only have a digital multi meter. How can i test them? Plz help.

• written by: Mihai on March 18, 2017 at 10:07 pm

Hi,
The MOC3021, is a phototriac coupler, meaning that instead of the phototransistor, it has a phototriac, which is basically a triac with the gate driven by the LED.
The LED (pins 1 – Anode and 2 – Cathode) can be checked with an ohmmeter (or a multimeter set on a low OHM domain, or on diode test domain) as any other LED, and it should only conduct one way (as described in “Step1”).
For the triac (pins 4 and 6), with no voltage applied to the LED (pins 1, 2), check (with an ohmmeter) the resistance between pins 4 and 6, it should be high (open circuit or at least greater than 1 megohm) both ways, and this resistance should go down (lower than 500 ohms) when voltage is applied to the LED, and should remain low even if the voltage is no longer present on the LED.

22. written by: mahdi on July 31, 2017 at 9:55 am