Arduino with optocoupler

I am trying to protect my controller by adding optocoupler in digital pins. By interfacing optocoupler with my Arduino, the controller get heated. I have attached the image of optocoupler ckt.
I have used 3 optocoupler for 3 digital pins, can anyone guide me. Advance thanks.

Hi,

you're not specifying, if that optocoupler is used at an input pin of the Arduino, or an output pin.

But since the i/p circuitry is not connected to GND, I assume that it's on an input pin.

How have you configured that pin in your software?
Is it configured as input, or maybe accidentally as output, driving high current through the transistor or the pull up?
Which Arduino board and which pins? Maybe you're using a pin which is already used for another function?

CU,
Christian

I am using the optocoupler for output pin of Arduino. So I have assigned output in the software for that pin Christian..

Hi,

assuming a 1.5V voltage drop on the optocoupler LED and a 5V supply: Output current through the output pin is 16mA. Times 3 that can cause some heating.

What kind of optocoupler do you use? Maybe check the datasheet and find out, if a bigger series resistor could be used.

And maybe show us a schematic which also shows what is connected on both sides of the optocoupler.

CU,
Christian

Nihaludeen:
I am using the optocoupler for output pin of Arduino.

So what exactly is the problem ?

Yours,
TonyWilk

Hi,
OPs Circuit.
optoedits.jpg
MCT2E OptoCoupler.
Tom.. :slight_smile:

Hi,
You do not need the base circuitry or the 1K, just use INPUT_PULLUP in your pinMode statement.
This is a suggested circuit from datasheet.
optomc.jpg

Tom... :slight_smile:

MCT2E.pdf (134 KB)

TomGeorge:
Hi,
OPs Circuit.
optoedits.jpg
MCT2E OptoCoupler.
Tom.. :slight_smile:

I'm wondering....
Which side of that circuit do you think is connected to the microcontroller?
i/p or o/p?
And to which pins? I'd like to see more, otherwise we can hardly help.

Christian

Replies #6 and #7 make little sense to me, in the light of #2 but yes it would be nice just for the sake of confirmation to actually see the Arduino in the schematic not just a standalone opto.

My first thought is that if the optos are on an Arduino's outputs and all the Arduino is doing is powering 3x LEDs then perhaps OP misread the resistor codes and has red-red-black 22R not red-red-brown 220R on there.

That would certainly be a bit much :wink:

OTOH maybe there's even more in the circuit which we don't know about?

Nihaludeen:
I am using the optocoupler for output pin of Arduino. So I have assigned output in the software for that pin Christian..

Missed that, yes, could be using too small a current limit resistor.
220R gives 17mA which is fine.
Tom..... :slight_smile: