Stufin
Home Quick Cart Profile

Arduino Tiny Machine Learning Kit

Buy Now

Microcontroller

Arduino Nano 33 BLE Sense board with ATSAMD21G18 32-bit Arm Cortex-M4 MCU

Operating Frequency

48 MHz

Flash Memory

256 KB

SRAM

32 KB

Sensors

LSM6DSOX, LPS22HH, VL53L0X, and ATSAMD21G18 ADC

Wireless Connectivity

Bluetooth 5.0 Low Energy (BLE)

Power Management

Rechargeable battery, USB-C charging port, and power management IC

Expansion Options

14 digital I/O pins, 6 analog input pins, I2C, SPI, and UART interfaces

Target Applications

  • Smart Home Automation: Develop intelligent home automation systems that can learn and adapt to user behavior.
  • Wearable Devices: Create wearable devices that can recognize gestures, track activities, and provide personalized feedback.
  • Industrial IoT: Design industrial IoT systems that can perform real-time monitoring, anomaly detection, and predictive maintenance.
  • Robotics: Build robots that can learn and adapt to their environment, enabling advanced autonomy and decision-making capabilities.

Getting Started

  • Unbox and assemble the kit according to the provided instructions.
  • Install the Arduino IDE and necessary software tools on your computer.
  • Choose a machine learning framework and library that suits your project requirements.
  • Develop and upload your project code to the board using the Arduino IDE.
  • Test and refine your project using the onboard sensors and machine learning capabilities.
To get started with the Arduino Tiny Machine Learning Kit, follow these steps

Resources

Arduino Documentation

[www.arduino.cc/en/Maindocumentation](http//www.arduino.cc/en/Maindocumentation)

TensorFlow Lite Micro

[www.tensorflow.org/lite/micro](http//www.tensorflow.org/lite/micro)

uTensor

[www.utensor.ai](http//www.utensor.ai)
CMSIS-NN[www.keil.com/pack/doc/CMSIS_ NN/html/index.html](http://www.keil.com/pack/doc/CMSIS_NN/html/index.html)

By leveraging the Arduino Tiny Machine Learning Kit, developers can create innovative IoT projects that integrate machine learning capabilities, enabling a new era of intelligent and autonomous devices.

Pin Configuration

  • Arduino Tiny Machine Learning Kit Pinout
  • The Arduino Tiny Machine Learning Kit is a compact, low-power board designed for machine learning applications. It features a range of pins that enable connectivity with various sensors, actuators, and other devices. Here's a detailed explanation of each pin, point by point:
  • Digital Pins
  • 1. D0/RX: Digital input/output pin and serial receive (RX) pin for serial communication.
  • Function: Digital input/output, serial communication (RX)
  • Connection: Connect to a serial device's TX pin or use as a digital input/output for sensors/controllers.
  • 2. D1/TX: Digital input/output pin and serial transmit (TX) pin for serial communication.
  • Function: Digital input/output, serial communication (TX)
  • Connection: Connect to a serial device's RX pin or use as a digital input/output for sensors/controllers.
  • 3. D2: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 4. D3: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 5. D4: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 6. D5: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 7. D6: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 8. D7: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 9. D8: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 10. D9: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 11. D10: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 12. D11: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 13. D12: Digital input/output pin.
  • Function: Digital input/output
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices.
  • 14. D13: Digital input/output pin and onboard LED indicator.
  • Function: Digital input/output, onboard LED indicator
  • Connection: Connect to sensors, LEDs, buttons, or other digital devices. The onboard LED is connected to this pin and can be used as a status indicator.
  • Analog Pins
  • 1. A0: Analog input pin.
  • Function: Analog input
  • Connection: Connect to analog sensors, potentiometers, or other analog devices.
  • 2. A1: Analog input pin.
  • Function: Analog input
  • Connection: Connect to analog sensors, potentiometers, or other analog devices.
  • 3. A2: Analog input pin.
  • Function: Analog input
  • Connection: Connect to analog sensors, potentiometers, or other analog devices.
  • 4. A3: Analog input pin.
  • Function: Analog input
  • Connection: Connect to analog sensors, potentiometers, or other analog devices.
  • 5. A4: Analog input pin and SDA (I2C) pin.
  • Function: Analog input, I2C communication (SDA)
  • Connection: Connect to analog sensors, potentiometers, or other analog devices. Also used for I2C communication as the SDA pin.
  • 6. A5: Analog input pin and SCL (I2C) pin.
  • Function: Analog input, I2C communication (SCL)
  • Connection: Connect to analog sensors, potentiometers, or other analog devices. Also used for I2C communication as the SCL pin.
  • Power Pins
  • 1. VIN: Input voltage pin.
  • Function: Power input
  • Connection: Connect to a power source (3.3V or 5V) to power the board.
  • 2. 3V3: 3.3V output pin.
  • Function: Power output
  • Connection: Connect to devices that require a 3.3V power supply.
  • 3. GND: Ground pin.
  • Function: Ground
  • Connection: Connect to the ground pin of a power source or other devices.
  • Other Pins
  • 1. RST: Reset pin.
  • Function: Reset
  • Connection: Connect to a reset button or other reset circuitry to reset the board.
  • 2. NC: Not connected pins (x2).
  • Function: Not connected
  • Connection: These pins are not connected to any internal circuitry and can be used as additional digital input/output pins.
  • Important Notes
  • The Arduino Tiny Machine Learning Kit operates at 3.3V, and all input/output pins are 3.3V tolerant.
  • The board is powered through the VIN pin, which can be connected to a 3.3V or 5V power source.
  • The onboard LED indicator is connected to digital pin 13.
  • The I2C pins (A4 and A5) are used for communication with I2C devices and can be used as analog input pins when I2C communication is not in use.
  • By understanding the functionality and connection points of each pin, you can effectively design and build projects using the Arduino Tiny Machine Learning Kit.

Code Examples

Arduino Tiny Machine Learning Kit Documentation
Overview
The Arduino Tiny Machine Learning Kit is a compact, low-power, and versatile board designed for machine learning applications. Powered by the TensorFlow Lite Micro framework, this kit enables developers to deploy machine learning models on resource-constrained devices. The kit includes the Arduino Nano 33 BLE Sense board, which features a range of sensors, Wi-Fi, and Bluetooth connectivity.
Hardware Components
Arduino Nano 33 BLE Sense board
 Micro-USB cable
 JST cables for sensors
 Li-Po battery (optional)
Software Components
Arduino IDE (version 1.8 or later)
 TensorFlow Lite Micro framework
 Arduino Libraries for ML (e.g., `TensorFlowLite_Arduino`, `Arduino_TensorFlowLite`)
Example 1: Simple Image Classification using TensorFlow Lite Micro
This example demonstrates how to use the Arduino Tiny Machine Learning Kit for image classification using the TensorFlow Lite Micro framework.
Hardware Requirements
Arduino Nano 33 BLE Sense board
 Camera module (e.g., OV7670)
Software Requirements
Arduino IDE (version 1.8 or later)
 TensorFlow Lite Micro framework
 `TensorFlowLite_Arduino` library
Code Example
```c
#include <TensorFlowLite_Arduino.h>
// Define the camera module pins
#define CAM_VSYNC 2
#define CAM_HREF 3
#define CAM_PIXEL_CLK 4
#define CAM_SIOD 5
#define CAM_SIOC 6
// Define the model and its labels
const char model = "mobilenet_quant_v1_224.tflite";
const char labels[] = {"cat", "dog", "bird"};
void setup() {
  // Initialize the camera module
  camera.begin(CAM_VSYNC, CAM_HREF, CAM_PIXEL_CLK, CAM_SIOD, CAM_SIOC);
// Load the machine learning model
  tflite::MicroInterpreter interpreter(model);
  interpreter.allocateTensors();
}
void loop() {
  // Capture an image using the camera module
  camera.capture();
// Pre-process the image data
  uint8_t imageData[224  224  3];
  camera.getImage(imageData);
// Run the machine learning model
  TfLiteStatus status = interpreter.invoke();
  if (status != kTfLiteOk) {
    Serial.println("Error running the model");
    return;
  }
// Get the output tensor
  TfLiteTensor outputTensor = interpreter.outputTensor(0);
// Get the top prediction
  int topPrediction = argmax(outputTensor->data.f, 10);
// Print the top prediction
  Serial.print("Prediction: ");
  Serial.println(labels[topPrediction]);
  delay(1000);
}
```
Example 2: Gesture Recognition using Accelerometer Data
This example demonstrates how to use the Arduino Tiny Machine Learning Kit for gesture recognition using the onboard accelerometer data.
Hardware Requirements
Arduino Nano 33 BLE Sense board
Software Requirements
Arduino IDE (version 1.8 or later)
 TensorFlow Lite Micro framework
 `Arduino_TensorFlowLite` library
Code Example
```c
#include <Arduino_TensorFlowLite.h>
// Define the accelerometer pins
#define ACCEL_X A0
#define ACCEL_Y A1
#define ACCEL_Z A2
// Define the machine learning model
const char model = "gesture_recognition.tflite";
const char labels[] = {"up", "down", "left", "right", "none"};
void setup() {
  // Initialize the accelerometer
  pinMode(ACCEL_X, INPUT);
  pinMode(ACCEL_Y, INPUT);
  pinMode(ACCEL_Z, INPUT);
// Load the machine learning model
  tflite::MicroInterpreter interpreter(model);
  interpreter.allocateTensors();
}
void loop() {
  // Read the accelerometer data
  int x = analogRead(ACCEL_X);
  int y = analogRead(ACCEL_Y);
  int z = analogRead(ACCEL_Z);
// Pre-process the accelerometer data
  float accelData[3] = {x, y, z};
// Run the machine learning model
  TfLiteStatus status = interpreter.invoke();
  if (status != kTfLiteOk) {
    Serial.println("Error running the model");
    return;
  }
// Get the output tensor
  TfLiteTensor outputTensor = interpreter.outputTensor(0);
// Get the top prediction
  int topPrediction = argmax(outputTensor->data.f, 5);
// Print the top prediction
  Serial.print("Gesture: ");
  Serial.println(labels[topPrediction]);
  delay(100);
}
```
Additional Resources
[TensorFlow Lite Micro framework documentation](https://www.tensorflow.org/lite/microcontrollers)
 [Arduino Tiny Machine Learning Kit tutorials](https://docs.arduino.cc/tutorials/tiny-ml-kit)
 [Arduino ML libraries](https://docs.arduino.cc/libraries/)
Note: The code examples provided are simplified and might require additional modifications to work with your specific setup. Make sure to follow the official documentation and tutorials for more detailed instructions.