
We are currently living in a world surrounded by Machine Learning models. Over the course of your day, you are utilising these models more than you realize. Day to day tasks like scrolling through social media, taking a picture, checking the weather, all depend on machine learning models. You might even see this blog because a machine learning model suggested this to you.

We all know that training these models are computationally expensive. But most of the times, running inference on these models are computationally expensive as well. The rate at which we are using machine learning services, we need computing systems that are fast enough to handle it. Thus most of these models run on huge data centres with clusters of CPUs and GPUs(even TPUs in some cases).
Big is not always better
When you take a picture, you want the machine learning magic to happen instantly. You don’t want to wait for the image to be sent to a data centre where it is being processed and sent back again. In this case, you want the machine learning model to run locally.
When you say "Alexa" or "Ok, Google", you want your devices to respond to you instantly. Waiting for the device to send your voice to the servers where it is processed, and the information is retrieved. This takes time and cripples the user experience. Again, in this case, you want the machine learning model to run locally.
What is TinyML
TinyML is a field of study in Machine Learning and Embedded Systems that explores the types of models you can run on small, low-powered devices like microcontrollers. It enables low-latency, low power and low bandwidth model inference at edge devices. While a standard consumer CPUs consume between 65 watts and 85 watts and standard consumer GPU consumes anywhere between 200 watts to 500 watts, a typical microcontroller consumes power in the order of milliwatts or microwatts. That is around a thousand times less power consumption. This low power consumption enables the TinyML devices to run unplugged on batteries for weeks, months, and in some cases, even years, while running ML applications on edge.
The Future of ML is Tiny and Bright
Advantages of TinyML
- Low Latency: Since the model runs on the edge, the data doesn’t have to be sent to a server to run inference. This reduces the latency of the output.
- Low Power Consumption: As we discussed before, microcontrollers consume very little power. This enables them to run without being charged for a really long time.
- Low Bandwidth: As the data doesn’t have to be sent to the server constantly, less internet bandwidth is used.
- Privacy: Since the model is running on the edge, your data is not stored in any servers.
Applications of TinyML
By summarizing and analyzing data at the edge on low power devices, TinyML offers many unique solutions. Even though TinyML is an emerging field, it has been used in production for years. The "OK Google", "Alexa", "Hey Siri" wake words are an example of TinyML. Here, the devices are always on and are analyzing your voice to detect the wake word. I’ll add some more applications of TinyML here.
- Industrial Predictive Maintenance: Machines are prone to fault. Using TinyML on low powered devices, it is possible to monitor the machine and predict faults ahead of time constantly. This predictive maintenance can lead to significant cost savings. Ping Services, an Australian startup, has introduced an IoT device that autonomously monitors wind turbines by magnetically attaching to the outside of the turbine and analyzing detailed data at the edge. This device can alert the authorities regarding potential issues even before it occurs.
- Healthcare: The Solar Scare Mosquito project uses TinyML to curb the spread of mosquito-borne diseases like Dengue, Malaria, Zika Virus, Chikungunya, etc. It works by detecting the mosquito breeding conditions and agitates the water to prevent mosquito breeding. It runs on solar power and can thus run indefinitely.
- Agriculture: The Nuru app helps farmers detect diseases in plants just by taking a picture of it by running Machine Learning models on the device using TensorFlow Lite. Since it works on the device, there is no need for an internet connection. This is a crucial requirement for remote farmers since they might not have proper internet connection in their place.
- Ocean Life Conservation: Smart ML-powered devices are used to monitor whales in real-time in waterways around Seattle and Vancouver to avoid whale strikes in busy shipping lanes.
How can I get started?
- Hardware: The Arduino Nano 33 BLE Sense is the suggested hardware for deploying Machine Learning models on edge. It contains a 32-bit ARM Cortex-M4F microcontroller running at 64MHz with 1MB of program memory and 256KB RAM. This microcontroller provides enough horsepower to run TinyML models. The Arduino Nano 33 BLE Sense also contains colour, brightness, proximity, gesture, motion, vibration, orientation, temperature, humidity, and pressure sensors. It also contains a digital microphone and a Bluetooth low energy(BLE) module. This sensor suite will be more than enough for most applications.
- Machine Learning Framework: There are only a handful of frameworks that cater to TinyML needs. Of that, TensorFlow Lite is the most popular and has the most community support. Using TensorFlow Lite Micro, we can deploy models on microcontrollers.
- Learning Resources: Since TinyML is an emerging field, there aren’t many learning materials as of today. But there are a few excellent materials like Pete Warden and Daniel Situnayake’s book, "TinyML: Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power", Harvard University’s Course on TinyML by Vijay Janapa Reddi, and Digikey’s blogs and videos on TinyML.
Conclusion
Microcontrollers are everywhere, and they collect a vast amount of data. With TinyML, we can leverage this data to build better products. There are over 250 Billion microcontroller units today, and this number is only going to rise in the future. This will lead to a decrease in price(because, economics! Duh!). Enabling Machine Learning in microcontrollers will open up new opportunities.
About Me
I’m a student interested in AI research and development. I like to write about some lesser talked about topics in AI like Federated Learning, Graph Neural Networks, Fairness in AI, Quantum Machine Learning, TinyML, etc. Follow me to stay updated on all my future blogs.