Arduinois on a mission to make machine learning simple enough for anyone to use. Them with the TensorFlow Lite team have released TensorFlow Lite Micro to integrate with the Arduino Nano 33 BLE Sense.
The Arduino Nano 33 BLE Sense has a variety of onboard sensors meaning potential for some cool TinyML applications:
Voice – Digital Microphone
Motion – 9-axis IMU (Accelerometer, Gyroscope, and Magnetometer)
Environmental – Temperature, Humidity, and Pressure
Light – Brightness, Color, and Object Proximity
Unlike classic Arduino Uno, the board combines a microcontroller with onboard sensors which means you can address many use cases without additional hardware or wiring. The board is also small enough to be used in end applications like wearables. As the name suggests it has Bluetooth Low Energy connectivity so you can send data (or inference results) to a laptop, mobile app or other Bluetooth Low Energy boards and peripherals.
Tip: Sensors on a USB stick – Connecting the BLE Sense board over USB is an easy way to capture data and add multiple sensors to single board computers without the need for additional wiring or hardware – a nice addition to a Raspberry Pi, for example.
And what are Microcontroller, you ask?
Microcontrollers, such as those used on Arduino boards, are low-cost, single chip, self-contained computer systems. They’re the invisible computers embedded inside billions of everyday gadgets like wearables, drones, 3D printers, toys, rice cookers, smart plugs, e-scooters, and washing machines. The trend to connect these devices is part of what is referred to as the Internet of Things (IoT).
Arduino is an open-source platform and community focused on making microcontroller application development accessible to everyone. The board we’re using here has an Arm Cortex-M4 microcontroller running at 64 MHz with 1 MB Flash memory and 256 KB of RAM. This is tiny in comparison to Cloud, PC, or mobile but reasonable by microcontroller standards.
Why should you care about it?
There are practical reasons you might want to squeeze ML on microcontrollers, including:
Function – wanting a smart device to act quickly and locally (independent of the Internet)
Cost – accomplishing this with simple and lower cost hardware
Privacy – not wanting to share all sensor data externally
Efficiency – smaller device form-factor, energy-harvesting or longer battery life.
There’s a final goal which we’re building towards that is very important:
Machine learning can make microcontrollers accessible to developers who don’t have a background in embedded development.
On the machine learning side, there are techniques you can use to fit neural network models into memory constrained devices like microcontrollers. One of the key steps is the quantization of the weights from floating point to 8-bit integers. This also has the effect of making inference quicker to calculate and more applicable to lower clock-rate devices.
TinyML and the Future.
TinyML is an emerging field and there is still work to do – but what’s exciting is there’s a vast unexplored application space out there. Billions of microcontrollers combined with all sorts of sensors in all sorts of places which can lead to some seriously creative and valuable TinyML applications in the future.
Learning Exercise.
The inference examples for TensorFlow Lite for Microcontrollers are now packaged and available through the Arduino Library Manager making it possible to include and run them on Arduino in a few clicks.
For more background on the examples, you can take a look at the source in the TensorFlow repository. The models in these examples were previously trained. The tutorials we will show you how to deploy and run them on an Arduino.
TL;DR.
Generated using AI.
TinyML on Arduino: Arduino and TensorFlow Lite Micro bring machine learning to the Arduino Nano 33 BLE Sense, making ML accessible to everyone.
Nano 33 BLE Sense: Equipped with various sensors (voice, motion, environmental, light) and Bluetooth Low Energy, ideal for TinyML applications without extra hardware.
Microcontrollers: Low-cost, self-contained systems embedded in everyday gadgets; Arduino’s open-source platform makes them accessible for development.
Benefits: Local ML processing offers faster function, cost efficiency, privacy, and better energy management.
Future of TinyML: Emerging field with vast potential applications; examples and tutorials are available in the Arduino Library Manager for easy deployment.
Leave a comment