Designing an embedded HMI on a microcontroller
An embedded HMI is the control interface built into a piece of equipment: a machine, a measuring instrument or a control panel. In our projects, it is a display, usually a touchscreen, driven by a microcontroller. This page covers the points to define during its design, the role of the TouchGFX graphics library, real-time management, and industrial and regulatory constraints.
What is an embedded HMI?
HMI stands for human-machine interface: all the elements that allow an operator to control a piece of equipment and monitor its operation. It is called embedded when it is an integral part of the equipment: the display, the touch panel, the buttons and the associated software are designed for that device, rather than for a computer installed alongside it.
It displays the state of the installation, the readings and the alarms, and lets the operator adjust settings, start a cycle or acknowledge a fault. These functions must be provided throughout the service life of the equipment, often on a factory floor, without the restarts and software maintenance that a computer workstation requires.
In this respect it differs from an industrial PC or a supervision workstation: dedicated to a single piece of equipment, it is sized according to that equipment’s constraints of space, power supply, environment, service life and cost.
Points to define at the start of a project
These choices must be settled before the board is designed, as they determine its architecture. We review them with each customer when the project starts.
| Point to define | Options to consider |
|---|---|
| The screen | |
| Touchscreen or not | Non-touch display operated with buttons or a rotary knob: suited to thick gloves and dirty environments |
| Touch technology | Capacitive under tempered glass: precise, multi-touch Resistive: usable with gloves or a stylus |
| Size and format | Diagonal: 5, 7 or 10 inches, or another format Orientation Viewing distance Readability in daylight |
| The front panel | |
| Membrane | Screen-printed polycarbonate membrane Customer’s colours and logo Glass instead of the membrane |
| Buttons | Embossed keys built into the membrane Mechanical buttons |
| Indicators | LEDs on the front panel LEDs built into the membrane Remote LEDs |
| Sealing (IP) | Target protection rating (for example IP65 at the front) Cleaning Fluid splashes |
| Integration | |
| Mounting | Panel cut-out Console Articulated arm Built into an existing enclosure |
| Protection | Shock Vibration Dust Operating temperatures |
| Power supply | 12 or 24 V DC Mains Battery: the target battery life drives the choice of microcontroller |
| Talking to the machine | |
| Connectors | Screw terminals Pluggable connectors Sealed connectors RJ45 USB |
| Buses and networks | CAN bus RS-485 RS-232 Ethernet USB Bluetooth Cellular network |
| Inputs and outputs | Digital I/O 4-20 mA or 0-10 V analogue High-speed encoder counting |
| Product life | |
| Updates | Via USB stick or over the network Signed firmware Encrypted firmware |
The TouchGFX graphics library
TouchGFX is a graphics library designed for STM32 microcontrollers and provided free of charge. It consists of a design tool, in which screens, images and animations are created, and a display engine executed by the microcontroller.
Its main strength is display smoothness. TouchGFX only redraws the areas of the screen that change and delegates the most demanding operations (copying images, transparency, colour blending) to the microcontroller’s graphics accelerator. The processor thus remains available for the rest of the application.
Transitions, scrolling and animations thereby reach a quality comparable to that of consumer devices, on hardware considerably simpler than an embedded computer. Multilingual support is built in: every text in the interface is provided in each of the planned languages, and the language can be changed directly from the screen.
A simulator runs the interface on a computer, operated with a mouse, before the board is available. Screens can therefore be presented to and discussed with the customer from the mock-up stage, and their feedback incorporated before the embedded software is frozen.
We handle TouchGFX development from the screen mock-ups through to their integration into the embedded software: communication with the machine, alarm management, updates.
Graphical interface and real-time
In a piece of equipment, the display is not the priority task. Sensor acquisition, actuator control and fault handling must meet their deadlines, whatever the state of the screen.
This organisation relies on a real-time operating system; we work with FreeRTOS and Eclipse ThreadX. The software is structured into tasks with different priorities, control and communications taking precedence over screen refresh. Under heavy processor load, only the smoothness of the display can be affected: machine control keeps to its deadlines.
The equipment thus combines the responsiveness of a modern graphical interface with the determinism of a real-time system: the response times of critical functions are known and guaranteed.
Industrial constraints and the Cyber Resilience Act
An HMI installed in an industrial setting is subject to constraints that consumer electronics does not face: 12 or 24 V supply protected against reverse polarity and overvoltage, isolated or protected communication links, resistance to shock, vibration and dust, and a sealed front panel. These requirements are addressed from the board design stage.
Cybersecurity is now added to these constraints. The Cyber Resilience Act, European Regulation (EU) 2024/2847, sets security requirements for any product with software and a connection (network, USB, wireless link) placed on the European market. It will apply in full from December 2027. Our products are designed for compliance from the outset: secure boot, signed and, where necessary, encrypted firmware, integrity checking of updates, a software bill of materials (SBOM) and vulnerability monitoring.
Our approach
We take charge of the embedded HMI as a whole: electronic board, embedded software, TouchGFX interface and end-of-line test bench. You have a single point of contact from the first schematic through to series production. Design and development are carried out in France.
Two approaches are possible. Our HMI platform provides a proven base (display, touch panel, power supply, connectivity) that is adapted through configuration; development then focuses mainly on software, which shortens time to market. When the product calls for a specific shape, size or power consumption, we design a custom board.
In both cases, the project begins with a review of the points listed above, followed by a mock-up of the screens submitted for your approval before development.
Further reading
Our industrial HMI platform puts these principles into practice; its page details the specifications, screen mock-ups and use cases. Our other areas of work (electronic board design, PC software, test benches) are presented on the What we do page.
An embedded electronics project?
Tell us what you need and we will talk it through together.
Get in touch