Homemade 10 Mbit/s Laser / optical Ethernet transceiver

Today’s network backbones don’t use copper wires any more — they use lasers to transmit information. The laser light usually propagates in a fiber, but while convenient, this isn’t strictly necessary; you can also send the laser light through the air in a collimated beam, like an ordinary laser pointer.

Because this sounds cool, I thought I could build something like that. Here’s the prototype:

Laser ethernet transceiver prototype in operation

Concept

For simplicity, I decided to limit the scope to 10 MBit/s ethernet. This old standard is both conceptually as well as electrically (lower frequencies) simpler than the more modern 100 MBit/s or 1000 MBit/s standards. After a bit of research, I noticed that it’s not necessary for the transceiver to understand anything about ethernet; it’s sufficient to simply provide optical send and receive channels, and convert the electrical signal to optical intensity and back one-to-one.

The idea is now simply to build two identical boards with an ethernet RJ45 connector on the one side, and a send/receive optical transceiver on the other side. When pointed at each other, the boards mediate the ethernet signal from one RJ45 connector to the other.

Theory of operation

Each board consists of a transmit channel, a receive channel, and some meta components (power supply, fuse …).

Transmit channel

The task of the transmit channel is to take the electrical ethernet signal transmitted by computer A and convert it into an optical signal by varying the brightness of a laser diode. The schematic is shown below. The part with the operational amplifier is simpy a constant current source, which sets an “offset brightness” for the laser diode. The actual TX signal is then added to this offset brightness through AC-coupling (C23, C7 perform the coupling, R24, R6 set the optical amplitude, and L1 and L3 isolate the high-frequency signal from the DC offset current).

The bias current is selected such that in LOW state, the laser diode is still in laser mode (“glowing brightly”). With a modulation amplitude of about 4 mA and a laser threshold of about 12 mA for this type of diode, I set the bias current to 19 mA by tuning potentiometer RV1.

With this, we now have a laser diode changing its brightness in sync with the electrical signal of the ethernet twisted pair cable.

Schematic of transmit channel

Receive channel

The receive channel is slightly more complex. Its purpose is to detect the optical signal generated by its sister board, convert it back into an electrical signal, and drive that electrical signal into the receive (RX) cable pair of the conntected ethernet cable.

It starts with a transimpedance amplifier, which converts the photocurrent of a reverse-biased photodiode (SFH203P) into a power signal, with a gain of 1 kOhm.

The high bias voltage of the photodiode, about 35 V in practice, lowers the intrinsic photodiode capacitance and through that enables it to respond more quickly. This bias voltage is generated by an on-board DC booster (MIC2605).

Schematic of receiver transimpedance amplifier

After this stage, the signal is still quite weak and noisy, as can be seen below:

Received signal after the transimpedance amplifier

To convert this into something which can be driven into the ethernet cable, a comparator (LT1713) is used. Conveniently, it already provides an inverted- and a non-inverted output, which makes it easy to drive a differential cable pair. Unfortunately, it does not support the high output current we need (5 V into 100 Ohms differential), which is why an additional dual operational amplifier is used as a buffer (MAX4392).

After the comparator, the signal looks much nicer:

Inverted output from the comparator.

The full schematic is available here.

Assembly

Armed with this schematic, I layouted a printed circuit board with SMD components in kicad, and sent it off for manufacturing. In addition to the transmit and receive channels and the DC booster, it contains a 5 V linear regulator, a fuse, and a 9 V DC input jack.

These are the manufactured boards (front and back):

Empty PCBs manufactured by Elecrow, top and bottom side. Size is 5cm x 5cm.

With soldering iron and a bit of help of the trusty chinese 858D+ hot air gun I assembled the first board step by step, testing the parts individually. Apart from one 200ยตm misplaced drill hole and confusing one “output latch” pin with “output enable” on U3 (both errors were easily worked around) everything went smoothly and this is the final board:

Final assembled board. The green LED indicates the presence of the 5 V supply, the yellow one is for the 35 V supply from the DC booster. The parts next to the big yellow tantalum cap are the laser diode (with red and blue wire) and the photodiode.

The laser diode is fixed with a simple cable tie. The screws have springs below them to allow for some tuning.

Insider question: if you look at the schematic, with C3 = 3.3 pF, U1 oscillates at something like 500 MHz. Why? C3 was supposed to highpass-filter the feedback loop and stabilize U1, not the opposite … with C3 not connected it works fine. Any insights welcome. Note that U1 is a current-feedback opamp, i.e. the inverting input is low-impedance. (Update: explanation here: http://www.analog.com/en/analog-dialogue/articles/compensating-current-feedback-amplifiers.html)

The next simple step after assemby of one board is to put a mirror in front of it and look if the transmitted signal is the same as the received one. And indeed, after some tuning, this worked and my notebook got confused by seeing itself in a mirror:

e1000e: eno1 NIC Link is Up 10 Mbps Full Duplex, Flow Control: Rx/Tx
IPv6: eno1: IPv6 duplicate address fe80::d6be:d9ff:fe85:330a detected!

This looks great! Thus I went on and built a second board.

Results

I mounted the two boards on a piece of wood and aligned the laser beams (not simple even for this small distance, unfortunately):

Test transmission section seen from the side. This is just about 10 cm of air between the boards (each board is 5 cm by 5 cm).

I booted up my Raspberry Pi as second computer and connected it with an Ethernet cable to one of the boards, and my notebook to the other one. And surely enough, they established a connection immediately:

e1000e: eno1 NIC Link is Up 10 Mbps Full Duplex, Flow Control: Rx/Tx

Fortunately this works even with auto-negotiation enabled (where the two computers decide on the data rate by themselves). This is not trivial, because both sides in this case think they support 100 MBit/s, but in practice only 10 MBit/s works. But for those two devices, after a few failed connection attempts with 100 Mbit/s, they switch to 10 MBit/s automatically (if this were not the case, it would be easy to force both devices to 10 Mbit/s mode manually).

Front view

I can also ping the Pi from my notebook:

ยป ping -i 0.025 192.168.1.52
PING 192.168.1.52 (192.168.1.52) 56(84) bytes of data.
64 bytes from 192.168.1.52: icmp_seq=1 ttl=64 time=0.843 ms

Transferring files over ssh works as well, with the expected data rate of about 1.1 MByte/s. If the lasers are aligned properly, there does not seem to be any packet loss, as tested by ping -f:

1799339 packets transmitted, 1799338 received, 0% packet loss, time 1465837ms 
rtt min/avg/max/mdev = 0.597/0.753/11.748/0.049 ms, ipg/ewma 0.814/0.735 ms

Next step is to test this with a bit bigger distances between the boards.

Below are a few more pictures (click for proper quality and size).

Front view

Side view

Categories: Everything

Tags: ,

35 replies

  1. Great Work!

    I have a question though.
    Is there any blocker that makes you not use a pair of normal optical cables as a transfer medium ?

    • Well, the idea was explicitly to build a wireless link, so there’s that ๐Ÿ˜‰

      Otherwise in principle no; though you need a fiber coupling optics and an optical connector. That will make things expensive, larger in size, and reduce efficiency, at least for small distances, because the coupling efficiency into the fiber will be not very good.

  2. Well done! This is a very interesting project.
    I want to try it.
    Can you sell the PCB, or maybe fully assembled boards?

    • Thanks! I don’t really want to get into selling things at this scale, it’s so complicated and somehow doesn’t seem worth it … I can certainly publish the design files though, or email them to you, so you can have some manufactured yourself (that costs something like $20 for 5 pieces), if you’re interested in doing that.

      You would also have to buy the components though, and soldering is not entirely trivial (the DC booster for example is quite small).

      I’m also not super happy with all of the design decisions; alignment is a bit difficult, the circuit is lacking ESD protection at its input, things like that, so before I would order new PCBs, I’d suggest a few changes.

  3. What’s the maximum optical power output in normal operation and under fault conditions? How does that compare with eye safety regulations?

    The last time I investigated laser diode characteristics, they had a very sharp V-vs-I-vs-Pout characteristics. That meant it was easy to overdrive them (until the facets disintegrated!) and they would emit dangerous amounts of light.

    You’ve only got one pair of eyes, and they can be destroyed in an instant.

    As people who work with lasers are repeatedly taught, “do not look into laser with *remaining* eye”.

    • Output power should be something like 5 mW CW, I don’t know exactly, I don’t have the necessary measurement equipment at home. The average electrical power going into the diode in normal operation is something like 7 mW though, so it can’t be much more. AFAIK 5 mW CW red is considered eye-safe even if you look directly into the beam (eyelid closure reflex will save you).

      It’s certainly possible to hurt yourself with this diode though, if you do it sufficiently wrong. The trick with laser safety is not to look into the beam.

      In my feeling, as soon as you have some orderly setup, the risk of hurting yourself even with a bright laser is quite small; you have a well-defined beam path, and you just don’t look into it, and all is fine. Caution is especially required during assembly and while experimenting.

      • So could the laser be replaced with an array of IR LEDs?

        • You can replace it by an IR laser diode, but not by plain IR LEDs, because you cannot collimate the output of a LED into a beam.

          • You can collimate LED outputs. It is a standard technique to increase both range and safety.

            If the output isn’t symmetric then you may benefit from an aspheric lens.

            Immediately after exiting the lens the collimated beam will be wider than the uncollimated beam before it enters the lens. More importantly, at the receiver the collimated beam will probably be narrower than the uncollimated beam, so more energy will be received.

          • Let me correct myself: you cannot losslessly collimate (incoherent) LED outputs. Incoherent LEDs (by that I mean non-lasing, non-superluminescent ones) have a large Etendue (see https://en.wikipedia.org/wiki/Etendue) which you cannot decrease by any means, and thus you cannot form a laser-like beam unless you discard most of the energy by using a slit.

            Quite probably the beam quality of the laser diode could be improved as well by better optics, you’re right there.

          • I’m not sure what you mean by “losslessly”; the same energy exits a lens or reflector in the collimated beam as entered in the uncollimated beam.

            Now, as I stated, the collimated beam is wider when it exits lens or reflector. If the beam area is larger than the receiver at that point then less power will indeed be received at that point.

            However, if the receiver is some distance from the lens it may receive more power from the collimated beam than the uncollimated beam – and that’s what matters from the system point of view. It all depends on the simple geometry of beam width, divergence, and range.

            And that’s why many real world professional commercial systems collimate LED outputs.

          • Do you have an example of a professional system wich collimates LED (non-laser, non-superluminescent) output to increase range? I think that is not possible and violates a fundamental law of thermodynamics, but I’m happy to change my opinion. You can decrease beam divergence for small distances by creating a convergent beam with a second beam waist, but that will make the beam diverge faster beyond that point in return. Maybe you can achieve some small improvement due to some secondary effect I overlooked, but a large improvement is not possible.

            Yes, you can create a beam with a certain width, but the divergence of the beam will be related to the area of the light source you put in front of the lens. The amount of power propagating in the exactly parallel direction (in the differential sense) can only be increased by increasing the source area brightness density.

          • I’m afraid it is >35 years since I worked in the area, so any commercial equipment knowledge is out of date – and the equipment has probably never been described on the web! I do remember considerations similar to those you mention w.r.t. launching power into multi-mode optical fibres, but that’s rather different to free-space optics.

            I’m sure there are rangefinders and free-space comms equipment with collimated outputs, but I’m not going to spend time looking for them.

          • Those use lasing or superluminescent diodes. If you could use simple broadband LEDs for range finders, people would love to do so (because most properties of lasers, such as temporal coherence, are actually undesirable for the application) — but it’s not possible. The exact same argument holds for fiber coupling.

          • Sorry I was thinking of an omni directional system but I had a brain fail and forgot that it would need to be duplex so the two sides would interfear with eachother.

      • So, you don’t know, and faults could cause >>5mW to be output. It could cause “life changing injuries”.

        For starters, look at how little extra voltage/current is required to vastly increase the optical output. Now demonstrate what happens if there is a PSU glitch, or one component fails, or there’s an ESD into the worst possible node.

        You really REALLY should look up and thoroughly understand the eyesafe limits. One point of reference is that in a classroom a laser even a 0.5mW laser is marked “don’t stare into it”.

        Edit: removed part which I think is unsuitable in phrasing and content for this discussion. -Sven

        • I am not selling this device, nor am I using it in public space. I know about laser safety and I think I can realistically estimate the risk for myself.

          This kind of laser is roughly in the 3R safety class. Lid closure reflex will protect you it, and while it’s certainly not safe to stare into it, accidentially inflicting serious harm to anyone with it is very unlikely. While it’s certainly bad to under-estimate dangers from laser radiation, you can also over-estimate it.

          An ESD event will instantly destroy the diode, and a few-microsecond pulse of a higher intensity will not cause any harm because its total energy contents are not sufficient. The diode also dies very quickly if you power it with more than its design current, I tried that out inadvertently more than once ;p

          • Sven, this guy is obviously trolling or has no idea what he is talking about. Although he has added nothing to contribute to the conversation, I feel your responses to him are well thought out and I did learn a few things from them so I will give Tom credit on extracting some extra knowledge from you, albeit in a ridiculous way. I am very interested in this and would also be interested in looking at the board layout as well. I will post my gmail account and would love to learn more about this. Thanks

            gorrell72@gmail.com

          • Hey Greg, I published the design files here: http://files.svenbrauch.de/laser-ethernet/
            Have fun with them ๐Ÿ™‚

            I try to avoid mud fights with people on the internet, so I attempt to only reply to the factual statements and ignore / delete the rest … not sure what else to do.

  4. Excellent project. I have been looking for a way to extend my network to another building, so this looks promising. What changes would be required to achieve 100MBit/sec?

    • Unless you are interested in tinkering with electronics just for the sake of it (like me), I’d recommend to buy a professional commercial product (i.e. not this) for practical use.

      For 100 MBit/s I think you need quite some changes, I’m not even sure whether the concept of not having an extra MAC can be sensibly carried over to 100 MBit/s. I think if you want this with more than 10 MBit/s, it’s better to start from scratch.

  5. Really excellent job, Sven!

    This idea is something I had the intention to develop a few years ago during my Bachelor’s studies.

    I also thought about using an USB to Ethernet board to make it “portable”, just for experiments and maybe ending with an USB to SFP “converter” (could be used for something like the Koruza project: http://www.koruza.net/).

    Perhaps you have also come across other similar projects in the field of free space optics, for example this one regarding Li-Fi:

    http://rishifranklin.blogspot.bg/2014/07/visible-light-communications.html

    By the way, are there any spare boards left? ๐Ÿ˜‰

    Keep up the great work!

    Kind regards,
    Nikolay

    • Thanks! ๐Ÿ™‚

      Yes, I’ve seen a few other projects, mostly after I did this one already though.
      I think the biggest issue with applying this in practice is the alignment, if you want it to be at least somewhat portable you need a concept on how to simplify that.

      I have a few spare boards left (4 or something), I can send you 2 if you like. You need to buy a plethora of components though (costing about $30 per PCB), and you need some soldering equipment and experience to assemble it (the DC booster for example is in a 2mm x 2mm 8-pin QFN package with 0.5mm pin spacing and exposed pad).

      Best,
      Sven

  6. Hi,
    Very interesting project, would you mind to share the source off, or more details on the laser diode?
    Best regards
    Christian

    • Hi, thanks! Source files (kicad) are here: http://files.svenbrauch.de/laser-ethernet/
      There are a few issues on the PCB still, esp. the drill holes of the ethernet connector are off a bit.

      I don’t have any details on the laser diode either, I got them off ebay, and measured the characteristic curve myself. It’s specified for a maximum current of 25 mA apparently, is all I can say.

  7. This is so cool! Question! If you used another laser ( blue laser led for example) and some wavelength filtering in the photodiode side maybe. You think full duplex could be achieved?

  8. Hi Sven,

    great work. About the issue with C3 = 3.3 pF (U1 oscillates): Do you have used the equation(s) of the Analog Devices article linked by you? Bear also in mind that U1 and other parts are not ideal ones, e.g. the 47uF Tantal (C1) does not have 47uF at 10MHz anymore (actually I found a value of only about 3uF in a datasheet). Since the circuit is working well without C3 (doesn’t it?) I wouldn’t bother much about this.

    Regards,
    Stefan

    • Hi Stefan, yes, I used the equations, they come up with an ideal value for the capacitance which is extremely small (order of magnitude of the parasitics I’d say). And indeed, not putting any lumped capacitance makes it work …
      The confusion just originated from the fact that thinking about a voltage-feedback opamp, putting a bigger capacitance makes it more stable. It bothered me that the exact opposite happened without a clear explanation why. It’s certainly fine like this now.

      I’m aware about C1 — the frequency in question is more like 1 MHz though (dc booster switching frequency), and 3 ยตF is probably fine. I used a tantalum because every other option is even worse at 35 V.

Trackbacks

  1. Go Wireless with This DIY Laser Ethernet Link - worldnews

Leave a Reply

Your email address will not be published. Required fields are marked *