Frustrations with Arduino design

I got a Mega 2560 about a week ago along with an ethernet 'shield'. I have previous experience programming microcontrollers before so I thought this should be pretty straightforward.

I write some code to use the ethernet shield. (What are these adapters called 'shields' anyway?) It works but isn't particularly reliable especially on cold boot. Then I see the 'shield' shares the same reset as the main processor which has a impractically low value reset capacitor. I know this is done to allow the interface to reset the device but doesn't work well when standalone.

A design goal for my project is high reliability. It needs to be able to reset the ethernet chip in case of difficulty. I discover this isn't possible without hacking the design. This requires cutting the reset pin off.. J.. well - the connector labeled 'power' (as opposed to the actual 'power' connector). Then only after much frustration I discover the same reset line goes to the ICSP connector, so I have to cut that off too.

Only then can I connect the ethernet reset to a processor port to permit a software reboot.

In any high availability design one absolutely must have a watchdog function. I enable the watchdog timer on the AVR and soon find the bootloader frustratingly omitted the single line of code necessary to disable this on startup - therefore it immediately enters a loop on boot.

After researching this I see where others have modified the bootloader to fix this and other issues. The only way to do this is via an ICSP programmer. I proceed to build the parallel programmer described on the bootloader page to fix this bug only to discover after assembling it doesn't work on win64. This should be a the top of the page in my opinion.

I'm wondering if others are sharing similar frustrations and if Arduino is really ready for prime time. Please feel free to follow up with any 'gotchas' you've discovered to help save us all some time and aggravation.

johnharlow: if Arduino is really ready for prime time.

Or a case of mistaken expectations. It seems many people miss the very first sentence of the Arduino.cc website: "Arduino is an open-source electronics prototyping platform based..."

"High reliability" and "prototype" are mutually exclusive. As with all prototype platforms, they are the starting point not the finished design. It also means that your specific requirements may not line-up with design decisions of the boards you are using. However, in most cases, there are sufficient resources available to help you make that determination and any modifications necessary.

Thanks for the response, James.

Likely it is a cause of mistaken expectations on my part. I wonder, however, the purpose of a prototype other than to develop a usable item?

The main goal of my posting this was to have others who have encountered 'gocthas' to share their experiences and resolutions to save myself and others from further frustration- and possibly for others to review if they are considering Arduino to invest their development resources.

(What are these adapters called 'shields' anyway?)

They have some funny terminology. Perhaps because it "shields" the processor board from ... something.

johnharlow: In any high availability design one absolutely must have a watchdog function. I enable the watchdog timer on the AVR and soon find the bootloader frustratingly omitted the single line of code necessary to disable this on startup - therefore it immediately enters a loop on boot.

You won't have a problem if you choose a reasonable watchdog period (eg. 1 second).

I got a Mega 2560 about a week ago ...

My experience is that the Mega 2560 is a less developed platform, in the sense that they sell more Unos (or Atmega328 based devices) probably because they are cheaper and smaller. Thus teething problems are more likely to be ironed out on the Unos, and the plug-in shields are more likely to work.

Personally I find it a fantastic platform, compared to other ones it is much easier to use. However it still is a bit of a prototyping environment. For example, you need to know enough to use resistors with LEDs, transistors with motors, flyback diodes, etc.

I have one in my garage with a Ethernet shield plugged into it. It reboots occasionally when the power fails. Apart from that, it works week in and week out, being queried every 15 minutes or so by another server. And that's without a watchdog. I have a few more around the house doing other things. Again I never have a failure, and don't use the watchdog. Although if I was sending one to Mars I probably would ... just in case.

Once you have used the board and shields for a while you gain enough understanding to work out designs without them. For example (although I haven't done it myself yet) an ordinary SD card (like you shove in a camera) implements SPI. So you can just solder wires onto it, run it to the appropriate pins (maybe via a level converter) and have megabytes of storage added on.

I'm wondering if others are sharing similar frustrations and if Arduino is really ready for prime time. Please feel free to follow up with any 'gotchas' you've discovered to help save us all some time and aggravation.

I've been three + years on this forum and never felt that way. None of the issues you brought up are unknown to the forum as they have been posted prior with possible workarounds. The mega2560 board has been very slow to deal with it's bootloader bugs of not handling WDT correctly and the !!! bug, but it will be updated in time we are told. But once identified it's easy to work around as one can easily just use a ISP programmer to load the sketch without needing a bootloader to be resident in the board. So I think you might just be rushing to judgement a little too fast mostly because of your short time working with the arduino platform and not having knowledge of all the prior postings about subjects you might need to understand. Make no mistake there are most likely more 'gotchas' ahead for you especially on the software side, but for a every identified problem there is also some solution brought forth by someone around here.

Lefty

johnharlow: A design goal for my project is high reliability. It needs to be able to reset the ethernet chip in case of difficulty.

Well like I said, in my case I haven't attempted to do that, and at no stage has the ethernet chip not responded. The ethernet chip resets at the same time as the main processor.

If you really need to do that in your application, well you don't have to plug the shield in. After all, the shield is just a prototyping convenience. Put them side by side, and run the 6 or 7 wires you need:

+5V, GND, MOSI, MISO, SCK, SS, RESET

Here's an example of an alternative:

Not sure where I got that. But you can see you can just run the appropriate wires to it, including reset. No need to chop and hack.