3

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?

stefandz
  • 4,132
  • 17
  • 41
  • 1
    Toslink uses Biphase Mark Coding, see https://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). – Wouter van Ooijen Sep 03 '15 at 19:15
  • 2
    Your connection might be too slow actually: http://electronics.stackexchange.com/a/123727/54580 – Fizz Sep 04 '15 at 03:13
  • 1
    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. – stefandz Sep 04 '15 at 11:14

2 Answers2

4

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.

KalleMP
  • 4,039
  • 1
  • 14
  • 32
2

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.

stefandz
  • 4,132
  • 17
  • 41
  • 2
    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. – stefandz Sep 07 '15 at 20:09
  • 2
    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. – KalleMP Sep 09 '15 at 16:36