On this illustration we will going to wire the Ethernet Shield W5100, This shield allows an Arduino Board to connect to the internet. This shield is based on W5100 WIZNET Chip, a network stack capable of both TCP and UDP. The Arduino Ethernet Shield supports up to four simultaneous socket connection.

CH845-D-4-45This shield has a micro-SD card slot, which can be used to store files for serving over the network. It is also compatible with the Arduino Mega, Leonardo and UNO using the Ethernet library. You can access the on-board SD card slot using the SD library which is included in the current Arduino build.

This board has also a reset controller to ensure that the W5100 Ethernet module is properly reset on power-up. The reset button on the shield resets both the W5100 and the Arduino board.

The Arduino communicates with both the W5100 and the micro SD card using SPI (Serial Peripheral Interface) through the ICSP (In-Circuit Serial Programming) header, located on digital pin 11, 12 and 13 on UNO/LEO/Duemilanove, pin 50, 51, and 52 on the MEGA. On both boards pin 10 us used to select the W5100 and pin 4 for the micro SD card. These pins cannot be used for general IO (Input Output). On the MEGA the hardware SS pin, 53 is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface cannot be used.

Note: The W5100 Shield and SD card share the SPI bus, only one can be active at the time. If you are using both peripherals in your program, this should be taken care of by the corresponding libraries. If you’re not using one of the peripherals in your program, however, you’ll need to explicitly deselect it. To do this with the SD card, set pin 4 as an output and write a HIGH to it. For the W5100, set digital pin10 as a HIGH output.

MAC address: 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
Byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

Required Component

1x Ethernet Shield W5100
1x Resistor 220 k Ohms
1x LED ( Any color ) as Ouput
Solder Less Bread Board
Jumper Wires

Optional Components

2, or 4 channel Relay 5v Module with Isolator/Optocoupler

Wiring Diagram


This Ethernet shiled library does not come with DNS support out of the box meaning we cannot used to access the website we need by its simple URL (like http://www.14core.com). We need to have access the site though an IP address. For instance, 200,188,122,145 and you can actually access.

Arduino Sketch Code for Server

Arduino Sketch Code for Client

The example php file. this is just creates a random alpha-numeric string.

Download other sample code here | Zip
Download the Ethernet Shield Schematics  here | Pdf
Download the W5100 Datasheet here | Pdf

Wiring Ethernet Shield W5100 & Control External Devices with Relay


Leave a Reply

Your email address will not be published. Required fields are marked *