Ad Code

Responsive Advertisement

ENC28J60 Ethernet Module with Arduino | Pinout, Working & Project Example

ENC28J60 Ethernet Module – Complete Guide with Arduino Project Example

Introduction

As the Internet of Things (IoT) and network-enabled embedded systems continue to grow, the need to connect microcontrollers to Ethernet networks has become increasingly important. While Wi-Fi modules like ESP8266 and ESP32 are very popular, wired Ethernet is still preferred in many industrial, automation, and educational projects due to its stability, security, and reliability.

One of the most widely used low-cost Ethernet solutions for microcontrollers like Arduino UNO, Nano, and Mega is the ENC28J60 Ethernet module. This blog provides a complete, in-depth explanation of the ENC28J60 Ethernet module, its working principle, pinout, features, advantages, limitations, and a practical Arduino project example.

What is the ENC28J60 Ethernet Module?

The ENC28J60 is a stand-alone Ethernet controller IC developed by Microchip Technology. It enables microcontrollers to connect to a 10 Mbps Ethernet network using the SPI (Serial Peripheral Interface) communication protocol.

Unlike the W5100/W5500 Ethernet chips, the ENC28J60 does not have a built-in TCP/IP stack. Instead, the TCP/IP protocol must be handled by the microcontroller through software libraries.

Key Features of ENC28J60

  • 10Base-T Ethernet (10 Mbps)
  • SPI interface (up to 20 MHz clock)
  • Integrated MAC (Media Access Control) & PHY
  • Supports full-duplex and half-duplex communication
  • Operates at 3.3V logic
  • Internal DMA for efficient data handling
  • Low power consumption
  • RJ45 connector with integrated magnetics (on module)

ENC28J60 Module Specifications

ParameterValue
Ethernet StandardIEEE 802.3 (10Base-T)
CommunicationSPI
Operating Voltage3.3V
Logic Level3.3V (5V tolerant via level shifting on most modules)
Data Rate10 Mbps
Buffer Memory8 KB internal RAM
TCP/IP StackExternal (software-based)

ENC28J60 Module Pinout Description

Most ENC28J60 modules come with 8 pins:

PinDescription
VCC3.3V power supply
GNDGround
CSChip Select (SPI)
SI (MOSI)SPI Master Out Slave In
SO (MISO)SPI Master In Slave Out
SCKSPI Clock
INTInterrupt output
RESETReset pin (optional on some modules)

⚠️ Important: Although many modules accept 5V input via onboard regulators, the ENC28J60 IC itself works at 3.3V logic.

How ENC28J60 Works

  1. The microcontroller communicates with ENC28J60 using SPI.
  2. ENC28J60 handles:
    • Ethernet frame transmission
    • MAC addressing
    • Physical layer signaling
  3. The microcontroller handles:
    • TCP/IP protocol
    • HTTP, UDP, ICMP, etc. (via libraries)
  4. Ethernet data packets are sent and received through the RJ45 connector.

ENC28J60 vs W5100 / W5500

FeatureENC28J60W5100 / W5500
TCP/IP StackSoftwareHardware
CostVery lowHigher
Speed10 Mbps10/100 Mbps
MCU LoadHighLow
Library ComplexityMedium–HighEasy

ENC28J60 is ideal for learning, low-cost projects, and simple web servers, while W5500 is better for high-performance applications.

Required Libraries for Arduino

To use ENC28J60 with Arduino, the most common libraries are:

👉 The UIPEthernet library is widely used because it provides an API similar to Arduino’s standard Ethernet library.

Arduino + ENC28J60 Project Example

Simple Ethernet Web Server (LED Control)

Project Objective

Create a basic web server using Arduino and ENC28J60 that allows you to turn an LED ON/OFF from a web browser.

Required Components

  • Arduino UNO / Nano
  • ENC28J60 Ethernet module
  • LED
  • 220Ω resistor
  • Breadboard & jumper wires
  • Ethernet cable
  • Router / LAN network

Circuit Connections

ENC28J60 to Arduino UNO

ENC28J60Arduino
VCC3.3V
GNDGND
CSD10
SI (MOSI)D11
SO (MISO)D12
SCKD13
INTNot connected (optional)

LED Connection

  • LED Anode → Arduino D7 (via 220Ω resistor)
  • LED Cathode → GND

Arduino Code Example (UIPEthernet)


#include <UIPEthernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 50);

EthernetServer server(80);

const int ledPin = 7;

void setup() {
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);

  Ethernet.begin(mac, ip);
  server.begin();
}

void loop() {
  EthernetClient client = server.available();
  if (client) {
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();

        if (c == '\n' && currentLineIsBlank) {
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");
          client.println();
          client.println("<html>");
          client.println("<body>");
          client.println("<h1>ENC28J60 LED Control</h1>");
          client.println("<a href=\"/ON\">LED ON</a><br>");
          client.println("<a href=\"/OFF\">LED OFF</a>");
          client.println("</body>");
          client.println("</html>");
          break;
        }

        if (c == '\n') {
          currentLineIsBlank = true;
        } else if (c != '\r') {
          currentLineIsBlank = false;
        }

        if (c == 'O') {
          digitalWrite(ledPin, HIGH);
        }
        if (c == 'F') {
          digitalWrite(ledPin, LOW);
        }
      }
    }
    delay(1);
    client.stop();
  }
}

How the Project Works

  1. Arduino initializes the Ethernet interface using ENC28J60.
  2. A local IP address is assigned.
  3. When a browser accesses the IP, Arduino serves a simple HTML page.
  4. Clicking ON/OFF links controls the LED via HTTP requests.

Advantages of ENC28J60

  • Very low cost
  • Ideal for learning Ethernet fundamentals
  • Works with most Arduino boards
  • Good for LAN-based projects
  • Low power consumption

Limitations of ENC28J60

  • No built-in TCP/IP stack
  • Slower than modern Ethernet chips
  • Higher MCU memory usage
  • Not suitable for high-traffic servers

Applications of ENC28J60

Conclusion

The ENC28J60 Ethernet module is an excellent choice for beginners and hobbyists who want to learn how Ethernet networking works at a low level. While it requires more software handling compared to W5500 or ESP32, it offers great flexibility and deep understanding of networking concepts.

If you are building low-cost, wired, LAN-based embedded projects, the ENC28J60 remains a solid and educational solution.

Post a Comment

0 Comments

Ad Code

Responsive Advertisement