Ethernet DISCUSSION

W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

Started by shreyash W5500 vs ENC28J60hardwired TCP/IPlwIPembedded Ethernet controllerLAN8720 PHY
4 replies 248 views 5 participants
Latest activity · 30 Sep 2026

W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

shreyash Ethernet Forum
#1

I need wired Ethernet on a small sensor node that publishes readings by MQTT every few seconds and serves a simple configuration web page. Candidate approaches are an ENC28J60 module, a W5500 module, or moving to a microcontroller with an internal MAC and an external PHY such as the LAN8720, running lwIP.

How do these three differ in what the microcontroller has to do, and what are the practical limits of each?

Community replies 4

Re: W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

#2

The difference is where the TCP/IP stack runs. The W5500 contains the MAC, the PHY and a hardwired stack covering TCP, UDP, IPv4, ARP and ICMP, with eight sockets and 32 KB of internal buffer memory. The microcontroller talks to it over SPI at socket level: open, connect, send, receive. It never sees an Ethernet frame, so even an 8-bit controller with 2 KB of RAM can hold a TCP connection open.

The limits follow from the same design: eight sockets, IPv4 only, no built-in TLS, DNS or DHCP (those run as small library code on the microcontroller using a socket), and behaviour you cannot change because the stack is in silicon. MQTT plus a small web page is comfortably within its range.

Re: W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

#3

The ENC28J60 is only a MAC and a 10BASE-T PHY with an 8 KB packet buffer behind SPI. Every protocol above the raw frame (ARP, IP, TCP, DHCP) has to run on the microcontroller. A standard Ethernet frame is up to 1518 bytes and a full-size TCP segment carries 1460 bytes of payload, so a small AVR cannot even hold one full frame in RAM. The Arduino-class libraries cope by limiting packet sizes and the TCP window, which works for small exchanges and gets fragile with web pages or several connections.

It is also limited to 10 Mbit/s and does not perform auto-negotiation, so a switch port detects it as half duplex. Forcing the chip to full duplex without configuring the switch port to match creates a duplex mismatch, with collisions and lost packets.

Re: W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

#4

A microcontroller with an internal MAC, an external PHY and lwIP is the most capable option and the most work. You get 100 Mbit/s, as many sockets as memory allows, IPv6, TLS through a library such as mbedTLS, and full control over the stack. In exchange the design needs the RMII interface (about nine pins including management), a 50 MHz reference clock, careful PCB layout, and firmware integration of the driver, the stack and usually an RTOS. RAM use for lwIP with a few connections is typically some tens of kilobytes, so this suits 32-bit parts.

The ESP32 belongs in this group too: it has an internal MAC and works with a LAN8720-type PHY, with the stack already integrated in its SDK.

Re: W5500, ENC28J60 or a microcontroller with built-in MAC: which suits a small Ethernet node?

#5

For the node described, the W5500 is the low-risk choice: the traffic is tiny, two sockets are enough (one MQTT connection, one web server listener), and the firmware stays simple. Choose the internal-MAC route if you need TLS to a cloud broker, IPv6 or high throughput. TLS over a W5500 socket is possible, but only on a microcontroller with enough RAM and flash for the TLS library, at which point a part with a built-in MAC may be the cleaner design.

Budget the power as well. Wired Ethernet is not low power: a W5500 with a 100 Mbit/s link draws roughly 130 mA at 3.3 V according to its datasheet, about 0.43 W before the microcontroller, so plan the regulator and any PoE budget around that. And remember that the W5500 and ENC28J60 do not come with a MAC address, so the firmware has to supply a unique one.

TEP COMMUNITY