10/100BASE-T signal port; Ethernet controller W5200
Nhà sản xuất: Wiznet
Your Ethernet Shield gets a total renewal now! This shield provides you instant Internet connectivity with a high spec Ethernet controller, W5200, with twice the buffer size of v1.0 and support for up to eight simultaneous TCP/UDP connections. An included SD slot enables applications that require storing large amounts of data, like IoT data logging. Thanks to a lowered RJ45 pot, you can flexibly add most of shields on top of this Ethernet Shield.
RJ45: Ethernet Port;
IC HX1198: 10/100BASE-T signal port;
IC W5200: a hardwired TCP/IP Ethernet Controller;
U3: IC CJ117, low dropout linear regulator;
U6: IC 74VHC125PW, quad buffer;
Reset KEY: Reset Ethernet shield and Arduino when pressed;
SD card: support Micro SD card in FAT16 or FAT32; maximum storage is 2GB.
Pins usage on Arduino
D4: SD card chip select
D10: W5200 Chip Select
D11: SPI MOSI
D12: SPI MISO
D13: SPI SCK
Both W5200 and SD card communicate with Arduino via SPI bus. Pin 10 and pin 4 are chip select pins for W5200 and SD slot. They cannot be used as general I/O.
We are going to build a simple web server that answer request from a client and store the readings from A0 through A5 to SD card.
Step 1: Hookup
1. Mount Ethernet Shield v2.0 to your Arduino;
2. Connect the shield to your computer or a network hub or a router with a standard Ethernet cable;
3. Connect Arduino to PC via USB cable;
4. Insert an SD card to the SD card slot.
Step 2: Upload the program
1. Download the library：Ethernet Shield V2.0 Library.
2. Unzip and put it in the libraries file of Arduino IDE by the path: ..\arduino-1.0.1\libraries.
3. Restart the Arduino IDE.
4. Open the example "WebServerWithSD" via the path: File --> Examples --> EthernetV2.0 --> WebServerWithSD. This example shows you how to build up a simple web server that displays the readings of anolog A0 through A5 when requested. After that, store those readings into SD card.
This new library covers all functions included in the build-in Ethernet library of Arduino IDE. You can use other examples in the same way as that in the preceding Ethernet library.
5. Upload the program to Arduino. If you do not know how to upload code, please click here.
In this code ,we have defined pin 4 as SD card chip select port and pin 10 as W5200 chip select port.
Firstly, it will send a link to this client if there is a client requesting access to this server.Then send the value of each analog input pin to the network.
Finally you can view each analog pin by opening SD Card file.
Step 3: Results
Open a web browser and enter the IP address of your controller. It's dependent on your local network but used to be 192.168.168.178. Then you should find the readings of A0 through A5 popping up as shown below.
To check what's going on to the SD card, open the serial monitor. You can use the built-in serial monitor of Arduino IDE or a serial monitor tool as us. After opening a serial monitor, you can read the content of file "test.txt" which we created to store the readings of analog pins.
1） Make sure the Ethernet Shield and your computer are in the same local network.
2） Once the code has been successfully uploaded, it's fine to disconnect the board from your computer and apply independent power to it, leaving it run alone.
The reason is that: The buffer 74VHC125PW 2pin is floating, which is connectted to W5200 45pin. This creates an effect that W5200 can not work normally. After processing, it works well!