ENC28J60 vs Wiznet: what's the CURRENT status?

I've done some projects using a "standard" Arduino and the Adafruit Ethernet shield, and I've been pleased with results: the hardware is good, the library support is good, and the whole package "just works".

But it's a fairly-expensive route to getting a few bytes of I/O on the net, at US$70-80 a pop. A friend has asked for help in setting up a remote sensor network where that could be a deal-killer, so I'm looking for alternatives. I came across this project using the ENC28J60, which looks like something we could do ourselves, since it's a single-sided PCB we could customize to our needs. And it would be less than half the cost of a shield-based system.

My big questions are "How good is the library support for the ENC28J60?" and "How good is the chip, itself?". From what I've read, the Wiznet module has an advantage in offloading more of the low-level work of managing the interface from the Arduino, which also gives it a smaller memory footprint. But, for an extremely simple sensor node, that's not a really big deal: the rest of the application needs very little CPU, flash, and RAM, so the network interface can consume almost everything, if needed.

But what is a big deal in this case is reliability: some of the sensors will be installed in locations where it would be an all-day trip to push the reset button, so it's important that there are no mystery gotchas in the drivers that cause the system to flake out once a week, or even once a quarter.

Looking over some of the posts in the old forum, it appears that there is no library among the several out there for the ENC28J60 that makes its users happy, but it's hard to tell whether that's because of problems in the code, weakness of the hardware, or because the unhappy users have little experience with the Arduino and/or networking.

So, is there someone out there who is happy with the ENC28J60? If so, what library/libraries are you using? Or are you using some other CPU? As much as I like the Arduino platform, it's about my tenth or so microprocessor, so I'm not opposed to a "heretical" solution ]:smiley:

what is a big deal in this case is reliability: some of the sensors will be installed in locations where it would be an all-day trip to push the reset button, so it's important that there are no mystery gotchas in the drivers that cause the system to flake out once a week, or even once a quarter.

What about using watchdog timer?

Did u check here already?
Also check this.

I used some other example for rly easy page(plain text), but cant find it, but here is my pde

Basicly setuping up a page might not be so hard, all in all it depends what kind of page u want to have, if its just basic page, then there shouldnt be any problems.
As far goes for the price of ENC, u can get it rly cheap on ebay.

The 28J60 is much harder to understand and takes more experience to bring up. You don't seem to have that problem and since you can dedicate the entire arduino to sending a few bytes it is probably a really good choice. I have a few 'official' boards in operation as well as a couple of WiShields, they all fail from time to time.

You're exactly correct, it sucks to go hit the reset when this happens so I'm modifying my code to do a simple get to the gateway router to verify that the darn network is up for each device. So each device will do a 'get / \r\n' to the gateway router and if there is no response in a fixed amount of time the board resets itself. I've set up a laptop to watch the serial port for a couple of days and watched the devices recover from something and get back on line. Made the entire system much more reliable. You can go even further and reset the board at an opportune time (midnight maybe) to be sure something doesn't build up over time and even sample to be sure your sensors are alive.

So, I would go for the 28J60 for something like this and build in a series of checks to make sure everything is working, resetting when necessary. It won't hurt to put a web control in to reset the machine over the internet as well. This is actually kind of fun, send a command and the arduino resets itself. Not real useful, but fun.

Grega: I've seen the shield vendor website, but I'm much more interested in hearing from folks who don't have a direct financial interest. :.

I could certainly do a watchdog, but would really prefer not to depend on on it. Especially since my friend is telling me that he may want to add a "shut down the equipment on over-temperature" feature: I wouldn't want an I/O pin glitch due to flakey software resetting the temperature monitor to needlessly reset the other equipment. It's supposed to help avoid hiccups, not add them.

The wiznet chip isn't fundamentally THAT much more expensive than the ENC28J60 ($6 from sparkfun vs $3.50 from digikey); it's just that the shield/modules are relatively expensive (for instance, you can find ENC modules that are about the same price as wiznet modules or ethernet shields.) It's a little depressing, given the price of commodity ethernet adapters for PC-like systems :frowning:

The rumored ethernet+Arduino on one board might change the equation, or you could build your own hardware (expensive in a different way...)

Chip prices are pretty much irrelevant to my situation, because I don't have the ability to use the Wiznet chip: I could design a board for it, but I couldn't assemble it. The board in that instructable is doable, though.

That "rumored ethernet+Arduino" might, indeed, be a solution. If it ever arrives. Meanwhile, I just found this little critter, which is very close to what I'd build, myself (except for using the dual-row headers: I prefer single-row for ease of use with stripboards and breadboards). It's kinda like a "Baby Netburner", with an ATMega128 on it. It's intended to be programmed with AVR Studio, but it's got a JTAG connector, so I'm a-thinkin' it should be possible to put an Arduino bootloader on it.

Hi,

I dont have any of the other ethernet shields so cant really compare them myself, just share my feedback from using the ENC28J60 and the shields I've used from nuelectronics (I have about 5 of them!). Thanks for linking to my site too.

I found the original library fairly complex and inflexible so re-wrote it using the code from tuxgraphics.org tcp/ip stack. This was much better but still had some limitations such as everything had to fit into a single packet, whether acting as a server or a client. The tcp part of the library only caters for sending a single message before closing the connection (something I need to fix for another project!).

The protocol you use needs to be implemented in the software, such as IP, then TCP or UDP, the packets need to be built up manually byte by byte as there is no current equivalent to the print function. If you want to create a server then you need to make the pages very simple and small enough to fit into a single buffer and packet. The problem here is that if you make a larger buffer, you reduce the available memory for other variables and data structures. There is also the risk of over running the buffer and corrupting other areas of memory which is something I've not really addressed with the library and could be whi I sometimes see the odd lockup or reset.

Recently I've added DNS lookup support to the library and have been thinking of looking at DHCP too but thats as far as I've got with it!

With the enc28j60 most of the functionality needs to be on the software side, this makes it more difficult to use for beginners, but also makes it more flexible as you are able to implement whatever protocol you need.

Hope this helps

Andy

The big difference is that the Wiznet includes a TCP/IP stack and the ENC28J60 doesn't. Well worth the $2.50 difference in chip prices.

If you're making a bunch of items I think the way to save money would be to make your own circuit board and assemble them. It wouldn't be that hard to do.

Look at the NKC ethernet shield kit: http://www.nkcelectronics.com/nkc-ethernet-shield-diy-kit-without-wiz812mj-mod812.html

and the RBBB kit:
http://shop.moderndevice.com/products/rbbb-kit

The layout for the RBBB is available in eagle format (see this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239340243)

What you would have to do is modify it to include the guts of the ethernet shield kit.

I estimate the finished product would cost about $40 for parts. Maybe $70 for the pre-made version isn't so bad...

The big difference is that the Wiznet includes a TCP/IP stack and the ENC28J60 doesn't.

While this does give flexibility over the Wiznet device... all that SILICON based code in the Wiznet device now has to steal code space on the Arduino... leaving less room for your project code.

I am starting to be a little worried about a TCP/IP chip that doesn't support IPv6.

It wouldn't be that hard to do.

It would be for me: as I mentioned in my original post, there's no way I could make a board with the Wiznet chip. Living in the hinterlands, I probably couldn't even find someone local to do the assembly.

If I used a module like the WIZ811MJ so I could do through-hole, it would take the parts cost up to that $35 range.

But the WIZWEB module is only $32, with 640K of flash, 36K of RAM, and more I/O. Plus it has the W5300 Ethernet chip, which eliminates the SPI bottleneck. The ATMega128 supposedly has support in Wiring, so turning it into an Arduino platform should require only a little more than modifying the Ethernet library to support the 5300.

The only downsides I see are the double-row headers (a modest increase in the difficulty of incorporating it into projects) and the requirement for an external 3.3V regulated supply. Some people might see the lack of a USB interface as a problem, but it seems to me that you're rarely going to need one for projects that use Ethernet.

I've been wishing for an Ethernet Arduino for a while, but I think the Wizweb makes more sense. If you want shield compatibility, just make a simple through-hole "carrier" board with a voltage regulator and shield headers. It'd almost certainly be both cheaper and more powerful.

westfw:
I am starting to be a little worried about a TCP/IP chip that doesn't support IPv6.

I don't, because my experience with looking through access logs on embedded systems I've deployed has led me to divide 8-bit (and even many/most 16-bit) networked micros into 3 categories: "firewalled", "screwed", and "not screwed yet".

There are so many zombie PCs out there that you just can't put simple systems on the net without something to protect them from being swamped by incessant probing. The router(-ish) device that connects them to the Wild Wild Web will eventually be one that translates between IPv6 and the legacy devices on the LAN running IPv4.

You could also check my work where i resolve some problems mentioned above

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291904599

I made a library to help simplify the ENC ethernet shields:

But, if you have the money get a Wiznet shield - much easier.

What about getting a Wiznet breakout board?

I understand it is still quite expensive, but cheaper than the Arduino and a bit more flexible to include in the design.

Also, MDfly is selling a board based on this chip for $17. http://www.mdfly.com/index.php?main_page=product_info&cPath=9_41&products_id=109

They're sold out now, but I managed to grab one while still in stock. The price was just too temping, although it's clear that bringing it up is going to be a giant pain from everything I see written out there.

Pinging this thread up again, in case anyone finds it while trying to make this same decision.

After investing a couple of months in the ENC28J60, I strongly recommend ANYTHING ELSE :slight_smile: The big problem with the TCP/IP stack in software is that it's really unreliable. There is not a big community using this chip, so the stack does not get the benefit of crowd-sourced bullet-proofing. I've now installed and tested every implementation I could find, and I can't find anything that works as a client which is reliable and remotely easy to use.

But what is a big deal in this case is reliability: some of the sensors will be installed in locations where it would be an all-day trip to push the reset button, so it's important that there are no mystery gotchas in the drivers that cause the system to flake out once a week, or even once a quarter.

This is exactly what I'm finding happening. So now I'm working on a watchdog reset solution. But still, the mean time to failure in my system is about an hour of sending packets once a minute.

yuo might want to checkout http://wiki.hackspace.org.uk/wiki/Project:Nanode

nick:
yuo might want to checkout http://wiki.hackspace.org.uk/wiki/Project:Nanode

Cool.. Nanode is pretty nifty, I might want to make something like that! Problem is, Nanode uses EtherShield. Same problems as stated above :expressionless: Piles of complexity... Where do you even start if something goes wrong. Less cleaned up than EtherCard.

Have you seen the Freetronics EtherTen? Its basically an Arduino UNO plus the Wiznet Ethernet Shield combined into one (SD card slot included). It also supports Power over Ethernet, both a cheap version of PoE and the official version of PoE.

I bought one to act as the controller for a zigbee network and it took almost no time to load the standard web server example sketch and get it running (the one that returns readings from the analog pins).