Series resistor for an Opto-isolator

Why can't I work this basic stuff out....

So I have a MOCD207M Opto-isolator between my input point and my Arduino Uno.

https://docs.rs-online.com/1dc9/0900766b812cfe5e.pdf

Currently, I have the input of the Opto-isolator fed via a 4k7 resistor (1W). No idea how I came up with that value, but I used it before and it seemed to work.

But.... I have my doubts it's in any way correct.

The input can vary from 5v (usual) to 24v DC. It has always seemed to cope, but I would like to actually know how to work this stuff out.

The output feeds the UNO directly with a 10K pull-down.

It all works, but I am sure it's not quite right.

image

The LED (Emitter) has a maximum current of 60mA.
The device has a CTR of 100-200%.
V(f) = 1.25V

5V

At 5v input V4.7k = 5v - Vf = 5v - 1.25v = ~3.75v
I(4.7k) = 3.75 / 4.7k = .0008A (800uA) say 1mA

24V

At 24V input V4.7k = 24V - Vf = 24V - 1.25V = ~22.75V
I(4.7k) = 22.75 / 4.7k = ~.005A = 5mA

On the Arduino side, when the transistor is ON, 5V across 10k is 5V / 10k = 500uA.
Therefore, due to the CTR, your design is fine.

Because you don't know basic electronics ? (like Ohm's Law for voltage, Ohm's Law for Power, led specs, etc etc etc)

If V(Rcl) = 22.75V
and I(Rcl) = 5mA (0.005A
the P(Rcl) = I * V = 0.005A * 22.75V = 0.11375W (just over 1/10th W so clearly you don't
need a 1W resistor.

Its mad.... I just cannot get a grip on basic maths, yet I build madly complicated SMD pcbs and they work first time most of the time.

I achieve that through breadboarding a design and mixing it with existing projects I find on Google.

The one I am working on now is the most complicated I have ever made - 790 point, dual layer board. Assembled it and everything worked.

Must be lucky

Wouldn't hurt to learn basic electronics so you can be more than an assembler. The math given so far in this post is basic electronics 101A stuff.

1 Like

The LED (Emitter) has a maximum current of 60mA.
The device has a CTR of 100-200%.
V(f) = 1.25V

Where did you obtain that from? Can't see forward voltage in that table.

And

Thank you for your help

Fill in the blanks:

image

Did you try using the "Edit/Find" function in Adobe Acrobat ?

No search in my crumby reader.

All working now..... even after a smoke event :roll_eyes:

8x Opto isolators all connected up. Somehow, a strip of 4R7 0805 resistors got in my 4k7 0805 resistors stock (I keep them in a clear pocket folder).

One of the resistors leading to the Opto-isolator therefore occidentally was the wrong value (thank God only one).... 5v test voltage resulted in a nice light smoke event.

So, had to replace that isolator #NeverBuyone

Once accidently shorted an LM555 output pin (3) to the GND pin (4) while probing with a meter.
Would not have been a big deal (since it was breadboarded) but for the fact that I used a 10A
12V P.S. because I didn't have a smaller 12V power supply (current limited bench supply for example) and the result was the LM555 spontaneously combusted (burst into flames and
began to GLOW RED ! The power supply didn't have an on/off switch so by the time I got the
power cord unplugged the breadboard was melted where the chip was. (OOPS !)

Easy done.

I remember being very glad I had my magnifying glasses on for SMD work as the reverse installed 220uf launched itself vertically in a style that would have made Elon Musk happy.
Ricocheted off my glasses at Mach 2 and was never seen again.

I can beat that.
I was walking through the lab one day and a 2n3906 inside an open unit under test
WITHOUT A COVER detonated with a loud bang launching a cone size chunk of plastic at such a velocity that it bounced off two walls and landed on the other side of the lab. The transistor
had a cone size hole in the flat face. I was not in the ballistic path, fortunately.

To add to the OT discussion: you don't need dangerous chemicals to open the plastic package of chips. Shorting mains with the chip is a very fast way to get the bare die out of its package.

I suppose you should wear a clear plastic Covid face shield when doing that ?

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