Please let us in the comment zone any suggestions that you think will improve the article!
If you like the article click the follow button to stay in touch with us!
1. The shield
Arduino ethernet shield is a device that allows you to connect your arduino to the internet.
In this post i will connect it to a wireless router. To see if it works i will upload an example from arduino software to check the IP.
My shield is in the picture below:
This version is using the W5100 Ethernet controller, but is a cheap versions so, i’ve had problems with it, only with this shield, another, also cheap works great.
I recommend you to make the changes i have made when you eliminate all the options you have to make it work.
If you have such a cheap version check if behind the RJ socket is a SMD resistors packcage with 511 value. If the shield doesn’t work (especially on wireless routers) you can try to change it, because it means a 510 ohms resistor and it should be 51 ohms. For this you need four 47 ohms resistors and soldered like in the pictures below:
I’ve made the changes from pictures and now it work great.
2.Connect the shield to a wireless router
To set up the shield with a wireless network upload a program from arduino software examples (i recommend dhcpadressprinter) and connect it to the router. After that, enter in the router web interface.
To enter in the router web interface you need to introduce your Router IP in the adress bar of the search engine and for this you must go in the network and sharing center, select your network-details and choose IPv4 default gateway. Enter this IP in your web search engine (for the next step you must have your log in informationswhich are usually found in the router manual).
From the router web interface-DHCP client you should see all the devices connected to the router, including the ethernet shield something like in the picture below:
The second column represents the MAC adress and the third column trpresents the IP of the shield. With the program mentioned above (DhcpAdressPrinter from arduino software examples) i will check the IP and see if the shield work correctly.
Now the MAC adress is for the program:
byte mac[] = {
0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02
};
The above part of the code uses the MAC adress and if in the router web interface is something rather different from the program, copy the adress from the router into the program.
The result on the serial monitor is like the one from the router web interface:
To test the connection i’ve uploaded from the arduino software Examples/Ethernet/WebServer, which is reading the analog pins and displays them on the webpage.
A short video shows the results (sorry for bad filming):