A few days ago we covered a project that brought Ethernet connectivity to the Raspberry Pi Pico using little more than some twisted pair and a RJ-45 connector. It was a neat trick, but not exactly ready for widespread adoption. Looking to improve on things a bit, [tvlad1234] has taken that project’s code and rewritten it into a friendly library you can use with any RP2040 board.
In case you missed it, the initial demo did 10BASE-T transmission by bit-banging with the PIO, and was able to send UDP messages to devices on the wired LAN. It was an impressive accomplishment, but its code didn’t make it easy to build your project around it. This new library makes UDP messaging as easy as a printf
, offloading all non-PIO-managed Ethernet signal work onto the RP2040’s second CPU core. The library even generates a random MAC address out of your flash chip’s serial number!
As a demonstration of the new library, [tvlad1234] has put together a simple Ethernet-connected temperature monitor using the BMP085 or BMP180 sensor connect over I2C. If you feel like you could use an Ethernet transmit-only sensor in your life, browsing the source code would be a great start.
This (desparately) needs receive functionality as well.
I would be very curious to see how this is eventually done, and if it needs (m)any extra components.
I was thinking that a enc28j60 board would be a way to go but that would be cheating and not in the spirit of this hack.
IMHO, this is really a waste of time. Without receive, DHCP is out of the question. So you’re going to have to make it static IP. Might as well just buy a W5500-EVB-Pico, or a EM510 MiniMo.
You could use multicast, broadcast or even raw ethernet frames if you worry about dynamic ips.
Ethernet require a transformer to isolate common mode voltage between different loads, using only resistors as here you made a short between different ground, risking to burn the 3V3 regulator or worse the RP2040 GPIO
are common RJ45 female connector with built in trasformer
Those of us who have actually read the linked article would know that it shows a rudimentary (and apparently adequate) pulse transformer being used.
take note that the whole female RJ45 connector of Raspberry Pi3/4 that has the transformer built in, is sized 20x16x13h mm and it is compliant with the standard
How does this invalidate that the hack HAS a pulse transformer? HaD might not be fun for you, if you only want to use ready-for-use industrial solutions. Just let people have their joy.
I just wanted to warn that without using a transformer a short between masses is made, while using a transformer with impedance not in compliance with the standard, the performance of the LAN are penalized by increasing the BER. Up to your joy
http://ww1.microchip.com/downloads/en/AppNotes/Capacitive%20Coupling%20Ethernet%20Transceivers%20without%20Using%20Transformers.pdf
yes, using capacitors instead of transformer, you have the advantage of very small footprint and remove the DC, so no risk of shorting GND. Anyway you have to choose between required receiver voltage swing or right termination resistance. In both cases you cannot reach the full performance of the standard 10 Mbps. This is why the IEEE standard recommend a pulse transformer with given ratio and impedance. Nothing impossible to do for an HaD user with fun, just use the right value, not a generic random ferrite choke
https://github.com/sandeepmistry/pico-rmii-ethernet
Just use a Pico W
Using the w5500 chipset is the better long term solution
Could a rp2040 cpu run directly inside a rj45 connector, with serial debug io and PoE. Turning a switch 48 PoE switch into a mini 48 unit cluster, all directed from a computer connected through dual sfp+ ports in the back.