# Is my optocoupler circuit correct

**URL:** <https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447>\
**Category:** General Electronics\
**Created:** [May 10, 2025, 6:27am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447 "2025-05-10T06:27:23Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mubamistry2520](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mubamistry2520](https://forum.arduino.cc/u/mubamistry2520)\
**Post date:** [May 10, 2025, 6:27am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/1 "2025-05-10T06:27:23Z")

</div>

![Media (5)](https://europe1.discourse-cdn.com/arduino/original/4X/6/5/0/650fcebd7729a766fb33507fbc7db299e04f7e71.jpeg)  
this is my EL817 optocoupler circuit. is it correct ?

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [May 10, 2025, 6:36am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/2 "2025-05-10T06:36:45Z")

</div>

- Your Opto LED requires a series dropping resistor.

---

<div class="post-metadata">

**Author:** ![Grumpy\_Mike](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/grumpy_mike/32/213521_2.png) [@Grumpy\_Mike](https://forum.arduino.cc/u/Grumpy_Mike)\
**Post date:** [May 10, 2025, 6:52am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/3 "2025-05-10T06:52:40Z")

</div>

You also use two identical symbols for the ground. To actually get any isolation from optical isolation the ground on each side must be a different ground. You might have this but your diagram does not show this. So use an alternative ground symbol on each side.

---

<div class="post-metadata">

**Author:** ![mubamistry2520](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mubamistry2520](https://forum.arduino.cc/u/mubamistry2520)\
**Post date:** [May 10, 2025, 7:05am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/4 "2025-05-10T07:05:34Z")

</div>

where should I connect it ?

---

<div class="post-metadata">

**Author:** ![mubamistry2520](https://avatars.discourse-cdn.com/v4/letter/m/8baadc/32.png) [@mubamistry2520](https://forum.arduino.cc/u/mubamistry2520)\
**Post date:** [May 10, 2025, 7:06am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/5 "2025-05-10T07:06:26Z")

</div>

Bothe the grounds are different just kept the symbol same by mistake. Thanks bro I will keep that in mind

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [May 10, 2025, 7:58am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/6 "2025-05-10T07:58:21Z")

</div>

> [@mubamistry2520](#):
>
> where should I connect it ?

Anywhere on the MCU side of the circuit in line with the current flow. It is meant to limit the current. Something like 330R is probably about right, though 470R should also work.  
The math should be 3.3v - (opto)LED volatge drop = I \* R.  
I think of the top of my head that the PC817 opens at 5mA already, but i would aim at 8mA  
Find the datasheet and have a proper look. Also make sure that the current does not exceed what the mcu can provide (which one are you using ? )

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [May 10, 2025, 8:40am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/7 "2025-05-10T08:40:22Z")

</div>

> [@Deva\_Rishi](#):
>
> I think of the top of my head that the PC817 opens at 5mA already

Required LED current depends on transistor current, and CTR (current transfer ratio). If minimum CTR is 50% (common), then the LED current must at least be twice the collector current.  
Collector current is 4volt / 4k7 = 0.85mA, So 1.6mA LED current should be enough.

The diagram looks mirrored and upside down to an EE.  
Convention is signal from left to right, supply up, ground down.  
Leo..

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [May 10, 2025, 8:42am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/8 "2025-05-10T08:42:19Z")

</div>

> [@mubamistry2520](#):
>
> this is my EL817 optocoupler circuit. is it correct ?

That depends.  
What kind of signal are you coupling?

It may not work for high speed digital

---

<div class="post-metadata">

**Author:** ![Deva\_Rishi](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/deva_rishi/32/227254_2.png) [@Deva\_Rishi](https://forum.arduino.cc/u/Deva_Rishi)\
**Post date:** [May 10, 2025, 9:54am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/9 "2025-05-10T09:54:56Z")

</div>

> [@Wawa](#):
>
> The diagram looks mirrored and upside down to an EE.  
> Convention is signal from left to right, supply up, ground down.

I lifted up the laptop and turned it to make sense of it.

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [May 10, 2025, 11:46pm UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/10 "2025-05-10T23:46:35Z")

</div>

Not possible with my 19"-24"-19" triple-monitor PC setup 😄  
Leo..

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 11, 2025, 8:25am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/11 "2025-05-11T08:25:49Z")

</div>

hI, @mubamistry2520  
This might help.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/8/5/1/8511adfc60914dc9eeaaef696c7803238078c4f7.png)

Tom.... 😃 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 7, 2025, 8:26am UTC](https://forum.arduino.cc/t/is-my-optocoupler-circuit-correct/1380447/12 "2025-11-07T08:26:19Z")

</div>

Closed on November 7, 2025, 8:26am UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
