Software engineering for hardware devices
Our electronics prototypes usually include a microcontroller that executes a piece of code that enables the microcontroller to perform its intended functions. This piece of code is what we call (prototype) firmware. Firmware prototyping is a vital part of “proof of concept” design and goes hand in hand with electronics prototyping. In this stage we focus on creativity and speed, to evaluate the technical feasibility of different technical solutions for a certain feature in a short period of time. The code is usually written in C or Python. Firmware prototyping also allows for quick automation of mechanical test setups, with the help of a microcontroller development kit.
During firmware prototyping, we focus on speed and creativity to explore different solutions. However, this code is not necessarily fast, reliable, energy efficient or safe.
That is why it is important that the firmware for the final product is handled differently, with a lot of attention for quality and testing. Very often we also move from standard development boards to a custom PCB design in this stage with may require a different approach and language. Regulatory compliance also becomes important in this stage (e.g. medical or automotive).
In very simple devices the firmware will handle everything. When devices are more complex and equipped with more powerful electronics (e.g. SBC – Single Board Computer), it can run an operating system like Linux, Windows, Android, ... Software that runs on top of these operating systems, is what we call “embedded software”. Where firmware handles the low-level tasks, embedded software will implement higher-level functionality (e.g. GUI – Graphical User Interface, Machine vision, …) and is usually written in languages such as C++, Java, C#, Python, ...
Powerful devices with moving parts (machines) often have high reliability, safety and serviceability requirements. On top of that they are usually manufactured in low quantities, or even just one. In these cases a PLC (Programmable Logic Controller) is often the best choice (rather than a microcontroller of PC). PLC’s are more expensive but require little or no electronics design and (regulatory) testing. They are also very reliable and flexible. Dedicated safety features (e.g. interlocks) communicate directly with the safety PLC which monitors them at all times. Motor drives and robot controllers can also be controlled directly by the PLC, for example using EtherCAT communication. PLC’s can also be hooked up to (industrial) PC’s to perform functions that require a lot of computing power (e.g. machine vision).