Pages: [1]   Go Down
Author Topic: Long-term reliability of Wiznet-based Ethernet?  (Read 1390 times)
0 Members and 1 Guest are viewing this topic.
Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm building a system that will collect data at a remote site and report it to a central server via a wireless internet link.  I need to make it as solid as possible,  because it wouldn't do to require a periodic 50-mile drive into the desert to push the reset button  ;D

I have it set up with the software-controlled reset of the Ethernet shield described in this thread.

My question is:  can I reasonably expect the Ethernet shield to run reliably for months at a time?  Or should I reset it occasionally to make sure it hasn't hung up due to some internal quirk?

I'd really like to hear from any folks who've set up a networked Arduino like this and had it (not) run solidly for an extended period.

There doesn't seem to be any sort of "Ethernet.end()" function.  I haven't looked into the code yet,  so I'm wondering whether I'd cause problems (like running out of Arduino heap space) if I repeatedly called Ethernet.begin().  Does anyone know offhand?

Thanks,

Ran
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6745
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On boxes with similar reliability requirements, we would make "educated guesses" as to whether network interfaces might need a reset.   Issued a "send packet" command and not seen a "transmission complete" back within 5 seconds ?  Reset the interface!  Not seen ANY received packets in the last 10 minutes, when you expect to see one every 10 seconds?  Reset the interface!  Got some weird error status?  Reset the interface!

You can consider doing this for your entire project, of course.  The "penalty" for resetting an embedded cpu like an arduino is a lot smaller than for a mainframe or desktop system, and rebooting every 24 hours might hide a lot of weaknesses in your software that might show up in 25 days when millis() turns negative (for example.)
Logged

Rural Arizona
Offline Offline
Edison Member
*
Karma: 7
Posts: 1711
Incorrigible tinkerer
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can get away with doing periodic interface resets,  if needs be,  because the important functionality is based on an HTTP client that periodically sends readings to a central server.  There's a tiny webserver built into the system,  left over from debugging the sensor interface,  so I can query its status,  but it's no big deal if a query gets aborted by a reset.

Resetting the whole system is undesirable,  because it accumulates some daily min/max/total data,  and periodic resets would complicate that:  it's do-able,  but to be avoided if possible.

I went ahead and peeked into the code,  and it appears that all the internal storage is statically allocated,  so it looks like there's no harm to be done by resetting the hardware and re-executing Ethernet.begin().  I may go ahead and incorporate that into the error-recovery code,  and become the guinea pig for the idea.

Ran

Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a module that has been in place for more than 6 months.  Early testing indicated that I needed the ability to have the system auto reset if a communication problem arose (it did several times during testing).  While not being the extreme of 50 miles away, I didn't want to have to checkup on the device to make sure it was working everyday.  I'm using the bare Wiz812MJ module with full access to the reset.  I set it up to reset wiz module if it can't talk to the server after a couple minutes.  If after 5 tries resetting the wiz module it will then reset the arduino and start the process over again.  This route did require modifying the bootloader to be able to use the watchdog timer.  The system has been running for more than 6 months without the users ever contacting me.  From my logs I can see occasional outages (cause unknown) but it always recovers.
Logged

Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 218
You will become one with the Arduino!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a similar project that takes 7-20 different sensor readings and posts the data to a web site when the sensors change, and also has a heartbeat communication every 15 seconds.

The system has been running that code since late August, and I think the only problems were 2 different network related outages out of my control, which it recovers from automatically without any code to manage that scenario.  To be honest, I haven't touched the arduino or shield since September and it still is pumping sensor readings through.

I have a bad motion sensor connected which fluctuates seemingly randomly (or I have a family of ghosts walking around) - so other than extremely large logs generated by that activity on the server, the shield and arduino handled constant communications well.

I also have been reprogramming some configuration remotely from the website (not code, data that controls the sensors) and the large data packets(512 bytes minimum) back and forth don't bother it whatsoever.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 13
Tinkering in free time
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Westfw,

Quote
Issued a "send packet" command and not seen a "transmission complete" back within 5 seconds ?  Reset the interface!

Sorry am a real noobie. How do I "request a packet" from the Wiznet 5100? Please could you send a few lines of code. Yes I am that new to Arduino !

Thanxxxx

Kevin
Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may need a mod like below to protect the ethernet shield against loss of power issues.

http://marco.guardigli.it/2010/11/arduino-wiznet-ethernet-shield-proper.html
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

New River, Arizona
Offline Offline
God Member
*****
Karma: 19
Posts: 935
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a couple of the ethernet boards that need to work all the time....they don't.  They freeze, can't connect and generally drive me nuts on a random basis.  I have the boards wired for external reset and also sample to be sure it reconnects.  If both of these fail I reset the arduino and start over clean.

If you need to save high, low, totals, etc use the eeprom and write them when it needs to change.  This way a reset won't hurt a thing.  Only change the eeprom when you actually need to though so it'll last a long time.

It's also (at least to me) useful to reset the arduino every so often to allow it to clean up whatever may be messed up.  I've used the time routines to reset it in the early AM when nobody notices.  Reboots on an arduino take so little time it really doesn't matter much.
Logged

Trying to keep my house under control http://www.desert-home.com/

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Forgive a slightly off-topic plug? (I am nothing more than a happy user of the following, at least!)

From the above, I think several participants in this thread would have the skills, equipment, and perhaps an interest in what Pachube is doing. It is sort of a "You Tube" for datastreams. But your "video" (file of data) can be growing in real time. And they host it...

"Getting started" guide at...

http://sheepdogsoftware.co.uk/sc2wy.htm

(It doesn't have anything about making dataloggers reliable. It is all about doing things with data which is being logged, and can be seen.. by you alone, or by others if YOU wish... over the net.)
Logged

Pages: [1]   Go Up
Jump to: