Projects / Optocoupler isolation lab

Optocoupler isolation lab

Beginner45 minGuided buildReviewed

Build it step by step

0 of 7 done
  1. PC81718.0 mA

    Wire the input side

    Battery A, button, 1 kΩ and the LED inside the PC817.

  2. +18.0 mA

    Wire the output side

    Battery B, red LED, 330 Ω and the transistor side, with no link to battery A.

  3. 18.0 mA

    Press the button

    The red LED should light with no wire between the two sides.

  4. Measure the input current

    Put a meter in series on the input side: expect about 8 mA.

  5. 18.1 mA

    Measure the output current

    Put the meter in series with the red LED: expect about 6 to 20 mA.

  6. Work out the CTR

    CTR % = output current ÷ input current × 100.

  7. Check isolation

    With a meter on resistance, measure between the two grounds and find an open circuit.

In short

How do you build an optocoupler isolation lab?

Pass a signal across a PC817 with no electrical connection and measure its current transfer ratio. You need Optocoupler PC817, Resistor 330 Ω, Resistor 1 kΩ, LED 5 mm red, Tactile push button 6 mm, Digital multimeter, Breadboard 830 Tie Points, 9 V battery × 2 and 9 V battery snap with DC jack × 2. It takes 7 steps and about 45 minutes.

Level
Beginner
Time
About 45 min
Parts
9

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Battery A + (9 V)Button, then 1 kΩ resistorInput side supply
1 kΩ resistorPC817 pin 1 (anode)Sets LED current to about 8 mA
PC817 pin 2 (cathode)Battery A -Input side ground only
Battery B + (9 V)Red LED anodeOutput side supply, separate battery
Red LED cathode330 Ω resistor, then PC817 pin 4 (collector)Output transistor
PC817 pin 3 (emitter)Battery B -Output side ground only

No code needed

No code. Use two separate batteries and never join the two grounds: that is what makes it isolated. The PC817 pins, with the dot at top left, are 1 anode, 2 cathode on the left (top to bottom) and 4 collector, 3 emitter on the right (top to bottom). Only use batteries; the isolation is for learning, not for connecting mains.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Button releasedLED off
Button pressedLED on
Meter between the two groundsOpen circuit
CTRBetween about 50 % and 150 % (PC817 is rated 50 to 600 %)

If it does not work

LED never lights

Check the PC817 orientation and that the input LED side has current.

LED always on

The output side is wired to the input battery. Keep them separate.

Very dim

Output transistor is saturated or the LED is wrong way round.

CTR is out of range

The transistor may saturate at high current. Use a larger output resistor.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the optocoupler isolation lab?

Optocoupler PC817, Resistor 330 Ω, Resistor 1 kΩ, LED 5 mm red, Tactile push button 6 mm, Digital multimeter, Breadboard 830 Tie Points, 9 V battery × 2 and 9 V battery snap with DC jack × 2.

How long does the optocoupler isolation lab take to build?

About 45 minutes for a beginner maker, in 7 steps.

How do I know the optocoupler isolation lab works?

Button released: LED off. Button pressed: LED on. Meter between the two grounds: Open circuit.

LED never lights: what should I check?

Check the PC817 orientation and that the input LED side has current.

LED always on: what should I check?

The output side is wired to the input battery. Keep them separate.

Very dim: what should I check?

Output transistor is saturated or the LED is wrong way round.

CTR is out of range: what should I check?

The transistor may saturate at high current. Use a larger output resistor.