# USB to Optical Signal Conversion

I have a video signal coming from a composite video out (we can ignore audio at this point). Products such as EasyCAP can convert such signal to usb differential(d+/d-) signal. Arduino/raspberrypi can process the incoming signal voltage from usb and modulate the LED accordingly. Modulate LED light to transmit the digital usb signal (d+/d-) to the receiver end. At the receiver end the generated optical signal needs to be converted back to equivalent voltage, this voltage will be fed to a usb-->composite video converter to play on the screen in real time. (At Receiver end is a PD to convert light to voltage. Again, for processing either arduino/raspberry pi.)

Now, From usb i have d+ and d- differential signal coming out. How do I achieve equivalent optical signal from it? How do I establish the half duplex system (any code)?

• USB is a bidirectional system that requires full duplex. Your best strategy is to take the captured, compressed data on the first system (Pi) and trnsmit it to the second with an optical networking system, such as TOSLINK. – pjc50 Jul 13 '15 at 5:31
• Since I am considering USB 2.0 may be half duplex would be sufficient at this stage? How do I capture/compress such data on Pi? Please elaborate or give example. TOSLINK is wired, I am considering a wireless optical system. – kate winslet Jul 13 '15 at 5:46
• Do you have any suggestion on this one? USB -> UART -> OPTICAL at the transmitter end. On the receiver end, PD -> UART -> USB – kate winslet Jul 13 '15 at 7:38
• Kate, can you elaborate what is your final goal here? If you want to transmit a composite video signal, and then reconstruct the original video signal at the other end, it is possible. If you want to replace an USB connection with an optical link, it is a way more complex topic than lighting a LED. What you have on the USB is a two way, super-high speed digitial communication. Replacing that with optical is a very advanced EE topic, considering the speed and timing requirements. – Gee Bee Feb 10 '17 at 17:56

10 megabit ethernet is a simple digital signal, so convert your video into a UDP stream, and wire the sending ethernet pair to a LED

at the other end you'll need to amplify the signal such that it can be fed into an etherent socket,

10MBit ethernet has a frequency range of 10-20 Mhz so LEDs should bet fast enough

A raspberry Pi might work well at both ends, it has ethernet, USB, and analogue video out.

10Mbit/s is fast enough for compressed video, but not for raw digitised video, fortunately the raspberry pi has a built-in H.264 codec.

Netcat might be all that's needed to send and receive the UDP stream, but you may need to tweak the ARP tables to get the ethernet layer lined up to work with a simplex (monodirectional) link.

this might be a plan of action:

1. make it work with easycap and one raspberry pi between the camera and the display
2. replace the single raspberry pi with two connected by a LAN
3. replace the LAN with a cross-over cable
4. override autonegotiation the get the cable running at 10Mbit speed
5. replace the cross-over cable with a single pair cable
6. replace the single pair with an optical link.
• How do I use netcat to convert my video to a UDP Stream. Please kindly suggest. Any example would be helpful to learn. Thank you. – kate winslet Jul 15 '15 at 3:24
• find something that pruduces H264 video on stdout and pipe that output to nc -u {host} {udp port} host can be a LAN broadcast address if you want. – Jasen Jul 16 '15 at 21:28