Everybody loves Arduino. It has broken the boundaries of the closed circle of Electronics Engineering and has brought micro-controller based automation closer to education, art, telecommunications and other disciplines. Even for the hard-core electronics engineers who had been working in the automation field since the 1980's, Arduino brought an abundance of sensors, libraries, support software and even more, very inexpensive hardware that can be purchased from several suppliers around the world.
But along with the spread of knowledge, comes a “broadening” of the accuracy that we use certain terms. I have heard people and read articles using the terms
“IoT” and even
“MCU” to mean the exact same thing. In projects where a micro-controller can be used to provide a solution, I hear from non-experts “just drop in an Arduino and make it work”, forgetting that the selection of the proper MCU for the job requires special technical skills, and even financial and logistics skills in some cases. Even more, some people have come to expect that using an Arduino will skip all effort for designing, building and testing, making a new product available the next day.
The target audience is not only engineers. Sales and Marketing people, all sorts of Managers, as well as Legal Counsellors may find issues to help them gain an understanding of the usually complex thinking of their fellow engineers.
So, what really makes an Arduino?
According to the official web site:
Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online. You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
When the word “platform” appears, ambiguity always comes along. The above definition mentions:
But is that all? Is this an all-inclusive definition? Are parts interchangeable? Could we use non-Arduino parts with Arduino? Is it a plug-and-play solution? Can it lower out time-to-market?
So let's have a look on my approach of “what really makes and Arduino”.
The official Arduino boards are presented here. Arduino is an open-source platform, so anyone can use the published schematics and drawings to construct something similar. There are several clones utilizing the exact same design, or having small variations, e.g. in the power supply, in the USB-to-serial chip etc.
It is really important to identify that the Arduino boards are general-purpose devices. This means that they are not designed to accomplish a specific task, such as “measure the temperature in a room”. Of course, they can be used to build a composite board, comprising of an Arduino board and several other components.
Is the composite board an “Arduino board”? Definitely not. It could just be called an “Arduino-based” board.
Are there cases where the composite board cannot be called an “Arduino-based” board? Well, consider a huge board in a navigation control system of a rocket which contains an OMRON relay. Can the board be called “OMRON-based”? I guess not. The relay can be substituted with a component from another manufacturer. Slight modifications of the board may be required due to different dimensions, electrical characteristics etc., but certainly, it is not the component that gives the identity to the composite board. In the same sense, if the composite board has been built with sufficient know-how (e.g. to control high currents operating a kiln) in the specifics of its functionality and the Arduino device can be substituted with another controller, the composite board cannot be called “Arduino-based”.
In contrast, if the functionality of the board largely relies on an Arduino library (e.g. an algorithmn to control the temperature of the kiln), then, it could be called “Arduino-based”.
And what if the composite board contains functionality in several features, without identifying one or more as critical or essential or nice-to-have? Who can assign a gravity factor to each part of the board, especially when the economics of the design dictate that each and every part should have a function that is marketed, advertised etc. and even more so, patented or copyrighted? The boundaries are definitely not clear, especially when looked at from a legal point of view.
The original Arduino UNO was designed around Atmel's ATmega328 MCU. If one uses an ATmega328 in a design, does it make it an Arduino? Well, if the MCU contains the bootloader and is probably programmed with the Arduino IDE, again probably using the Arduino programming language and libraries, it could be identified as “Arduino-based”. But in most cases and unless explicitly defined so, it is just a board with an ATmega328, containing the knowledge of its maker.
You may ask what is the point of raising such an issue. Technology people need to be precise. Marketing people should know what they are advertising. Sales people should know what they are selling. But above all, Legal should know precisely whose Intellectual Property is every part of a composite board. Arduino is an open-source platform, published under a specific license scheme. Open-source libraries contain software that is made public under other licensing schemes (such as MIT, Apache, GNU GPL). Some libraries may contain pieces of code produced by others, and therefore their licensing scheme is mixed. Legal Counsellors and Engineers should work very closely to identify whether they can integrate such open-source components in a commercial product.
Several peripheral boards, such as containing relays, sensors etc claim to be “Arduino compatible”. Is there such a standardized compatibility? The short answer is NO. There are hundreds of variations in the power supply voltages, current requirements, clock and timing specifications, availability of libraries, Arduino MCU boards and peripherals etc. One must be very cautious when buying such a peripheral board. It is strongly advised to get a sample first and make sure that you buy the exact same thing when ordering larger quantities. And definitely, there is lots of Googling required before placing an order.
Most peripherals provide a more-or-less standard interface. If for example a peripheral supports SPI or I2C and provided that there exist an Arduino library, there are good chances that you can use it in your application. A certain amount of effort is required to learn the features and usage of the library. Sometimes, libraries are built to support so many platforms, architectures and features that it may be easier to built a custom one. An additional drawback of libraries found on the internet is that sometimes they are so packed with features, that consume a lot of the limited space of an MCU. I have found myself in several occasions with libraries so big, that it was not possible to write any code at all. Such an example is the graphics libraries for OLED displays. In such cases, you may consider (not in precise order):
Note that having a peripheral being compliant with a protocol, does not necessarily mean that it is suitable for your application. For example, I was testing an SD memory module which supported SPI very well, but only when it was the one and only, single module wired to the SPI bus. Adding an additional SPI module, such as an Ethernet module, created electrical short-circuiting of the bus. You can see the whole article on SD Card Modules and their problems
Can those peripheral boards operate with non-Arduino boards? Mostly yes, unless one relies on a particular Arduino feature, or the cost of modifying the peripheral to work with another platform is so high (such as building a library from scratch) that does not justify the effort.
Finally, one critical concern concerning life-threatening issues. The Internet-of-Things (IoT) and the massive use of controllers in home automation is driving people without any knowledge of handling electricity to experiment with turning lamps on and off and similar projects. I cannot stress enough the lethal dangers associated with such projects. Education is mandatory, not only to explain what to do, but also to understand what not do without the supervision of a certified professional. Parental supervision is totally worthless, unless the parent is a certified electrical engineer. Several of us had been hobbyists from a small age. Staying alive means that we have been careful enough to gradually build our knowledge, before we did something dangerous. Young people should not be discouraged but rather educated in maintaining their safety. In any case, project builders should understand and comply to the safety and security issues associated with their projects, as well as the local laws, regulations and certifications for designing, building, testing, operating, owning and interfacing any form of apparatus.
This is the environment used to write programs, which in Arduino language are called “sketches”. Actually, the term “sketch” is inherited from Processing, a Java based programming environment which:
promoted software literacy within the visual arts and visual literacy within technology
I have used Processing in the past to construct visually appealing user interfaces and, although it is built on Java, it is much easier to program than Java and also allows to create very fast-updating graphics.
From my point of view, the Arduino IDE is the component which carries the larger amount of weight of the Arduino name. It allows to write programs, compile and link, as well as upload to boards. It may use third party tools (avr-gcc, avrdude etc) to accomplish such functions, but it integrates all in the same environment, without going back and forth to individual applications. This integration has of course some limitations in contrast to those third party tools and the Arduino IDE has received a lot of criticism for that issue, but you cannot have it all!
Can the Arduino IDE be used to write programs for non-Arduino boards? Yes. People have written software to support other platforms such as the ESP8266. The IDE provides the capability to add additional board definitions and even language parts to support those other platforms. Of course, this does not make those other platforms Arduino.
You can use the Arduino programming language to write programs in the Arduino IDE. This is based on Wiring, which is:
Wiring is an open-source programming framework for microcontrollers.
Wiring allows writing cross-platform software to control devices attached to a wide range of microcontroller boards to create all kinds of creative coding, interactive objects, spaces or physical experiences.
Anyone with a knowledge of C can start writing simple programs with the Arduino language very quickly. Good knowledge of C++ is required to understand how libraries work and even more, to start writing more complex programs and libraries. Additional effort in the knowledge-building process is required in understanding electronics related issues, such as using the pins for inputs, outputs, motor control etc.
Libraries are extending the Arduino environment, adding functionality to accomplish certain tasks. There are pure software libraries, adding an algorithm or other utilities. For example, I had used a library that provides smoothing of measured data by averaging in a time window. Other libraries utilize the architecture of the micro-controller, such as timers, watchdogs etc., hiding the complexity of the micro-controller registers and processes.
Finally, libraries allow communication with the world outside the confines of the MCU, such as libraries to talk with Ethernet boards, SD cards, mobile cards, motors etc. Such libraries utilize communication protocols, either standard (I2C, SPI, serial etc) or proprietary for the purpose of interfacing the MCU to the peripheral device. Please refer to section Peripherals for issues regarding the association between peripherals and their support libraries.
Arduino platform provides standard and board specific libraries that are supported by the Arduino community. Other libraries may also be provided by component manufacturers and can be used also by non-Arduino platforms. Yet, in most cases, libraries found online are developed based on Arduino intricacies (e.g. pin assignment, usage of interrupts). Lots of C++ knowledge is required to go through the library source code, if provided and lots of Googling for other people experience.
The bootloader is the program that allows uploading user programs, such as sketches, onto the MCU. Subsequently, when a user program has been uploaded and stored into the MCU memory, when the MCU is powered on or is restarted, the bootloader is the program that will run first and will pass execution to the user program. Is the bootloader part of the Arduino platform? Technically, it is not. You can write your program in the Arduino IDE and upload it using a programmer such as USBasp, without requiring a bootloader at all. You can even write your program in any environment and any programming language, compile it and somehow create a hex file with the binary code, and upload it e.g. with avrdude. The program will run as designed, without any bootloader.
Yet, the process of writing sketches in the Arduino IDE, compiling and uploading using the serial interface which in turn communicates with the bootloader to store the code in the MCU flash memory, makes the bootloader an indispensable part of the Arduino toolset.
Note also that the Arduino IDE allows burning a bootloader code, which is a file residing in the IDE folder structure, to the board of choice.
The final part of this chain is the software developed by the user. Such software may be written to run on several Arduino as well as non-Arduino platforms. If such software relies on specific Arduino intricacies, such as the usage of timers, delays, interrupts etc. and it impossible to run on another platform, this makes it part of the Arduino environment. You may have noticed when examining code in libraries having lots of pre-processor
#define directives, specifying code variations depending on the code compiled for specific architectures.
If the user decides to publish the code under an open-source license, it can also be made available to other users around the world.
I have tried to explain in a relative detail the parts that comprise the Arduino platform. I have also tried to show that although Arduino made the world of automation broader, simper and cheaper, it is definitely not a plug-and-play, suit-for-all, zero-development and zero-testing environment to build projects. A sufficient amount of knowledge in:
and perhaps other disciplines, along with health and safety considerations, is required to build a project.