Optical Serial Interface

Thread Starter

Art

Joined Sep 10, 2007
806
Hi Guys :)
I have a pic micro connected with it’s UART to a FTDI USB adapter, and that’s working nicely.
Now I’d like to use an optical interface, the first of which I’ve tried is Toslink.
I salvaged the Toslink receiver from a converter box that converts SPDIF optical to a coax cable.
It seems to output identical signal as the input signal from an LED, even when the LED is connected
to serial the output looks ok, but the serial inout to the chip is garbage.
There was a ceramic capacitor in series with the optic receiver’s output in it’s original application,
which I didn’t use because 2400 baud should still look like a DC signal.
The original application, the signal was buffered with a 7404 (after the capacitor).

Has anyone tried this?
Cheers, Art.
 

Alec_t

Joined Sep 17, 2013
14,280
The cap may have been there to eliminate a DC bias. Try putting it back in and see if you get the signal you expect.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Hi Alec :) It looks like it will be ok now.
I had some lunch connecting a 0.1uF cap across the receiver output and gnu,
and also the voltage driving the LED had to be lowered.
Still not perfect, but more characters are making it than not.
 

Thread Starter

Art

Joined Sep 10, 2007
806
Yes it was about 3am here when I got it working properly :D
There's still no cap in series with the signal from the receiver.
It works reliably with 0.2uF capacitance between the signal and ground.
 

Alec_t

Joined Sep 17, 2013
14,280
A somewhat surprising solution, but hey, if it works it works :). Perhaps the cap shunts high frequency noise to ground without unduly affecting the wanted signal?
 

Thread Starter

Art

Joined Sep 10, 2007
806
I had another play with it today. Now the signal output is fed directly into two inverters of a 7404
(the second inverter to put the serial back true because the signal output is true to begin with),
and now only a single 0.1 uF cap between the second inverter output and ground where it also
connects to the micro UART input. I couldn’t tell you right now if the capacitor is still needed.
The 7404 would limit frequency to about 8MHz, but I don’t know if the noise was faster than that.
I was just copying the application I stole that receiver part from where it’s buffered with 7404 as well.

It’s a definite win, I have sent text files at 2400 baud with no error, and my application only requires 5 byte commands! :)
 
Top