Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Nano-Based Sign Language Translator with Flex Sensors and MPU-6050

View and Edit Project In Cirkit DesignerImage of Arduino Nano-Based Sign Language Translator with Flex Sensors and MPU-6050

Circuit Documentation

Summary of the Circuit

This circuit is designed to function as a Sign Language Translator. It utilizes an Arduino Nano microcontroller to read values from five flex sensors and an MPU-6050 gyroscope/accelerometer. The data from these sensors is processed by the Arduino Nano and outputted to the serial monitor for translation. Additionally, the circuit includes a DFPlayer MINI module for audio playback, which is connected to a loudspeaker.

Component List

Arduino Nano

Resistor (10k Ohms)

2.2 inch Basic Flex Resistor

MPU-6050

DFPlayer MINI

Loudspeaker

I2C module

Wiring Details

Arduino Nano

Resistor (10k Ohms)

2.2 inch Basic Flex Resistor

MPU-6050

DFPlayer MINI

Loudspeaker

I2C module

Documented Code

/*
 * Sign Language Translator
 * This Arduino sketch reads values from 5 flex sensors and an MPU-6050
 * gyroscope/accelerometer. It then prints these values to the serial monitor.
 */

#include <Wire.h>
#include <MPU6050.h>

// Flex sensor pins
const int flexPins[5] = {A0, A1, A2, A3, A6};

// MPU-6050 instance
MPU6050 mpu;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  mpu.initialize();
  if (!mpu.testConnection()) {
    Serial.println("MPU6050 connection failed");
    while (1);
  }
  Serial.println("MPU6050 connection successful");
}

void loop() {
  // Read flex sensor values
  int flexValues[5];
  for (int i = 0; i < 5; i++) {
    flexValues[i] = analogRead(flexPins[i]);
  }

  // Read MPU-6050 values
  int16_t ax, ay, az, gx, gy, gz;
  mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

  // Print flex sensor values
  Serial.print("Flex: ");
  for (int i = 0; i < 5; i++) {
    Serial.print(flexValues[i]);
    if (i < 4) Serial.print(", ");
  }
  Serial.print("\t");

  // Print MPU-6050 values
  Serial.print("Accel: ");
  Serial.print(ax); Serial.print(", ");
  Serial.print(ay); Serial.print(", ");
  Serial.print(az); Serial.print("\t");
  Serial.print("Gyro: ");
  Serial.print(gx); Serial.print(", ");
  Serial.print(gy); Serial.print(", ");
  Serial.print(gz);
  Serial.println();

  delay(500); // Delay for readability
}

This code is responsible for initializing the MPU-6050 sensor and reading the values from the flex sensors and the MPU-6050. It then prints these values to the serial monitor for further processing or display.