
If you are working with Arduino UNO or Nano board and you want to connect your Arduino to the internet, then you have two popular options. One option is to use an ESP8266 with Arduino and the second option is to connect an Ethernet module with Arduino.
In this project, we are going to use the latter option to control an LED over the Internet by interfacing Arduino with W5100 Ethernet Module. The Ethernet module is used to establish communication between the computer and Arduino in a LAN or Wired Network. This article is written assuming that the reader has an understanding of basic computer networking which includes having knowledge of connecting computers to hub/router with RJ45 cables, IP and MAC addresses, etc.
W5100 Ethernet Module
W5100 Ethernet module is a single-chip, full-featured, internet-enabled module to establish an internet connection.
Circuit Diagram to Connect Arduino W5100 Ethernet Module
The Circuit consists of Arduino Nano and Ethernet Module W5100 (This project would be possible with Ethernet Arduino Shield and Arduino UNO as well).
- Connect pin 5V and GND pins of Arduino Nano to +5 and G pin of Ethernet Module respectively (These connections supply power to the Ethernet Module).
- Connect pin 9, 10, 11,12, and 13 of Arduino to R, SS, MO, MI, CK of the Ethernet module respectively (These make the communication between Arduino and Ethernet over SPI).
Arduino Code to get data from W5100 Ethernet Module
You can get the source code of this project from original link.
Connecting Arduino to PC or Router Ethernet Port
To connect the two (PC and Arduino) together, we need a suitable cable (CAT-6 crossover cable) if the PC’s Ethernet port doesn’t have auto-direction sensing.
Blinking LED over Internet using Ethernet module on Arduino
Connect to the router using your PC or mobile phone. Then open any web browser and go to URL”http://192.168.0.12″(In your case, enter your Ethernet IP address that you have set in the code).
When the user clicks on the “Turn On LED” on the webpage, the LED turns ON in the circuit. When “Turn OFF LED” is clicked, the LED is turned OFF in the circuit.
COMMENTS