TinyML on Arduino Board
Arduino Nano 33 BLE Sense for tinyML Projects
Arduino Nano 33 BLE Sense was the first Arduino board designed for tinyML projects using cainvas. It is embedded with following sensors:
Microphone
9 axis inertial sensor
humidity, and temperature sensor
barometric sensor
gesture, proximity, light color and light intensity sensor
These sensors make this board ideal for wearable devices, weather stations, sound analysis, wakeword detection, movement direction (to/away) detection etc.
How to Use Arduino on Cainvas
Arduino has application (.bin file) and static library (.a file) generation support on Cainvas. It can also flash the generated binary to the board directly on the board connected to a windows/ubuntu laptop.
First order of action is to create a Cainavs Device by registering Arduino board and its sensors. Once you hit "register", you'd see the following message:
> Device successfully created. Please download the SDK from the list below.
Once SDK is downloaded, you need to unzip and run the device on your laptop/desktop. The running SDK process would do the following:
Find the USB port connected to Arduino
Connect to Arduino and start receiving the sensor data
Print the sensor data on screen, line by line.
Send the data to Cainvas with appropriate http/mqtt protocol.
Then you head back to Cainvas Pailette and select "Sensor Data Capture" tab to watch the sensor data waveforms in realtime.
The data thus captured in saved as a dataset for deep learning model development.
The deep learning model is training for a few hundred epochs. Once a reasonable accuracy is achieved the model is saved in ONNX format. Then we convert saved ONNX model using deepSea compiler into an laptop application to compare the inference accuracy to test accuracy from PyTorch with the same test dataset.
After the test, deepSea compiler is used to compile the ONNX model into an application or a library for Arduino Nano 33 BLE Sense board and validate the model running on Cainvas with waveform and inference label.
The 3 min YouTube video below will take you through these steps to create an Arduino application for identifying American Sign Language.
Summary
In this blog, you saw that creating TinyML application for Arduino Nano has been made easy by following few steps. Here is a link to the notebook to recreate this application using Cainvas - https://cainvas.ai-tech.systems/use-cases/sign-language-sensor-app/