It’s no secret that Ethernet shields for the Arduino are a little expensive. With the official Ethernet shield selling for about $50 and other options not much cheaper, there’s a lot of room for improvement for Arduinofied Ethernet. [Boris] over at Open Electronics has a solution to this problem: his Ethercard powered by a $3 Ethernet controller.
The Ethercard uses the Microchip ENC28J60, a through-hole Ethernet controller. There isn’t much else on the board apart from an RJ45 jack, caps, resistors, and a cheap buffer chip. This board was designed to be easily produced, and we’re thinking it might be possible to etch this board at home.
There are a few drawbacks to this ENC28J60 Ethernet shield – the official Arduino Ethernet shield has a 10/100 Mbps connection where the Microchip-powered shield is limited to 10 Mbps. Given the reduced cost, ease of assembly, and the fact that it’s pretty hard to saturate a 100Mbps connection with an Arduino this flaw can be easily ignored.
Pretty neat, especially considering how much you can do with an Ethernet connection on your Arduino. Files and code available in the git.
dealextreme have two controllers based on the ENC28J60, one a shield (~US$21), the other more generic board (~US$11). Just search for ENC28J60 on the site.
i already built an enc28j60 based ethernet shield myself, adding the usual coupling transformer between the chip and the rj-45 jack and not using any buffer chips. it is etched at home and works like a charm except for the webduino http authentication library. does anybody perhaps have a fix for that?
gruni, may you share the way you etch home and realize metallized holes ?
It’s probably hard to saturate even a 10 Mbps connection with an Arduino. You might be able to do it with test packets, but not with meaningful data.
Good looking shield, so props to the maker. And props to Microchip too, for selling a $3 Ethernet chip in a breadboard/socket friendly DIP package. Stuff like that is why I chose them over Atmel.
I bought this one: http://www.geeetech.com/arduino-enc28j60-ethernet-module-p-263.html
Super cheap, and it works! Although it does not have the usability of a shield, those couple of wires are greatly compensated by the price!
That website looks like a direct sparkfun ripoff.
Holy crap. It does!
It is. Sparkfun commented on it:
http://www.sparkfun.com/news/488
I love that the Sparkfun article is subtly hinting its readers should DDOS the site:
“Oh – and if all of you readers happen to ping their site beyond what they might be able to handle”
I’ve ordered a couple of components from this shop via Ebay. Deadcheap. Less to no documentations. Very friendly service. 4 Weeks Shipment.
Their shipping calculator doesn’t seem to work for me, always returns $0.65 which I think is only for China. ¿How much was your shipping cost?
You can shop all their item via Ebay with 0.00$ Shippingcost (at least to Germany, as far as I can say). I paid everything via paypal.
Yep! In fact I also got it from Ebay. And, they provide more information than the average Ebay Chinese seller. (I was looking at Bluetooth modules, very hard to find with good documentation).
At first, the supplied code to test the board on an Arduino did not work. I think it had something to do with newer libraries. So I went to their forums, and they got me another example code. Sadly, Arduino does not supply standard libraries for the microchip ENC IC, so you have to get them elsewhere.
I still don’t get it. It’s not like the Wiznet W5100 chip (used on the official ethernet shield, and including an internal tcp/ip implementation) is that much more expensive than the ENCJ chip ($4 in singles from assorted places.) Nor does it require significantly more in the way of support electronics, as far as I can tell. The new W5200 is even simpler and cheaper. I think the ethernet shield prices is being driven by “market forces” rather than actual costs.
indeed, I use $6 ethernet cards based on the enc28j60 that I bought at least 6 months ago. It’s not expensive :)
i think you mean 10Mbps instead of 100Mbps in your text?
“pretty hard to saturate a 100Mbps connection with an Arduino”
Yes, but 100 Mbps as well.
Wow, this library is a lot better than the one that was provided with my ENC28J60 shield that I bought from eBay!
If you have an Ethernet shield that uses the library from nuelectronics.com, you can use the EtherCard library instead — all you need to do is change the CS pin from 8 to 10!
The ether.begin() function can take an optional 3rd argument to do this, or you can change the default in EtherCard.h.
Would love it if you could give me a little more detail with regards to what you modified in the header file. I have the board from eBay, and am struggling to get it to interface with the Arduino. Many thanks Brian!
to use with nuelectronics ethernet shield
change CS pin from 8 to 10
just add extra argument to ether.begin
or change the EtherCard.h file
anyway, to work the shield requires
pins # 10, 11, 12, 13 (CS + SPI)
(this line is the one:)
static uint8_t begin (const uint16_t size, const uint8_t* macaddr,
uint8_t csPin = TYPE YOUR DEFAULT CS PIN HERE);
Cool stuff! This one chip has been interfaced to all microcontrollers and SoCs out there.
Infact,I’m in the process of completing a network stack built around the PSoC3/5 and this very network chip.
https://github.com/kmmankad/ENC28J60-PSoC3
I have purchased a few of the boards like this one http://www.geeetech.com/arduino-enc28j60-ethernet-module-p-263.html too, I have be able to find them as low as about $4
The problem I run into these boards is that for me they don’t work with my gigabit switch and I found that DHCP fails most of the time too for me (using https://github.com/jcw/ethercard )
Hi there,
On the Geeetech ENC28J60 board, has anyone been able to get DHCP to work?
I got DHCP to work but was not 100% would only work sometimes, I think it was a buffer related issue where if you have the buffer set too low you don’t get the whole packet and if too high you have other memory issues.
the other advantage of the ENC28J60 is that unlike the W5100, the stack is not done in hardware but in software which means you can do IPv6 (you just have to get the code for it).
currently, I’m working on extending EtherCard (the github library) to do IPv6 (and dual-stacking)
I got mine from dx though ebay is another source.
Is your EtherCard IPv6 code online? I’d be interested to check it out.
not yet but I’ll post it somewhere when I finish it (git perhaps)
Hmmm. Looking at the schematic the level shifting seems to be being performed on the wrong lines.
The lines from the Arduino to the ENC28J60 are not being shifted down, which they should be I believe, and the lines from the ENC28J60 to the Arduino are being shifted up, which they don’t need to be.
Can someone confirm this?
My bad. 5v tolerant inputs.
Still surely you don’t need to shift the ‘so’ and ‘int’ lines up.
No, it really shouldn’t be necessary to use level converters to at atmega.
According to the graph on page 330 in http://www.atmel.com/Images/doc2545.pdf the VIH threshold value is about 2.7 volts when the mega is at 5.0 volt VCC. So a peripheral that actually outputs 3.3 volts for high (and not significantly less) should be able to communicate with an Aruino just fine.
Why not just buy a Nanode?
cost (including VAT since it’s from the UK and shipping) and availability.
£25 ~= US$38
I can get a regular Arduino (compatible) for around $10-13 or a Mega for around $20 or less.
The ENC28J60 board is about $20 or less.
(including shipping too)
US based www.http://wickeddevice.com has them for $39.99. Special offer right now includes a FTDI adapter and cable. One board, one supplier.
I saw just after I posted that…Jameco (local to me) has it too
though…isn’t it “assembly required”?
It looks like they didn’t include the ferrite bead specified in the ENC28J60 datasheet. I’ve replaced it with a piece of wire myself in my personal projects and I’ve never had an issue. I’m a bit unsure what this choke is actually needed for, anyone could enlighten me?
They used standard 47 Ohm 20 resistors instead of the 50 Ohm 1% type specified as well. I don’t know what consequences it may have but it seems rather odd to try to save at most a few cents that way.
I used the chip and the library in my latest project and it’s on
is it documented?
I use an IBoard from ITead Studio (Wiznet 5100), all in one board for 29$. however you cannot use shields .
Why don’t you simply use a Nanode? It’s cheaper than an Arduino, and it already has Ethernet “on board”.
While you’ll might not need 100mbs on an arduino for speed, you might not it for compatibility reason. Plenty of modern switches are (advertised as)100/1000mbs, not 10/100/1000mbs.
But surely they’re backwards compatible still? I can’t imagine them dropping support for a lower speed, that seems silly.
A common assumption, but false. Especially when you get into the gige hardware, they often drop support for slower speeds. If it doesn’t explicitly say that it supports 10/100/1000, it probably doesn’t.
The first five gigabit switches listed on an Amazon search all had backwards support for 10mbps. While it’s possible that *some* are dropping 10mbps support, it doesn’t seem to be *common*.
But it’s a good idea to keep your old switches, just in case. Maybe even pick up a few extra, I’ve grabbed a few for a buck or two at garage sales. You never know when they’ll come in handy.
http://www.instructables.com/id/A-credit-card-sized-Ethernet-Arduino-compatable-co/#step1
Well €19.9 is around $25 and we also need to factor in shipping probably.
That’s not really cheap.
Go buy this board (use them myself)
http://www.ebay.com/itm/Ethernet-Shield-W5100-For-Arduino-328-UNO-mega-1280-2560-/170875587576?pt=LH_DefaultDomain_0&hash=item27c8fa8bf8#ht_615wt_971
$12 Arduino Ethernet Shield with free shipping!
I wonder how HackADay have been able to miss that.
I just bought an ENC28J60 board after reading this post on eBay for $4.50! I never knew I could get online for my AVR/Arduino projects for so cheap!
Can’t wait, this opens a whole new realm for me :)
Just a heads up for someone planning to buying a ENC28J60 bases network shield or Nanode.
[capt. obvious]
You can’t use the default Arduino ‘Ethernet library’.
So its not a drop replacement for an original Wiznet shield, if you already have a nice sketch you need to change it to get it working with the ‘EtherCard library’ (github).
[/capt. obvious]
Also every time the ENC28J60 comes up people are complaining about it being only 10mbit.
Who the foxtrot need 100mbit on a Arduino?
Free market ftw
Is it really worth it, as you can get them only for under 5 dollars? http://goo.gl/i7xOa
man just go on aliexpress.com search for arduino ethernet shield it s 8.5 $ with shipping … enjoy
Please help me with jeecafe library for arduino and enc28j60.I have an arduino mega and it doesn’t work with ethercard library and I don’t find where must to change the pins definition for mega.Many thanks to all.