Maker Creates DIY Raspberry Pi Pico GPIO Ethernet Connection

Raspberry Pi
(Image credit: Twi_Kingyo)

Twitter user Twi_Kingyo doesn’t need a Raspberry Pi Pico W to get network connectivity. Today we’re sharing a clever project they’ve created using a regular Pico wired to an Ethernet adapter via its GPIO. While this is only a partial connection, the testing so far shows promising results.

The connection allows support for 10BASE-T communication on the Pico microcontroller. This designation comes from IEEE, the Institute of Electrical and Electronics Engineers, and indicates its ability to carry 10Mbps Ethernet signals using a twisted pair cable.

As of writing, the adapter is not suitable for PoE (power over Ethernet) equipment and is limited in what it can handle. According to Twi_Kingyo, it’s capable only of transmitting via UDP. There are plans in the works to implement a receiving process but for right now the Pico can only send data through the connection.

If you want to recreate this project or develop something similar, it doesn’t take much hardware but you will need a few specific components to pull off the connection. Of course, you’ll need a Raspberry Pi Pico but you’ll also need two 47 Ohm resistors as well as one 470 Ohm resistor. These are connected to GPIO pins 16 and 17.

Twi_Kingyo recommends adding a pulse transformer for added safety. This was accomplished in the project demo by wrapping the twisted pair cable around a ferrite core. To get a closer look at how the project is constructed and what the software side looks like, check out the official project page over at GitHub where the source code is also available to explore.

To make this Raspberry Pi project at home, we definitely recommend not only the GitHub page but also the Twitter thread for help where Twi_Kingyo has shared a few more insights into the creation of the 10BASE-T Pico connection. Be sure to follow Twi_Kingyo for more cool Pi-based projects as well as any future updates on this one. 

Ash Hill
Contributing Writer

Ash Hill is a contributing writer for Tom's Hardware with a wealth of experience in the hobby electronics, 3D printing and PCs. She manages the Pi projects of the month and much of our daily Raspberry Pi reporting while also finding the best coupons and deals on all tech.

  • chaz_music
    Very interesting article and a clever idea! I like ideas like this that add a twist.

    Note that the photo shows a common mode filter and not an isolating pulse transformer. Ethernet cards use a pulse transformer to provide galvanic isolation as well as trying to get minimal parasitic capacitance through the transformer and stopping conducted high frequency noise from circulating around back through the building and through the power supply parasitic capacitance.

    The common mode filter in the picture helps with reducing that circulating high frequency current by adding common mode inductance but not adding much differential mode inductance which would screw up the data signal. This is the same as the molded in EMI cores that you see on some HDMI and Display port video cables and the power cables for those same monitors. The HDMI cable core is to block the conducted EMI through the HDMI cable, and the power cable core blocks whatever get into the monitor from the video source and what the monitor creates itself from going into the power plug.

    If those core are not there, the circuit path back through the monitor and PC is: (1) PC video out to monitor, (2) monitor power to PC power, and (3) PC PSU out to motherboard. The PSU in the monitor and the PC have galvanic isolation (think 50/60Hz), but often the isolation has very high parasitic capacitance which also high frequencies to easily pass right through. The EMI heartburn is caused by the path into the building power network, since it can flow elsewhere in the building and upset sensitive electronics, especially RF systems (WiFi, cell, Bluetooth, etc.).

    A pulse transformer isolates for low frequencies including line frequency and even DC. It is not unusual for large buildings to have both AC and DC components across the building ground structure (really!). (On a side not, high AC noise causes GFCI issues and DC causes corrosion issues on pipes and gas lines). If there is any transient system in the building such as a welder operating or an HVAC system turning on, there will be a fast transient on the building ground as well as the parasitic capacitance in these loads gets quickly charged (like the motor winding capacitances in the HVAC). The pulse transformers help block those from upsetting the data being sent as well as the Ethernet electronics, which is one reason Ethernet has been so successful from a hardware standpoint.

    -Charles
    Reply
  • CooliPi
    Adding to a great reply from Charles: the main reason why is twisted pair ethernet so ubiquitous and successfull is mainly its galvanic isolation. Even car automakers are pushing it for car cameras as a solution, what's why single-pair ethernet was born. HDMI, for example, doesn't have DC isolation and that's a reason why a TV or a monitor gets desynchronized sometimes - if the grounds of connected electronics aren't coming from the same socket (or a circuit), the DC or large AC component on ground pushes the incoming signal beyond allowed range on a receiver. Most signalling protocols are based on CML logic (DVI, HDMI,...) which has kinda low range of allowed voltages for signal, albeit being differential.

    The pulse transformer for 10BaseT ethernet has sharp filter in it at about 17MHz. This helps to filter out EMI even on differential wires - the higher harmonics don't carry any unique information, just the same as the first harmonics (5/10MHz, Manchester II modulation). So, the wires propagate only low frequencies that are near sinusoidal shape.

    There are various winding ratio transformers, depends on voltage the source equipment runs on. The original 10BASE-T transmitter sends two differential voltages, +2.5 V or -2.5 V. So, a 3.3V microcontroller may need a different ratio transformer than 1:1 Output impedance should be matched to the transformer differential impedance.

    We've used Manchester encoding on one of our DIY free space optic laser links for carrying the other side RSSI in digital form. Very nice, balanced encoding, every Baud has an edge to synchronize with, but you need to oversample at least 2x to sample the right information, not an edge of a signal. Or have a hardware PLL to do it. It either passed ethernet signal through, or flipped a MUX and transmitted our RSSI 4 byte sequence with 2 byte preamble (0xAA55) to sync on, even though at a much lower Baudrate to be receivable by a x51 microcontroller state machine running under interrupt routine. Long enough to pass 10 bits of RSSI signal to the other side.

    The former 10Mbit Realtek 8029 ethernet cards had a bad PLL, which was corrupting data. Our LAN party was sometimes interrupted as one of the stations with this bad card by design sent or received something which passed ethernet frame CRC , but the game running over raw ethernet frames couldn't detect it. I've inspected the frames later and found out, that it flips bits so frequently, that on some words a 0 is 1 and some words later on the same bit position (in a word), a 1 is 0.

    Back to Pico, to sync on a 10Mbit/s receiving frame, it would need to sample at least at 20MHz frequency. With the state machine IO Pico has, it might form a simple serdes and pass the incoming data to one core for reception. So, it may actually work. Only a decent comparator behind a pulse transformer would be necessary if Pico doesn't have it on any inputs (some microcontrollers do have it).

    A caveat might be a link presence pulse, which is unipolar. It might wreak havoc with the receiver state machine if not managed correctly.

    Protective TVS diodes may be a welcome upgrade. Nowadays, they're cheap and have low parasitic capacitance.

    Correct me if I'm wrong, please.
    Reply