Overview

TinyML Wearable
Components and Hardware Configuration
Software components:- Edge Impulse Studio account
- Edge Impulse Project
- Arduino IDE
- 3D printed components for the wearable
- Syntiant TinyML board
- Vibration motor module
- 3.7V LiPo battery. I used one with 500mAh
- Veroboard/stripboard
- 1 220 Ω resistor
- 1 2N3904 transistor
- 1 5.7 k Ω resistor
- Some jumper wires and male header pins
- Soldering iron and soldering wire
- Super glue. Always be careful when handling glues!
1. Deploy the Model to the Syntiant TinyML Board
In the Edge Impulse Studio, the Impulse was deployed as an optimized Syntiant NDP 101/120 library. This packages all the signal processing blocks, configuration and learning blocks up into a single package. Afterwards, a custom Arduino code was created to analyze the model’s predictions. This code can be obtained from this GitHub repository. The Arduino code turns GPIO 1HIGH
when an ambulance, firetruck or car siren/horn sounds are detected. GPIO 1 is then used to trigger a motor control circuit that creates a vibration. If you want to turn GPIO 2 or 3 high and low you can use the commands OUT_2_HIGH(), OUT_2_LOW(), OUT_3_HIGH() and OUT_3_LOW() respectively. These functions can be found in the syntiant.h
file.
Once the code is uploaded to the Syntiant TinyML board, we can use the Serial Monitor (or any other similar software) to see the logs being generated by the board. Open a terminal, select the COM Port of the Syntiant TinyML board with 115200 8-N-1 settings (in Arduino IDE, that is 115200 baud Carriage return). Sounds of ambulance sirens, firetruck sirens, and cars horns will turn the RGB LED red. For the “unknown” sounds, the RGB LED is off.

Syntiant TinyML Board RGB Red

Serial logs
2. 3D Print the Wearable Parts
The wearable’s components can be categorized into two parts: the electronic components and the 3D printed components. The 3D printed component files can be downloaded from printables.com or thingiverse.com. The wearable casing is made up of two components: one holds the electrical components while the other is a cover. I 3D printed these with PLA material.
Wearable - Main Enclosure

Wearable - Side Cover

Wrist Straps Attachment

Wearable on Stand
3. Assemble the Electronic Parts
The wearable’s electronic components include:- Syntiant TinyML board
- 3.7V LiPo battery - the wearable’s case can hold a LiPo battery which has a maximum dimension of 38mm x 30mm x 5mm
- Vibration motor module
- Circuit board for controlling the vibration motor module - the wearable’s case can hold a circuit board that has a maximum dimension of 34mm x 28mm x 5mm

Electronic Components

Syntiant TinyML Board Battery Connection
- 1 220 Ω resistor – one end connects to the Syntiant GPIO 1, the other ends connects to base of transistor
- 1 2N3904 transistor - the emitter pin is connected to negative terminal of the battery
- 1 5.7 k Ω resistor – one end connects to the positive terminal of the battery, the other end connects to the collector of the transistor

Circuit Layout

Components Layout

Components Assembled

Closed Wearable
Results
As I was working on the electronic components, I was not so sure if the vibrations from the motor will be noticeable on the wearable. Fortunately, the motor module works very well! The wearable’s vibration strength is similar to a smartphone’s vibration. This can be seen in the video below showing how the motor vibrates from test code running on the Syntiant TinyML board.
Wearable Vibration Test

Wearable on a Person's Hand

Wearable 1

Wearable 2

Wearable 3

Wearable 4
Conclusion
This environmental sensing wearable is one of the many solutions that TinyML offers. The Syntiant TinyML Board is a tiny board with a microphone and accelerometer, USB host microcontroller and an always-on Neural Decision Processor, featuring ultra low-power consumption, a fully connected neural network architecture, and fully supported by Edge Impulse. I have always been fascinated by this tiny board and this made it the perfect choice for this project! RatPack is another fascinating wearable that has been created using the Syntiant TinyML board. The huge African pouched rat has been given this gear to enable them to communicate with their human handlers when they come across a landmine or other interesting object. Please checkout the documentation to learn more about this fascinating project. All of the wearable’s required components are open source, and the documentation provides step-by-step instructions so you can easily create your own.
RatPack