By dave | January 10, 2018

Consider using Arduino for your new product

There is a common misconception in the electronics industry that Arduino is unsuited for professional development. As a result many companies try to use different, far more complex tool chains to develop software with far fewer ready made libraries available.

What I would recommend however, is to carefully check all libraries that you are using, to ensure their license is OK for you project. Basically, for any commercial development where you intend to keep the source closed, do not use any GPL libraries (LGPL is fine as it has a linking exception).

In some cases, as unbelievable as it sounds, I’ve heard of consultants suggesting that the code is written in assembler, when the code is not even that time critical. That comes with staggering costs. Personally, I’m shocked by some of the things I’ve heard and would like to tackle a few misconceptions right here:

Myth 1: Arduino is not as efficient as going direct:

True and False at the same time, Arduino is nothing more than a series of libraries and standard practices sat on the top of the standard AVR / SAMD / ESP tool chain. You can do anything within the Arduino framework that you can do with the AVR tool chain, as it’s built on the top of it. Although the core API can sometimes limit functionality, there is nothing whatsoever stopping you from accessing these extra functions directly. Look at some of our libraries for examples of this.

Myth 2: Arduino boards are too expensive to put into finished products.

Again, repeating what I said in the last paragraph, Arduino is nothing more than a set of libraries. AVR / SAMD / ESP chips are very cheap and easily programmed over ISP. Carefully written Arduino code can even run on an ATTINY chip; with this chip having an inbuit oscillator, the minimum extra components would be bypass capacitors and a 6 pin programming header. If the budget is a bit bigger then the ATMEGA328 provides far more capabilities at a still low price point. Here’s a few examples from Jan 2018:

Package Chip Per 100* Per 1000*
Thru hole ATTINY84 0.76GBP 0.74GBP
SMD ATTINY84 0.54GBP 0.53GBP
SMD ATMEGA328 0.92GBP 0.90GBP
SMD SAMD21 2.07GBP 2.00GBP
BOARD NODEMCU 5.00GBP Not Known

* as of Jan 2018 - indicative only.

For low volume, there are many cheap professional boards that are small form factor (think NodeMCU and Teensy); which when purchased in bulk become another cost effective option for some projects Especially if the micro-controller was a late addition to the project.

Myth 3: It’s not possible to edit Arduino files in a proper IDE

The basic IDE is great for beginners writing their first sketch, but unsuited to hardcore C++ dev. However, you don’t need to use it, there are now several very good alternatives. A few that stand out:

  • Visual Studio Code with Arduino plugin (used - very good)
  • Visual Micro based on Visual Studio (used - very good)
  • Sloeber Arduino IDE based on Eclipse (used - very good)
  • PlatformIO IDE & board manager (very good)
  • Atmel Studio based on Visual Studio IDE now supports Arduino projects (used - OK)
  • Arduino plugin for CLion IDE by Jetbrains (needs more work)

Myth 4: Arduino is not event based and therefore unsuited to battery projects

Wrong: Although out of the box the loop method of programming keeps power usage high, it’s actually very easy to make Arduino programs event based, in fact I’ve got code that does exactly that, and makes it very easy to reduce power consumption significantly. For example AVR chips can be set to a low power state until a timer or interrupt occurs. This won’t solve all cases, but will meet the 90% / 10% rule where it fits most cases.

In conclusion

If you see through the above issues, the platform provides a lot of plus points, there’s an unparalleled number of libraries available that work with many peripherals out of the box. Want to use a 20x4 parallel LCD display, sure just use LiquidCrystal, want a shift register, sure support is built right in, want i2c or serial, helper classes readily available.

If you are considering developing an 8bit or 32bit embedded device on commodity hardware, think carefully before stepping over the Arduino platform. Just look at desktop programming 20 years ago where C programmers mocked newer alternatives, just for them to take the lions share of the market a few years later. People literally saved 10s to 100s of man years on moderately sized projects.

Click to send a message

Other pages within this category

comments powered by Disqus

We use cookies to analyse traffic and to personalise content. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Please see our privacy policy should you need more information or wish to adjust your settings.

Send a message
X

This message will be securely transmitted to Nutricherry LTD servers.