Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Components and supplies

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
Arduino Nano 33 BLE Sense
×1
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
National Control Devices PCA9685 8-Channel 8W 12V FET Driver Proportional Valve Controller with I2C Interface
×1
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
SG90 Micro-servo motor
×3
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
9V Battery Clip
×1

Necessary tools and machines

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
3D Printer (generic)
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
Soldering iron (generic)

Apps and online services

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
Edge Impulse Studio
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
Arduino IDE
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
Autodesk Fusion 360

About this project

Overview

This project demonstrates how to build a TinyML language detector on the Arduino Nano 33 BLE Sense using Edge Impulse Studio. The device continuously listens for three spoken words – “si” (Italian), “oui” (French), and “yes” (English) – and activates the corresponding flag when a word is detected.

The workflow comprises:

  • Dataset creation and sampling
  • Model design and training
  • Performance evaluation
  • Hardware‑specific optimization with the EON Tuner
  • Deployment and integration with servo‑controlled flags
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Sampling & Dataset Creation

The dataset contains 30 minutes of recordings: 10 minutes per target word plus 3 minutes of ambient background noise. Each 1‑second clip captures a single utterance, and all files are labeled accordingly in Edge Impulse.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Background samples help the model differentiate speech from non‑speech.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Model Design

Edge Impulse automates most preprocessing steps. Audio is converted to a time‑series, windowed, and transformed using MFCC features. A lightweight CNN then classifies each window into one of four classes: “si,” “oui,” “yes,” or background.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Sample MFCCs and the network architecture are visualized in the training dashboard.

Training & Arduino Optimization

The EON Tuner automatically explores dozens of model configurations, scoring each by accuracy, inference time, RAM, and flash usage. For this project, the fastest model among the top‑5 accuracies was selected.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Testing

After training, a fresh test set confirmed robust performance. Classification confidence consistently exceeded 80% for the target words.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Deployment

Deployment is streamlined via the Edge Impulse Arduino library. The generated header file is dropped into the Arduino IDE, then customized to control three SG90 servos that display flags.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense
TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Code Overview

The source code (available on GitHub) extends the Edge Impulse template with servo control logic. Key additions include:

  1. Integration of Adafruit_PWMServoDriver.h for PCA9685 PWM control.
  2. A servos_selector function that activates the correct flag based on the model’s confidence.
  3. Conditional logic that triggers servos_selector when a classification exceeds 80% confidence.
void servos_selector(int iter){
  unsigned long time_now = millis();
  if (time_now - time_was > 2000){
    time_was = time_now;
    switch (iter){
      case 0: // Italian
        pwm.setPWM(0, 0, 350); delay(500);
        pwm.setPWM(0, 0, 200); pwm.setPWM(1, 0, 200); pwm.setPWM(2, 0, 200);
        break;
      case 1: // French
        pwm.setPWM(1, 0, 350); Serial.println("2222"); delay(500);
        pwm.setPWM(0, 0, 200); pwm.setPWM(1, 0, 200); pwm.setPWM(2, 0, 200);
        break;
      case 2: // English
        pwm.setPWM(2, 0, 350); Serial.println("333"); delay(500);
        pwm.setPWM(0, 0, 200); pwm.setPWM(1, 0, 200); pwm.setPWM(2, 0, 200);
        break;
    }
  }
}

Circuit Design

The microcontroller is powered by a 9V battery and uses a PCA9685 board to drive three SG90 servos. The board’s 12V pin is connected to the battery, while the PWM outputs drive the servos via the PCA9685’s I2C interface.

TinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

With the hardware, software, and data pipeline in place, the TinyML language detector is ready for deployment.

Code

code
https://github.com/EnzoCalogero/Tensorflow_Lite_embeded/tree/main/nano_sense_EdgeImpulse/language_detection/nano_ble33_sense_microphone_continuous

Custom parts and enclosures

Schematics

languagedetection_9RxXhRX5sj.fzzTinyML Language Detector with Edge Impulse on Arduino Nano 33 BLE Sense

Manufacturing process

  1. Build a Real-Time Gyroscope Game with Arduino Nano & MPU-6050 Sensor
  2. Arduino Digital Dice Project: Build Your Own LCD-based Random Number Generator
  3. Build an Audio‑Reactive Desk Lamp with Arduino Nano
  4. NeoPixel Matrix Pong on Arduino Nano: Build a Neon Pong Game
  5. Arduino-Powered Security System: Smart Motion Detection & Alert
  6. Build a Classic Arduino LCD Arcade Game with Buzzer and Joystick
  7. Arduino Tennis Game – Build a Virtual Racquet Experience with NeoPixel, Sensors, and Bluetooth
  8. Build a Smart Weather Station with Arduino UNO and AWS Integration
  9. Arduino Marble Maze Labyrinth – Build an Exciting Cardboard Board Game
  10. Build an Interactive LCD Game with Arduino UNO