TinyML on the factory floor: how a microcontroller learns to spot an anomaly

elettronica-industriale

TinyML on the factory floor: how a microcontroller learns to spot an anomaly

There's a moment, in every industrial machine, when something starts to shift long before it actually breaks down. A vibration that feels slightly off. A temperature that climbs at a new pace. A sound an experienced engineer would clock immediately, but which nobody is listening out for around the clock.

Over the past few years, TinyML has come up more and more often as a possible answer to this problem: teaching a microcontroller to recognise that shift, right there on the factory floor, without sending every scrap of data off to the cloud. It's a genuinely exciting idea. But, as is so often the case in industrial electronics, the gap between the idea and a reliable application deserves to be talked about honestly.

What TinyML actually means, in plain terms

TinyML is the application of machine learning techniques to devices with very limited resources: microcontrollers with little memory, modest computing power and, more often than not, running on battery. Rather than training and running a model on a hefty server, you train a model (typically a very small one) and run it directly on the microcontroller itself.

For anyone working in predictive maintenance, the promise is obvious: a sensor that doesn't just log data, but interprets it locally, picking out patterns tied to an emerging fault, a bearing starting to wear, a mechanical imbalance, an unusual rise in temperature.

It's worth being precise from the outset: many of these applications are still at the experimental stage. The field is maturing quickly, but every use case needs to be assessed on its own terms, with its own constraints around data, environment and how critical the process actually is. Anyone pitching TinyML as a universal, plug-and-play solution for any industrial machine is oversimplifying a far more nuanced reality.

How a microcontroller processes vibration and temperature on site

The underlying principle here is edge AI for industrial predictive maintenance: moving the processing as close as possible to where the data is generated, rather than shipping it elsewhere to be analysed.

Picture an accelerometer fitted to a motor. The sensor picks up a vibration signal at a given sampling rate. That raw signal carries far more information than is actually needed to spot an anomaly, so it needs to be treated, often transformed into the frequency domain, and distilled down into a set of meaningful features.

It's on these features, not on the raw signal, that the TinyML model operates: a small classifier capable of telling the difference, say, between normal running and an early warning state. The model runs directly on the microcontroller and delivers a result in real time, with no need to wait for a data connection or for bandwidth to the cloud to become available.

The same principle applies to temperature readings, which are often combined with other parameters to build a more dependable picture. The aim isn't to replace traditional monitoring, but to add a layer of intelligent interpretation exactly where the data is born.

The real constraints you can't wish away

This is where the less glamorous, but far more important, side of industrial TinyML comes in.

The first constraint is memory. A typical microcontroller for industrial applications has a few tens or hundreds of kilobytes of RAM, not gigabytes. The model, along with the code that runs it, has to fit within that space, alongside the rest of the firmware handling sensors, communication and the machine's safety functions.

The second is computing power. Many microcontrollers have no dedicated unit for machine learning, which means every operation the model performs eats into CPU cycles that would otherwise be available for controlling the machine itself. Striking the right balance between model accuracy and execution time is a design decision, not an afterthought.

The third constraint, probably the most underestimated of the three, is the quality of the data being captured. A model trained on data gathered under ideal conditions can behave unpredictably on a real machine, with different ambient vibrations, varying mechanical tolerances, electrical noise on the power line. For this reason, no edge AI solution for industrial predictive maintenance should be considered production-ready without a thorough validation phase out in the field, across multiple machines, under genuine operating conditions, over a long enough period to catch even the rare anomalies.

Why it all comes back to hardware and firmware

TinyML doesn't operate in isolation. It lives inside a system that somebody has designed, piece by piece.

You need hardware built to capture clean signals, with a decent signal-to-noise ratio, a stable power supply and sensor choices that genuinely match the physical phenomenon being observed. This is the territory of hardware development: not a downstream detail, but the foundation everything else is built on.

You then need firmware capable of handling data acquisition, running the model and communicating the results, all reliably and without getting in the way of the machine's control functions. This is the work we describe on our firmware development page: an architecture that has to juggle priorities and timing and, when needed, weave an inference model in alongside traditional control logic.

And finally, you need a broader view that takes into account how these systems fit within the electronic controls for industrial machinery already in place, often working within constraints around backward compatibility, safety and regulation that a machine learning model, on its own, simply cannot resolve.

One step at a time, with honesty

TinyML applied to industrial predictive maintenance is an interesting direction, and we believe it's well worth exploring. But we approach it with the same spirit we bring to every industrial electronics project: starting from the real problem, not the technology, and building solutions that are validated step by step, before they ever go into production.

If you're weighing up how to bring edge AI capabilities for industrial predictive maintenance into your systems, or simply want to find out whether your use case is ready for this kind of approach, let's talk it through: it's the first step towards working out what's genuinely worth building today.

Cookie Settings

This website uses cookies. You can choose to allow or reject certain types hereunder. More information about their use can be found in ourprivacy policy.

They allow core website functionality. The website won’t work without them.

They serve to collect usage statistics, with anonymised IP, that help us improve the website.

Contact Us