Electronic – Using SFP modules from a microcontroller

embeddedethernetoptical-fibreoptical;uart

I'm interested in having an embedded device send data optically. This is for test and measurement, where having conductive cables is problematic since it will perturb the measurement. The device is built as a prototype now except for the data sending interface. The data rate requirements are moderate (10-20Mbps one way). The distance is short, 5-10ft. This is somewhat power limited, but using 0.2-0.5W for comms is okay.

I looked at IrDA but that seems to be almost completely obsolete, and the data rates are too low (other than the very unavailable UFIR/GigaIR). I also looked at TOSLINK, and that seems to be almost-obsolete, and I can't source fast (125Mbps) transceivers, nor can I figure out how to run the slower 10MBps ones reliably at anything close to their max rated speed.

Now, I could hack some kind of completely proprietary UART-over-fiber protocol, or wait for LiFi, or mod some of the really expensive Corning optical USB cables to not have a power conductor… all of these are problematic in various ways. Then I thought, why not just use SFP transceivers on both ends?

I have only a very basic idea of what is inside a SFP, and essentially no idea how to talk to it. Could someone explain to me how to drive a SFP from a microcontroller? Either (a) a UART-over-fiber using SFP and microcontrollers on both ends, or (b) ethernet using SFP from a microcontroller and regular SFP ethernet device on the other end?

P.S. If it matters, the microcontroller is a STM32F446; I would like to stick with STM32 if possible. The device is battery powered from a 2500mAh lithium ion battery.

P.P.S. I can build devices on both sides of the link; the near side would probably have some kind of optical-to-USB-serial converter, if it is not simply ethernet.

Best Answer

Looking at what's in the SFP modules, it may not be all that difficult to use them directly.

Since the signals are AC coupled to LVDS, you'll need to communicate in a DC balanced protocol such as Manchester, which your chosen ARM may or may not support (my current favorite Microchip SAME70 does support it). And, of course, add LVDS receiver/transmitters. You may be able to ignore the EEPROM since you only want to work with a single type of SFP module.

Judging by the values shown, you'd probably have to keep the frequency at 10MHz or higher, which you will need to do anyway for that data rate.

May or may not be worth looking into further, but it does look promising to me. Here's an excerpt from the above pdf document:

enter image description here