Project Work

 Project Work

Voice control Robot:- 
  

 Components Needed:

  • Arduino Uno (or Nano)

  • L298N Motor Driver

  • 2 DC Motors + Wheels

  • Robot chassis

  • HC-05 Bluetooth module

  • Jumper wires

  • Battery (7–12V)

  • Android phone


🧠 How It Works

  1. You speak into your phone.

  2. A voice control app converts speech → text.

  3. The app sends command via Bluetooth.

  4. Arduino receives command.

  5. Motors move accordingly.


🔌 Wiring Overview

1️⃣ Bluetooth (HC-05)

  • VCC → 5V

  • GND → GND

  • TX → Arduino RX

  • RX → Arduino TX (use voltage divider)

2️⃣ Motor Driver (L298N)

  • IN1 → Arduino pin 8

  • IN2 → Arduino pin 9

  • IN3 → Arduino pin 10

  • IN4 → Arduino pin 11

  • Motors connected to OUT1, OUT2

  • Battery to 12V input


Coding :-  

char command;

void setup() {
  Serial.begin(9600);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);
  pinMode(10, OUTPUT);
  pinMode(11, OUTPUT);
}
void loop() {
  if (Serial.available()) {
    command = Serial.read();
    if (command == 'F') {      // Forward
      digitalWrite(8, HIGH);
      digitalWrite(9, LOW);
      digitalWrite(10, HIGH);
      digitalWrite(11, LOW);
    }
    else if (command == 'B') { // Backward
      digitalWrite(8, LOW);
      digitalWrite(9, HIGH);
      digitalWrite(10, LOW);
      digitalWrite(11, HIGH);
    }
    else if (command == 'L') { // Left
      digitalWrite(8, LOW);
      digitalWrite(9, HIGH);
      digitalWrite(10, HIGH);
      digitalWrite(11, LOW);
    }
    else if (command == 'R') { // Right
      digitalWrite(8, HIGH);
      digitalWrite(9, LOW);
      digitalWrite(10, LOW);
      digitalWrite(11, HIGH);
    }
    else if (command == 'S') { // Stop
      digitalWrite(8, LOW);
      digitalWrite(9, LOW);
      digitalWrite(10, LOW);
      digitalWrite(11, LOW);
    }
  }
}

Simple Talking Robot

Components:

  • Arduino (Uno/Nano)

  • DFPlayer Mini (MP3 module)

  • Micro SD card

  • Speaker (3W)

  • Push button (optional)

  • Battery

 How It Works

  • You store MP3 voice files on SD card.

  • Arduino tells DFPlayer which file to play.

  • Robot speaks through speaker.

Example Audio Files

On SD card:

  • 0001.mp3 → “Hello, I am your robot.”

  • 0002.mp3 → “How are you?”

  • 0003.mp3 → “Nice to meet you.”


#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

SoftwareSerial mySerial(10, 11);
DFRobotDFPlayerMini myDFPlayer;

void setup() {
  mySerial.begin(9600);
  Serial.begin(9600);

  if (!myDFPlayer.begin(mySerial)) {
    while(true);
  }

  myDFPlayer.volume(20);  // Set volume (0-30)
  myDFPlayer.play(1);     // Play 0001.mp3
}

void loop() {
}





Comments

Popular posts from this blog

Class 6

Class 8

Class 7