Today some modules were delivered from China. One was a ENC28J60 Ethernet module made by “LC STUDIO”. There are many variants available on eBay – just search eBay for “ENC28J60 Ethernet LAN Module”. I purchased mine from Polida via eBay for $4.37 (including shipping), although they can be found for even less. I decided to test it with an Arduino because, well, it is easier than trying to set it up for the ARM board, at least until I get more proficient with ARM. I have made significant progress with ARM, but that is for another, future post.
I decided to test with the “webserver” example sketch that is in the EncEthernet library. First I had to research through the Arduino EncEthernet library to verify what pins to use for interfacing with the Arduino. The pin assignments are buried in the library instead of being established in the sketch and passed to the library. This certainly seems wrong to me, but, for now, I’ll live with it. Another problem was that the module’s pin names were different from the Arduino documentation, so I downloaded the schematic to verify that, as well. I also changed the fixed IP address in the webserver sketch to be compatible with my network. Here is the required wiring:
|ETHERNET MODULE||ARDUINO BOARD|
|PIN 1 (CLK OUT)||N/A|
|PIN 2 (INT)||N/A|
|PIN 3 (WOL)||N/A|
|PIN 4 (SO)||DIO 12|
|PIN 5 (SI)||DIO 11|
|PIN 6 (SCK)||DIO 13|
|PIN 7 (CS)||DIO 10|
|PIN 8 (RES)||N/A|
|PIN 9 (VCC)||+3.3V|
|PIN 10 (GND)||GND|
When I open a web browser and go to address 192.168.1.150 (the address set in the sketch) I see:
This is a very useful module. I can see lots of applications for it for remote monitoring or control.
There are several usable Ethernet modules being sold on eBay. I have three versions and the have all been tested and work equally well. Just make sure that the module purchased uses a ENC28J60 IC. See the photo below.