Arduino Ethernet modules and Microchip ENC28J60
If you'd like to connect your Arduino to a local wired network, you have several options :
- Arduino's Ethernet Shield if you already own an Arduino Uno (or similar) or Arduino Mega, and use standard Ethernet library
- Arduino Ethernet (USB => serial converter necessary) and use standard Ethernet library
- Ethernet Module WIZnet WIZ811MJ (W5100 chipset) or Microchip ENC28J60, available for ~6.30 € on DealExtreme (picture beside), using a specific library
This last option is offering a big advantage among others : you can use a bare microcontroller (ie. ATMega328) if you don't need a "big" Arduino Uno for your circuit, which is my case. As the WIZnet W5100 chip, which is also part of Ethernet shields, the Microchip ENC28J60 chip uses SPI to communicate with micocontrollers. It can be wired to an Arduino Uno or ATMega328 as following :
|Microchip ENC28J60||Arduino Uno||ATMega328|
|VCC||+3.3V||+3.3V (via voltage regulator)|
Unfortunately, this Ethernet module does not work at all with Arduino's standard Ethernet library provided with the IDE. Fortunatrly, an Arduino (> 1.0 compatible) open-source library exists: EtherCard.
To install it, simply download the library's ZIP and unzip it into your "libraries" folder of your Arduino IDE installation.
Rename it to "EtherCard". (Re)start your Arduino IDE, you should now see EtherCard appear in File / Examples.
You can test if your module is properly working by loading the "backSoon" example on your µC / Uno. When reaching the IP address (configured in your code) in your favorite web browser, you should see a "Back Soon" web page.