- Your Opto LED requires a series dropping resistor.
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.
where should I connect it ?
Bothe the grounds are different just kept the symbol same by mistake. Thanks bro I will keep that in mind
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 ? )
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..
That depends.
What kind of signal are you coupling?
It may not work for high speed digital
I lifted up the laptop and turned it to make sense of it.
Not possible with my 19"-24"-19" triple-monitor PC setup
Leo..