Electronics > Beginners
How do you select optoisolator current? Does it affect switching speed?
(1/5) > >>
mr_darker:
This is a bit embarrassing but I have a device that is essentially just an optical isolator hooked up to a UART port, and I don't know how to figure it out xD  I want to know for sure rather than wing it.

Using this isolator:
https://www.digikey.com/product-detail/en/lite-on-inc/LTV-826S/160-1363-5-ND/385833

I have a protocol that operates on 9600 Baud communication, meaning 104 microseconds per bit.
This isolator has a maximum rise and fall time of 18 microseconds, almost 20% on each end! I don't know if this is consistent and just ends up offsetting the whole data dealio, or if it ends up distorting the bits.  Also, the protocol requires a minimum/maximum of 15mA on the TX/RX lines, paired with a minimum 50% current transfer ratio, I need to have at least 30mA on the input of an isolator to guarantee 15mA on the other end, but the input can handle an absolute maximum of 50mA.  SO, how do you go about mathematically selecting the single best current to send through this (a value between 30 and 50?  If you go higher or lower, does it affect the switching time?  Or is it all irrelevant and do you just go off of the minimum current you can use?

I ask because I've tried a while back, and may have set the resistors wrong, maybe not, but the switching time was so slow that even at 9600 baud, you had bits bleeding about halfway into the next ones.
spec:
Hi mr_darker,

That optocoupler is a touch slow for 9600 baud (104us), although it could probably be made to work. But we would need to see a schematic of the interface and a specification and also a description of the application to take this any further.
nsrmagazin:
Otherwise all we can tell you is that normally the voltage counts for this interface, the current is very small and you can ignore it(set it at 1ma to 5mA).
mr_darker:
Ranges really bug me, like I need to know an exact & single most correct answer or I get anxiety about it like I made the less-right decision. xD

I've included a schematic, and am trying to write out the formula to use, to get the resistor values.  I'm writing a tutorial (which is why I'm trying to make sure I'm right first), so giving a formula where people can plug in the values associated with their device is easiest.  It could be a 5 volt device or a 3.3 volt device (I managed to get a 3.3 volt one working using optoisolators).  Also each device is going to have current limits on the I/O pins which factor into it.

The isolator used is the LTV-826 https://media.digikey.com/pdf/Data%20Sheets/Lite-On%20PDFs/LTV-816_826_846.pdf
Also I want to include the LTV-816 as that's the isolator I originally used.  It'd really be cool to have values from the datasheet in the formula so you can just use any isolator and plug values into the formula to see if it will work.


From what I know, factors are:

* Voltages
* Current Limits of both the device/peripheral, the isolators (50mA)
* The VMC's requirement that its RX line be sunk with at least 15mA, and the specification that it will source a maximum of 15mA on its TX line
* Forward LED voltage
* Possibly switching times, but it seems like it'd just delay the data as long as it rises/falls at the same speed & within 104 microseconds.
It's a vending machine connecting to a MDB/ICP (Multi Drop Bus/Internal Communication Protocol) device.
Kleinstein:
The speed of optocouplers tend to go up a little with high LED current. The specs are for something like 5 mA and 20 mA LED current. The 20 mA, maybe 15 mA seem to be a good value. Going to close to the absolute maximum of 50 mA may cause more aging.
As the specs seem only guarantee 15 mA souring more current is not a real option. It's more like limiting the current to some 15 mA, even if the source is stronger.

However the worst case CTR at 50% is not sufficient. So at the worst case CTR it would need at least 30 mA to the 15 mA out. This may still work, but not really far from absolute limits. So one may have to look at a different OK.

The speed also depends quite a lot on the loading the the opto-coupler. They get slower of they go deep in to saturation (e.g. turning on the transistor hard). Also cable capacitance at the output can be a factor. Just 9600 baud should still work even with saturation however.

The switching times give a delay, but the delay can be different for turn on and turn off, with the tendency for turn on to be faster.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod