W5500 Ethernet Shield v1.0

O W5500 Ethernet Shield v1.0 pode fornecer conectividade com a Internet para seus projetos. O W5500 permite que os usuários tenham conectividade com a Internet em suas aplicações utilizando um único chip, no qual estão incorporados a pilha TCP/IP, MAC Ethernet 10 / 100 e PHY. O shield também possui dois conectores Grove e um soquete para cartão microSD para suportar projetos que exigem o armazenamento de grandes quantidades de dados provenientes de sensores Grove. A porta RJ45 (onde o cabo Ethernet é conectado) é baixa o suficiente para permitir que você empilhe mais shields sobre este, se necessário.
Recursos
- Suporta protocolos TCP/IP cabeados: TCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
- Suporta 8 sockets independentes simultaneamente
- Suporta modo de economia de energia (Power down)
- Suporta Wake on LAN via UDP
- Suporta interface Serial Peripheral de alta velocidade (SPI MODO 0, 3)
- Memória interna de 32 Kbytes para buffers TX/RX
- PHY Ethernet 10BaseT/100BaseTX incorporado
- Suporta Auto Negotiation (full e half duplex, 10 e 100* baseado)
- Não suporta fragmentação de IP
- Operação em 3,3 V com tolerância a sinal de E/S de 5 V
- Saídas de LED (full/half duplex, link, velocidade, ativo)
- Soquete para cartão micro-SD
- Conectores Grove para I2C e UART
Visão Geral de Hardware

Configuração de Hardware
- RJ45: Porta Ethernet;
- CI W5500: um controlador Ethernet TCP/IP cabeado;
- Botão de Reset: reseta o Ethernet shield;
- Soquete para Cartão SD: suporta cartão Micro SD em FAT16 ou FAT32; armazenamento máximo é de 2 GB.
- Interface I2C
- Interface UART
Uso de pinos no Arduino
- D4: seleção de chip do cartão SD
- D10: seleção de chip do W5200
- D11: SPI MOSI
- D12: SPI MISO
- D13: SPI SCK
Tanto o W5500 quanto o cartão SD se comunicam com o Arduino por meio do barramento SPI. O pino 10 e o pino 4 são pinos de seleção de chip para o W5500 e o slot SD. Eles não podem ser usados como E/S gerais.
Uso
Mostraremos um exemplo. Este exemplo pode enviar dados para uma página web e armazenar os dados do seu sensor no cartão SD.
Hardware
Lista de Peças:
Nome | Função | Qtde |
W5500 Ethernet Shield | Fornecer conectividade Ethernet | 1 |
Seeeduino V4.2 | Controlador | 1 |
Grove-Temp&Humi Sensor | Sensor | 1 |
Base Shield V2 | Base Shield | 1 |
Cartão Micro SD | Armazenar dados | 1 |
Procedimento:
- Monte o W5500 Ethernet Shield v1.0 no seu Arduino, monte o Base Shield V2 sobre o Ethernet Shield e conecte o sensor Grove-Temp&Humi à porta Grove D5 do Base Shield; insira o cartão SD.
- Conecte o Ethernet Shield à rede com um cabo Ethernet padrão;
- Conecte o Arduino ao PC via cabo USB;

Software
- Siga os procedimentos de como instalar uma biblioteca do Arduino para instalar a biblioteca.
- Clique no botão abaixo para baixar as bibliotecas do W5500 Ethernet Shield.
- Instale a biblioteca no seu Arduino IDE quando o download for concluído.
- Copie o código abaixo para o sketch e, em seguida, faça o upload:
//This sketch uses W5500 Ethernet Shield,Seeeduino V4.2,Grove-Temp&Humi,
//Base Shield V2 Sensor and Micro SD Card to design a temperature and humidity collection station.
//attach the temperature and humidity sensor to base shield D5 grove port.
//It publishes the temperature and humidity data to webpage
//and refresh every 5 seconds, store the data into SD card datalog.txt file.
#include <SD.h>
#include <SPI.h>
#include <Ethernet.h>
#include <dht11.h>
dht11 DHT;
#define DHT11_PIN 5
const int chipSelect = 4;
// Please update IP address according to your local network
#if defined(WIZ550io_WITH_MACADDRESS) // Use assigned MAC address of WIZ550io
;
#else
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
#endif
IPAddress ip(192,168,0,177);
// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
// start the Ethernet connection and the server:
#if defined(WIZ550io_WITH_MACADDRESS)
Ethernet.begin(ip);
#else
Ethernet.begin(mac, ip);
#endif
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
//initializing the SD card
Serial.print("Initializing SD card...");
// see if the card is present and can be initialized:
if (!SD.begin(chipSelect)) {
Serial.println("Card failed, or not present");
// don't do anything more:
return;
}
Serial.println("card initialized.");
}
void loop() {
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Serial.println("new client");
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close"); // the connection will be closed after completion of the response
client.println("Refresh: 5"); // refresh the page automatically every 5 sec
client.println();
client.println("<!DOCTYPE HTML>");
client.println("<html>");
// output the value of input pin on web
int chk;
chk = DHT.read(DHT11_PIN); // READ DATA
client.print("Humidity: ");
client.print(DHT.humidity);
client.println("<br />");
client.print("Temperature: ");
client.print(DHT.temperature);
//write value of input pin into SD card
// make a string for assembling the data to log:
String dataString = "";
// read the humidity and temperature and append to the string:
dataString = String(DHT.humidity) + String(DHT.temperature);
// open the file. note that only one file can be open at a time,
// so you have to close this one before opening another.
File dataFile = SD.open("datalog.txt", FILE_WRITE);
// if the file is available, write to it:
if (dataFile) {
dataFile.println(dataString);
dataFile.close();
// print to the serial port too:
Serial.println(dataString);
}
// if the file isn't open, pop up an error:
else {
Serial.println("error opening datalog.txt");
}
break;
}
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
}
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
// close the connection:
client.stop();
Serial.println("client disconnected");
}
}
Resultados
Agora, mostraremos o resultado.
- Coloque seu cartão SD no computador; você verá algumas informações de temperatura e umidade.
- Além disso, podemos ver as informações na web.

Não é muito fácil? Você já pode começar o seu projeto.
Visualizador Online do Esquemático
Recursos
- Shield Ethernet W5500 em formato Eagle
- Esquemático do Shield Ethernet W5500 em formato PDF
- PCB do Shield Ethernet W5500 em formato PDF
- Biblioteca do Shield Ethernet W5500
- Datasheet do Shield Ethernet W5500.pdf
Suporte Técnico e Discussão de Produto
Obrigado por escolher nossos produtos! Estamos aqui para fornecer diferentes tipos de suporte para garantir que sua experiência com nossos produtos seja a mais tranquila possível. Oferecemos vários canais de comunicação para atender a diferentes preferências e necessidades.

