By dave | January 10, 2018

Consider using Arduino for your new product

Edited 02/2024: Over the time I wrote this around 5 years ago, things have really moved on. Now many low volume IoT solutions do ship from what’s effectively Arduino, mbed, or similar. I was proven right and even native chains have all moved toward simplified builds with CMake and helpful starting points. PlatformIO is heavily used and productionizes Arduino builds amongst other things, with a good CLI.

My next prediction is that exceptionally costly compilers and IDEs will fall out of favour and Visual Studio, Visual Studio Code and CLion will make up the lions share, using “gcc” as the compiler along with the CMake build tool. Unlike the last prediction, this is not far off at all, and could be the case for nearly all workloads by 2025.

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, more complex tool chains to develop software with far fewer ready-made libraries available. There are many low-volume cases where performance is not quite as critical that Arduino fits very well indeed.

What I would recommend however, is to carefully check all libraries that you are using, to ensure their license is OK for your 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 underlying 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 inbuilt oscillator, the minimum extra components would be decoupling capacitors and a 6 pin programming header. Here’s a few chip costing examples from Jan 2018:

Package Chip Per 100* Per 1000*
Thru hole ATTINY84 0.76GBP 0.74GBP
SMD SAMD21 2.07GBP 2.00GBP

* as of Jan 2018 - indicative only.

For low volume, there are many cheap professional boards that are small form factor (think NodeMCU, ESP32 and Teensy); which when purchased in bulk become another cost-effective option for some projects Especially if the microcontroller 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)
  • Arduino IDE based on Eclipse (used - very good)
  • PlatformIO IDE & board manager (used - 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. Although, over the years, as it happens, we’ve provided all the above on IoAbstraction, so the case is not quite where it used to be.

If you are new to development, or already have prototyped on Arduino, and your deployment is fairly low volume, think carefully before stepping over the Arduino platform.

Other pages within this category

comments powered by Disqus

This site uses cookies to analyse traffic, and to record consent. We also embed Twitter, Youtube and Disqus content on some pages, these companies have their own privacy policies.

Our privacy policy applies to all pages on our site

Should you need further guidance on how to proceed: External link for information about cookie management.

Send a message

Please use the forum for help with UI & libraries.

This message will be securely transmitted to our servers.