Pages: [1]   Go Down
Author Topic: Resistor for optocoupler  (Read 281 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all,

I have some optocouplers: http://www.isocom.com/newsite/datasheets/db92356.pdf

I want to connect these straight from the arduino (mega). Would a resistor be needed to limit the current?

Thanks!
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 106
Posts: 6372
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes.  the side connected to the Arduino is pretty much just an LED, so it needs a resistor.
(Moreover, it's a tiny little infrared LED inside a big insulating package, so Vf is lower, thermal dissipation is lower, and directly connecting to an output pin is even more likely to cause damage to the pin and/or the LED than would be the case with a visible-light LED.)
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A lot more fragile, A whole lot.. I know from very bitter experience. I had some red LED's connected across the inputs to a couple of opti couplers (both with separate resistors) and I found one time when there was a massive transient that popped some breakers, that some sensing stuff had been damaged and it took quite a long time to find it as the LED's worked.... But the Opto's didn't, both of them. I thought I was so clever, including the led's, without them and I would have measured the led first..

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Offline Offline
Edison Member
*
Karma: 56
Posts: 2160
The last thing you did is where you should start looking.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a visual.


* opto.jpg (108.49 KB, 577x447 - viewed 15 times.)
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 44
Posts: 2808
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't quite know If I would wire the transistor quite that way but there is no reason why it wouldn't work and as far as more gain, by the time the red LED turns on fully or at about 4V the opto will be fully on so the transistor probably isn't needed for extra 'gain'. The circuit should drive an Arduino input just fine.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16514
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To save component costs and space:
 You can probably just ground pin 4 (the output emitter) and wire pin 3 (the collector output) directly to a arduino input pin, then just enable the internal pull-up resistor for the input pin. Then reading a LOW means opto in on and reading a HIGH means opto is off.

 You can save another resistor by wiring the visible led (if being used) in series with the opto's input and adjust the resistor size downward accordingly.

Lefty
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would a resistor be needed to limit the current?

Look to the datasheet. Most of the times, people try to set them to work at the highest current transfer ratio, or flatest current transfer ratio. Typically that's 1 - 10ma.
Logged

Pages: [1]   Go Up
Jump to: