Electronics > Projects, Designs, and Technical Stuff

Using toslink optical SPDIF cables and tx rx modules as basic optocouplers

(1/4) > >>

haxby:

Hi all,
I have a need to optically couple and control some low frequency (50Hz up to 4KHZ) mosfets. There will be 48 separate, independent mosfets in total that will be some distance from the processor controlling them.

I could run balanced pairs of copper, with say, RS485, but a seemingly neat solution would be to use optical audio SPDIF TX and RX pairs. The component count would be very low, and the tx, rx and cables are very cheap, under $1 each, from AliExpress.

I thought the TX and RX were just an LED and a phototransistor, but I think I am mistaken. The listing says they are TTL compatible. That's great but..... Does the transmitter already modulate the signal by itself?
 If I am just clocking the TX data in pin at 50Hz, or even 1Hz, does the receiver just give me a 50Hz/1Hz signal out? Or is it more complicated than that?

Here is the aliexpress listing that I have bought. It says it works up to 16Mhz. I guess I will find out, but prefer to have a think about my approach as I wait 1 or 2 months for delivery.

https://www.aliexpress.com/item/4001159117440.html



mindcrime:
I don't know the answer, but I'm really curious to hear what you find. I've long been interested in the idea of using TOSLink parts for simple optical networking, but haven't gone very far down the path of working out how to do it. I got as far as ordering some transceivers and stuff, and doing some reading and that's it.

Based on this article I'm pretty sure it's possible in principle, but I guess you'd have to read the datasheets for the transceivers or find some other docs / samples to work out the details of how to make it all work.

haxby:


Note I deleted my previous post as I incorrectly wired up the TX and RX in my tests. Short story is they work just fine from DC to 16Mhz.....

Long story:

Now today I purchased a SPDIF TX and RX pair from Altronics. Part numbers Z1603 and Z1604.

The actual manufacturer parts were labelled DLR1151 and DLT1151. No markings of the actual brand though. And a google search showed a small handful of different pinouts with the same or similar part numbers...... VERY ANNOYING    |O

The DLR is the Receiver, the DLT is the Transmitter.


Firstly, I could not find a good datasheet for the transmitter. I thought it was just an LED. The pic in altronics catalog shows just two pins, but the actual part had 3.....

I connected just two wires..... a battery through resistor and found the led glowed, so I thought all was good.

But, after much testing I found that ACTUALLY, it is a 3 pin "smart" device, that needs +5v, data in, and ground.


The pinout of the TX looking into the hole from left to right is:

data in, 5V, Gnd

The pinout of the RX looking into the hole from left to right is:

5V, Ground, data out



Now that that is settled, the parts work very very well from DC to 1Mhz. I did not bother testing more than 1Mhz.

So I'll leave this here so that I can reference it at a later date. These SPDIF cables will come in very handy for my future projects as well as the current one. They are literally a single part solution to what would otherwise be a lot of head scratching, trying to find EMI sources and earth loops....


Nominal Animal:
If you invert the logic – so that idle and stop bits are LED OFF –, you can trivially push UART through a TOSLINK or two (for a bidirectional link, you obviously need two, since each TOSLINK cable is unidirectional).

You do want to limit the LED duty cycle to under 75%, to keep the dissipated heat to within limits in the transmitter.  With 8N1, you have at least the start bit high and stop bit low, so the duty cycle is between 10% and 90%.  With 8N2, between 9% and 82%.  If you transfer ASCII text, duty cycle will be between 20% and 70% for 8N1, and between 18% and 64% for 8N2.

Here are the original Toshiba TOSLINK transmitters I know of:

TOTX141 and TOTX141P are three-pin devices for 3.3V logic, and the datasheet recommends a 100nF bypass capacitor between VCC and GND.
TOTX1350 is a two-pin device, and seems to require a buffer/driver (like HC04, a hex inverter) and a couple of resistors and capacitors; the LED is driven at 1.5mA to 6mA, with a forward voltage of about 2 V.
TOTX1353 is a three-pin device, and requires a current-limiting resistor to the VCC pin.  The forward voltage of the LED is about 2 V, and only needs 1.5mA; so 2.2kOhm at 5V, or a 820 Ohm at 3.3V.

Here are the original Toshiba TOSLINK receivers I know of:

TORX141 and TORX141P are three-pin devices for 3.3V logic, and the datasheet recommends a 100nF bypass capacitor between VCC and GND, as well as a 47µH inductor between supply and VCC.
TORX1350A is a three-pin 5V logic device, and the datasheet recommends a 100nF bypass capacitor between VCC and GND, as well as a 47µH inductor between supply and VCC.
TORX1353 is a three-pin 5V logic device, and the datasheet recommends a 100nF bypass capacitor between VCC and GND.

I do believe most of the devices you'll encounter are clones or compatible to one of these three.  (If you discover otherwise, do let me know, please!)

For current 3.3V microcontrollers, it seems to me that to transmit using TOTX1350's, one needs a buffer/inverter and a couple of passives, but the overall current is much less (1.5mA - 6mA, compared to 15-20mA on '141).  To receive using TORX135x's, one needs a voltage level translator to 3.3V logic and a 5V supply (SN74LVC1T45 would be my choice), but the overall current is similarly reduced compared to older '141s.

mindcrime:

--- Quote from: Nominal Animal on June 15, 2021, 11:58:47 am ---If you invert the logic – so that idle and stop bits are LED OFF –, you can trivially push UART through a TOSLINK or two (for a bidirectional link, you obviously need two, since each TOSLINK cable is unidirectional).

--- End quote ---

So would it be possible / reasonable then, to connect the data out pin of a TOSLink receiver to the RX pin on an Arduino serial port, and read serial data sent from the other end?

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version