I want to connect Arduino UNO boards using an Ethernet LAN network. There will be one Master and others will be slaves which are connected using an Ethernet switch and a router. I want to know how I can do this with Arduino. I don't have any experience in networking so I want some suggestions from you. Do I need an Ethernet shield? If yes, will this shield do the purpose?
Do you really have to use Ethernet for this? You could save some money, because you wouldn't need the Ethernet hardware. Perhaps it could be a problem with the switches etc, but if you use I2C with only one Master that would be very easy. If you plan to connect your network you could also setup your master node to have an Ethernet shield and connect it as the only one to the web, the other ones would than get the data from the master. Of course you can use Ethernet if you want, but I would give I2C a try. | |||||||||||||||||||||
|
The most common and easy option to have ethernet on Arduino, is indeed the ethernet-shield. Other being the Ethernet-Arduino, which is ethernet on the Arduino board itself, in stead the functionality being on a shield. There are few more, less commonly seen shield options. The best place to start reading up regarding Ethernet on Arduino is: http://arduino.cc/it/Reference/Ethernet and http://arduino.cc/en/Main/ArduinoEthernetShield You might find some useful information here: http://www.ladyada.net/learn/arduino/ethfiles.html Note that TCP (Server/Client), UDP and DHCP (for IP address assignment) is supported, but not much else, especially no IPsec, no SSL, no extensive routing capabilities, Bonjourno etc. Also, I believe that the entire TCP specification is not supported, but only minimal necessary (need to double check if Fast-start, Nagles algo etc. are supported). For closed, private networking, this may be enough, however if you plan on exposing your devices directly on public internet (s.a. pushing sensor reading to Pachube, or receiving control commands from website), you would probably have to think through about security. As for the specific board you mentioned, do note that there are several cheaper clones of the official Ethernet-shields. The easiest (but certainly not the cheapest) option is to use Sparkfun's Ethernet-shield: http://www.sparkfun.com/products/9026 ! Apparently, if you have a R3 UNO, you need the R3 version of this shield, as sold by Sparkfun. Read the note towards the bottom of the item desciption. As for networking itself, if you use TCP, then your designated Arduino "master" needs to be programmed as a "Server" and rest of the Arduinos as "Clients". The Server listens on a published port-number and it's IP address, where-as the Clients connect from their own IP address to the Server on the published common IP+port combination. Physically, you connect them using straight ethernet-cables, in a star-topology, via an Ethernet-switch with sufficient no. of ports. Of course, if the number of nodes is very high, you may have to create a chain of stars using multiple switches. | ||||
|