Arduino Ethernet Board (not shield) randomly freezes

Hi all,

I have an Arduino-based project I've been working on that uses an Arduino Mega2560 with an Ethernet Shield. The basic idea is that the Arduino polls a set of sensors and then streams their values over the ethernet network back to a laptop.

I've built 4 units and they all work fine. However, today I built the same basic setup but used an Arduino Ethernet (no shield) to try to simplify the hardware. The sketch I've used with no problems on the other units works for awhile on the new board but then randomly freezes after 20-30 seconds. The reset button does not reset the board; I have to actually pull the power and reattach for it to start up again.

Do I have a defective board, or are there subtle differences between using the standalone Ethernet vs the Ethernet Shield?

Any suggestions would be much appreciated!

The "Arduino Ethernet" is based on an ATmega328, which only has 2K of RAM. Your MEGA-board has 8K.

It is very possible and very likely you are running out of RAM.

I went back through to check the memory usage for any leaks, and to comment out any long string constants, etc. but still saw the freezes. Then it occurred to try something simple -- I loaded the "Blink" sketch and sure enough, after 30 seconds or so the LED stops blinking and the board won't respond to the Reset switch. So I'm thinking it's a probably a defective board.

Thanks, though, for pointing out the RAM issue -- that was not something I had considered but will in the future!

How are you powering them when the fail occurs? Are you using usb or the power jack?

DC barrel jack, using the same 9V/1A power adapter I use with my other Arduinos.

Have you checked the voltage on the Arduino +5v pin after the fail? Has the regulator shut down?