Jump to content
Sterny

Questions on SFP transceivers in hobbyist projects.

Recommended Posts

Yes, I am glad someone resurrected this topic. I fell into a black hole of busyness after I posted my replies.

 

If I were to tackle this hardware design myself, I would:

- pick the serial port

- configure it for 1Mbps

- attach LVDS drivers and receivers to the TX and RX pins

- connect those LVDS ports to the SFP cage

- connect the I2C port to the SFP module's diag port

- write a device driver for the SFP module which uses a state machine to keep track of flags and packets and stuff

- write a test program that does local and remote loopback.

- write a test program that acts like a serial port bridge

 

If the serial port talks too slowly then I would find a faster two wire serial peripheral and repurpose it. How about that serial audio interface port? It's pretty fast. I might have to create a circuit to regenerate the clock signal from the optical signal but that's not uncommon.

 

I'm just thinking out loud.

Share this post


Link to post
Share on other sites

Yes, I am glad someone resurrected this topic. I fell into a black hole of busyness after I posted my replies.

 

If I were to tackle this hardware design myself, I would:

- pick the serial port

- configure it for 1Mbps

- attach LVDS drivers and receivers to the TX and RX pins

- connect those LVDS ports to the SFP cage

- connect the I2C port to the SFP module's diag port

- write a device driver for the SFP module which uses a state machine to keep track of flags and packets and stuff

- write a test program that does local and remote loopback.

- write a test program that acts like a serial port bridge

 

If the serial port talks too slowly then I would find a faster two wire serial peripheral and repurpose it. How about that serial audio interface port? It's pretty fast. I might have to create a circuit to regenerate the clock signal from the optical signal but that's not uncommon.

 

I'm just thinking out loud.

Yeah fwiw, I am probably not getting to this until Sept or Oct at the earliest, for now I've produced the PCB footprints & schematic components I need so that's ready... but in the meantime I have a GPS boosterpack and a CC1310 board (both PCBs shipped and on their way from China) to work on soon :-D

 

This might be on the back burner but at least the project's scope has been mapped out.  I would like to do it for kicks.  I am going to implement a current monitor on the VccR and VccT rails too for the SFP for my own curiosity's sake - could double as an SFP "tester" of sorts.  My current thought is to use something like an INA138, high-side current sense amplifier, buffered by an LMV358 (dual opamp) and routed to two of the ADC pins - or observed using my new oscilloscope.

Share this post


Link to post
Share on other sites

Yeah fwiw, I am probably not getting to this until Sept or Oct at the earliest, for now I've produced the PCB footprints & schematic components I need so that's ready... but in the meantime I have a GPS boosterpack and a CC1310 board (both PCBs shipped and on their way from China) to work on soon :-D

 

This might be on the back burner but at least the project's scope has been mapped out.  I would like to do it for kicks.  I am going to implement a current monitor on the VccR and VccT rails too for the SFP for my own curiosity's sake - could double as an SFP "tester" of sorts.  My current thought is to use something like an INA138, high-side current sense amplifier, buffered by an LMV358 (dual opamp) and routed to two of the ADC pins - or observed using my new oscilloscope.

Sounds like you need a better 'round-to-it' implementation ;)

Share this post


Link to post
Share on other sites

This is a very interesting topic for me. I am planning for an application where I need to connect to MCUs over long distance (around 10km and more) using OFC. The data rate I need is below 2M bits /sec. 
 
My concern is the following---- Will the SFP module work at this low frequency? I was planning along the way 
 

Yes, I am glad someone resurrected this topic. I fell into a black hole of busyness after I posted my replies.

If I were to tackle this hardware design myself, I would:
- pick the serial port
- configure it for 1Mbps
- attach LVDS drivers and receivers to the TX and RX pins
- connect those LVDS ports to the SFP cage
- connect the I2C port to the SFP module's diag port
- write a device driver for the SFP module which uses a state machine to keep track of flags and packets and stuff
- write a test program that does local and remote loopback.
- write a test program that acts like a serial port bridge

If the serial port talks too slowly then I would find a faster two wire serial peripheral and repurpose it. How about that serial audio interface port? It's pretty fast. I might have to create a circuit to regenerate the clock signal from the optical signal but that's not uncommon.

I'm just thinking out loud.

 
 Also, the module I am looking at (TL-SM321A) mentions specific protocol( IEEE 802.3z, CSMA/CD, TCP/IP) . Will I be able to use it for serial data? 

 

@@zeke  Since you have experience connecting FPGAs with SFP, what kind of data rate you designed the system for and did you implement any specific protocol?

 

Best regards

Share this post


Link to post
Share on other sites

The FPGA expert on our team took care of the VHDL programming while I designed the electronics.

 

Our first version had a data rate of 640Mbps. The second version had a data rate of 1.2Gbps.

 

At those speeds, the custom protocol needed to be enhanced with an 8b10b encoder in the VHDL code. That would enhance data reception by preventing excessive consecutive zero bits. The receiver would see nothing with many zeros because the light is off during a zero bit.

 

It is my assumption that a 2Mbps data rate is slow enough that the 8b10b encoder would be overkill.

 

Oh, the SFP modules have a speed rating. Get the ones that are rated for OC-3 or 155Mbps. The next speed option is OC-12 or 640Mbps. Also, make sure the SFP electrical interface is LVDS and not PECL.

 

The key for getting my proposed interface working would be a software routine that would send a repetitive keep alive message on the optical link. The receivers need to stay in sync with each other. So just send a tick-tock message at a regular interval to keep the link up and the receivers synchronized.

 

Thanks for keeping this thread alive. I keep forgetting to act on this design. I can see this hardware design working well because it is simple. It now looks like a software challenge to me.

Share this post


Link to post
Share on other sites

 Also, the module I am looking at (TL-SM321A) mentions specific protocol( IEEE 802.3z, CSMA/CD, TCP/IP) . Will I be able to use it for serial data? 

 

@@zeke  Since you have experience connecting FPGAs with SFP, what kind of data rate you designed the system for and did you implement any specific protocol?

 

I'm looking at the specs on the TL-SM321A and the first thing that pops out at me is that it operates on two different wavelengths - RX=1310nm and TX=1550nm.  

 

That tells me that it should have a matching SFP module and sure enough it does have a mate. It's the TL-321B where RX=1550nm and TX=1310nm.

 

I also noticed that it's a BiDi SFP module. That is, it transmits and receives on one strand of glass. That's cool but it makes the module more expensive and exotic.

 

When I think about needing 10km of fiber, I am not going to install only one strand of glass. I'm going to install as many as I can for the same cost.

 

So, that means that I can use a traditional duplex SFP module and I know that module will be less expensive and more common than a BiDi module.

 

If you can, try to optimize your system design to use a traditional SFP module. This means install a fiber cable with lots of fibers.

 

If, for some reason, you are compelled to use a single strand of glass (i.e.: financial reasons) then, of course, use a BiDi module. Just get a module that transmits and receives on the same wavelength if possible. 

 

 

Here's a list of specs I will be choosing for my project:

  1. TX = 1310nm
  2. RX = 1310nm
  3. SFP form factor
  4. Up to 155Mbps bi-directional
  5. Built in diagnostics
  6. Duplex LC connector
  7. Metal enclosure
  8. Single 3.3V power requirement
  9. Industrial temperature range [-40..85]'C 

I searched the Finisar website and came up with the FTLF1323P1xTR which fits the bill.

 

And, it looks like Digikey carries the FTLF1323P1BTR for a princely sum of $58.91 in single lot quantities.  That's a decent and respectable price for a singlemode module.

 

The nice thing about this module is the speed and the power ratings. You can run this slower than 155Mbps and its electrical side should slew just fine. Also, the TX power and RX sensitivity ratings are compatible which means that you can plug in an optical loopback cable and not overload (damage) the receiver. This means that testing the unit will be easier.

 

 

By the way, I regularly teach fiber optics courses (see www.ninemicron.com) and if you like I could put together a brief tutorial on how to design a fiber system from an Electrical Engineering point of view.

 

Just let me know.

Share this post


Link to post
Share on other sites

Yeah I haven't done anything with this yet either.  I did buy some SFP cages and SMD SFP connectors though.  Perhaps next year...

 

 

Oh!  

 

<fires up Altium>

 

I guess that means that there's a chance that I could beat you to the punch then!

 

;-)

Share this post


Link to post
Share on other sites

@@zeke,  Thank you for your input. For now I am planning to go with your suggestion of using traditional SFP module. I guess if I want to use BiDi module in future, its just the matter of replacing the module.

 

Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×