3
\$\begingroup\$

I need to extend an existing 5V UART over fibre for isolation reasons. Digital isolators / optos are no good as I need more isolation than that (0.1pF coupling max. from one side to the other). UART content is fixed due to backward compatibility requirements - 57600 baud. Maximum transmission distance is 10m.

My initial thought was to use TOSLINK transmitters and receivers. I bought some (three connections - 5V, GND and IN or OUT respectively) and got to playing. First issue I saw was data inversion when driving with a simple 10ms on, 20ms off test signal. Fine, added an inverter - this got fixed.

I then set it up at 57600 with a continuous data stream - and got horrible garbage (character-wise - waveform is clean but incorrect). Reduced the speed to 9600 and sent individual characters so I could observe the waveform - no problem. Increased speed back to 57600 and sent individual characters. Strange things. Basically, the character waveform starts well, but then half way through inverts. It looks to me like the transmitter is trying to ensure 0 DC bias - this would make sense in a way as I believe that TOSLINK uses Manchester encoding.

So two questions:

  1. Is this behaviour people have seen with other TOSLINK transmitters? Are there "straight passthrough" transmitters out there?

  2. Does anyone have an alternative solution using fibre? The best option I have seen so far is the Avago HFBR series - easy to use (it seems) but relatively high cost. Any better suggestions?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Toslink uses Biphase Mark Coding, see en.wikipedia.org/wiki/Differential_Manchester_encoding Its receiver might well be optimized for this encoding, to trhe extent that it does not work well with UART encoding (= NRZ). \$\endgroup\$ Commented Sep 3, 2015 at 19:15
  • 2
    \$\begingroup\$ Your connection might be too slow actually: electronics.stackexchange.com/a/123727/54580 \$\endgroup\$ Commented Sep 4, 2015 at 3:13
  • 1
    \$\begingroup\$ Thanks for this @RespawnedFluff - the datasheet for the parts I have doesn't specify anything particularly, and I think my assumption that both the transmitter and receiver were operational down to DC was a naive one! The part recommended in your linked question is explicitly specified down to DC and for NRZ encoding. Will purchase and see how it goes. \$\endgroup\$
    – stefandz
    Commented Sep 4, 2015 at 11:14

2 Answers 2

4
\$\begingroup\$

You could add additional modulation, it would keep the receiver devices ALC features happy.

As you have at least 3 MBit/s data rate available you have quite a lot of headroom.

You could use basic FSK modulation with two tones of say 250kHz and 1000 kHz.

This would let you use a rather simple demodulator (pulse width comparator) and have less than 20% bit edge jitter.

Higher frequencies could be tried but require more careful design work.

EDIT:
For those not regularly worried about such things ASYNCH comms is designed to be able to tolerate a nominal half bit period edge jitter, this because the sampling of bits should occur in the middle of the bit cell and the start edge is assumed to be the reference point. This means that you can have up to half a bit timing error on the last (of usually 10) bits and still decode correctly. So 50% also corresponds to a cumulative 5% bit period error (or clock error) over 10 bits. Edge jitter from a simple FSK modulation system is not cumulative but adds to the clock error budget.

Clocks these days are pretty good so using a 5 x oversample will leave the signal looking noisy but well within spec.

\$\endgroup\$
2
\$\begingroup\$

This turns out to be a lower limit on the acceptable bandwidth of some, possibly most TOSLINK receivers - typically 0.1Mb/s. The ones I originally purchased came with very scant information, only detailing that they accepted a TTL input and various current / voltage limits.

Looking at the datasheet of a particular TOSLINK receiver mentioned in this ESE question, there is a much more explicit claim that operational frequencies extend down to DC and that includes for NRZ encoding such as simple TTL UART.

While FSK modulation may be a choice for some, since the datasheet on the originally selected part was so poor I didn't want to risk it, and so instead went for a DC rated part.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Thanks to Wouter van Ooijen, Respawned Fluff and KalleMP for their help with this - I wrote my own answer because I felt it summed up the actual issue best and might be more useful for future searchers. \$\endgroup\$
    – stefandz
    Commented Sep 7, 2015 at 20:09
  • 2
    \$\begingroup\$ Limited specs is always frustrating, even if one tests to determine operational characteristics the danger that a newer batch of parts may behave differently if the specifications are not documented. Using a part not rated for DC has the probably advantage of a built in ALC (the possible problem in this case with NRZ data) as they can usually operate over longer distances due to gain control that compensates for link loss. Not likely to make any difference on a short link in this case. \$\endgroup\$
    – KalleMP
    Commented Sep 9, 2015 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.