Electronics > Beginners
How do you select optoisolator current? Does it affect switching speed?
<< < (4/5) > >>
spec:

--- Quote from: pwlps on January 04, 2019, 10:39:12 pm ---Instead of trying to adapt the CTR, pullup resistors etc. to get the current and voltage specs you need, it would be much easier to use an optoisolator with an integrated logic output.  In a similar design I was using a HCPL2200:
https://docs.broadcom.com/docs/AV01-0557EN
which should meet your specs too. Another advantage is that it has a hystersesis in the transfer function (a Schmidt trigger is included) to prevent false transistions caused by spikes or oscillations on the pulse edges (NB. your circuit is not very safe regarding this issue: in principle Schmidt triggers  should have been inserted between the optocouplers and the peripheral connections).

The logic "on" output voltage  of  HCPL2200 follows the supply voltage (up to 20V) so you don't need any pullup resistor on "PERIPHERAL RX" (and with 5V supply the output can sink more than 20mA).  The input "on" threshold is only 1.6mA and the forward current should not exceed 5mA so if you need to sink 15mA on "PERIPHERAL TX" you will  need to add a shunt resistance between R2 and PERIPHERAL TX.
As there is a high gain amp inside the optocoupler it is recommended to put a 10nF decoupling capacitor across the supply pins (otherwise sometimes the output might oscillate, depending on your PCB layout).

--- End quote ---
+ pwlps

A logic coupler, (opto, inductive, capacitive) would be perfect for the Slave RX (from the master). But, AFAIK, you cannot use a logic coupler for the Slave TX to the Master, because logic coupler outputs are not isolated- they are tied to the host (slave) supply lines.

The slave RX design is quite straight-forward. It is the slave TX design that is the difficult bit, because you have to sink 15mA and most decent speed couplers can only sink 8mA. Or, with the high current couplers, the speed suffers. as does the saturated current CTR. This means that the slave would need to drive the coupler input LED with about 32mA to sink 15mA at the coupler output, at the Slave output TX line.  But if you can find a coupler with the speed and  a saturated CTR of 100% or better, you could get away with around 20mA drive, which some logic chips can provide.
pwlps:

--- Quote from: spec on January 05, 2019, 04:00:59 pm ---A logic coupler, (opto, inductive, capacitive) would be perfect for the Slave RX (from the master). But, AFAIK, you cannot use a logic coupler for the Slave TX to the Master, because logic coupler outputs are not isolated- they are tied to the host (slave) supply lines.

--- End quote ---

Ok I wasn't clear here, of course I was thinking to use the provided supply/ground lines from the master ("PEREPHERAL_V+", "PEREPHERAL_0V"), otherwise of course it wouldn't make sense to use optocouplers with common supply lines.

But in the meantime I realized that I had forgot another problem: the MDB/ICP bus needs open collector outputs on TX. (NB. HCPL2200 has a tri-state capability that could be used to simulate it but but if the board/software do not provide control for it then it is useless). The standard solution to make an active logic gate output behave like an open collector output consists in placing a Schottky diode in series so that it can only sink current. In this way an HCPL2200 (or equivalent) can be used on the slave TX side too: in short, the VCC/GND of HCPL2200 powered by PEREPHERAL V+/PEREPHERAL_0V and the Vout of HCPL2200 connected to PEREPHERAL RX via a Shottky in series.
What do you think?
spec:

--- Quote from: pwlps on January 05, 2019, 11:26:15 pm ---
--- Quote from: spec on January 05, 2019, 04:00:59 pm ---A logic coupler, (opto, inductive, capacitive) would be perfect for the Slave RX (from the master). But, AFAIK, you cannot use a logic coupler for the Slave TX to the Master, because logic coupler outputs are not isolated- they are tied to the host (slave) supply lines.

--- End quote ---

Ok I wasn't clear here, of course I was thinking to use the provided supply/ground lines from the master ("PEREPHERAL_V+", "PEREPHERAL_0V"), otherwise of course it wouldn't make sense to use optocouplers with common supply lines.

But in the meantime I realized that I had forgot another problem: the MDB/ICP bus needs open collector outputs on TX. (NB. HCPL2200 has a tri-state capability that could be used to simulate it but but if the board/software do not provide control for it then it is useless). The standard solution to make an active logic gate output behave like an open collector output consists in placing a Schottky diode in series so that it can only sink current. In this way an HCPL2200 (or equivalent) can be used on the slave TX side too: in short, the VCC/GND of HCPL2200 powered by PEREPHERAL V+/PEREPHERAL_0V and the Vout of HCPL2200 connected to PEREPHERAL RX via a Shottky in series.
What do you think?

--- End quote ---
I will have a look at this later- I am just about to post a schematic that I have come up with for the slave comms. :)
spec:
UPDATE #1 of 2019_01_07 (text and R2 on schematic changed)
UPDATE #2 of 2019_01_07 (text and R2 on schematic changed)

Hi mr_darker,

Attached below is the level 1, hardware specification for the Multi Drop Bus (MDB) comms, extracted from the MDB protocol document attached to reply #10

Also attached is a schematic showing a circuit that should provide the MDB comms, at an adequate speed, for a  Slave. The Slave RX line (Master TX) minimum inactive current requirement has been ignored for the present (not really sure what it means :))

As you say, the tricky bits are meeting the 9k6 baud rate and the MDB requirement of sinking 15mA minimum at 1V of less.  I have looked at many couplers of all types and none easily meet the three conflicting requirements of, medium speed (9k6 baud), Input LED drive logic gate compatibility, and current sinking capability (15mA).

But the LTV816SD single optocoupler comes the closest in that it could be a touch faster. This is a selected version where the 'D' indicates a minimum non-saturating current transfer ratio (CTR) of 300% (not available in twin or quad versions of this optocoupler).  The minimum saturating CTR is not stated in the datasheet, so I decided to drive the optocoupler input LED with around 16mA, which must be supplied by the Slave logic. A 74LV245A duffer is shown as an example of a chip capable of sinking 32mA (for good measure), but there are other suitable logic chips. If the logic on the Slave is not capable of supplying the required current, fitting a suitable single logic element ('tiny') chip  may be the solution. Note that an open drain/collector output is not suitable, but the circuit could be modified for OD/OC operation if required.

It would be a good idea, but not essential, to use a Schmitt input logic element to accept the Slave on-board signal from the Master TX comms line.

https://optoelectronics.liteon.com/upload/download/DS-70-97-0013/LTV-8X6%20series.PDF

http://www.ti.com/lit/ds/symlink/sn74lv240a.pdf
spec:
+ pwlps

--- Quote from: pwlps on January 05, 2019, 11:26:15 pm ---The standard solution to make an active logic gate output behave like an open collector output consists in placing a Schottky diode in series so that it can only sink current.
--- End quote ---
It is quite right that you can get the open collector function by using a Schottky diode, but when you add the low state output voltage of the logic optocoupler, the end result could be that meeting the MDB specification of 1V or less with a current sink of 15mA would be difficult.  But, in any case, the logic optocouplers can only sink 8mA AFAIK.


--- Quote from: pwlps on January 05, 2019, 11:26:15 pm ---In this way an HCPL2200 (or equivalent) can be used on the slave TX side too: in short, the VCC/GND of HCPL2200 powered by PEREPHERAL V+/PEREPHERAL_0V and the Vout of HCPL2200 connected to PEREPHERAL RX via a Shottky in series.
What do you think?
--- End quote ---
:) You have obviously put a lot of thought into ways to use a logic opto coupler. I have done the same, but without much success. It is the 15mA sink requirement that is the killer. Sorry to say though, that, in any case, your scheme, would not comply with the MDB specification, because the Slave output TX line would still be referenced to the Slave supply lines.  The only way you could use your scheme would be to have an isolated 5V supply, generated by the Slave, to power the logic side of the logic optocoupler.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod