Site icon Circuit Ideas for You

Arduino with Speech Recognition Circuit

This project shows how to control LED with voice using Arduino and we can use speech recognition module with Arduino Nano; also it takes voice command.

It turns LED ON or OFF based on command and also this Arduino with Speech Recognition Circuit is simple project for beginners.

Arduino Code:

int led = D5;
char data;

void setup() {
  pinMode(led, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  if (Serial.available()) {
    data = Serial.read();
    if (data == '1') {
      digitalWrite(led, HIGH);
    }
    if (data == '0') {
      digitalWrite(led, LOW);
    }
  }
}

Coding Explanation:

Circuit Working:

Arduino with Speech Recognition Circuit Diagram

Parts List:

ComponentsQuantity
Resistor 220Ω 1/4 watt1
Arduino Nano1
Voice Recognition Module V31
LED 5mm 20mA1

First, power the circuit using Arduino Nano.

Then connect LED long leg anode to Arduino D5 and connect LED short leg to 220Ω resistor and other end of resistor to GND.

Now speech module listens to voice and it converts voice to digital data, after that Arduino reads this data from RX pin.

Arduino compares data with saved command, If command is “ON” then Arduino gives HIGH at D5 and if command is “OFF” then Arduino gives LOW at D5.

Hence, this turns LED ON or OFF and to stop, power OFF the circuit and first remove 5V then remove GND.

How to Build:

To build a Arduino with Speech Recognition Circuit follow the below mentioned steps:

Conclusion:

Overall, this Arduino with Speech Recognition Circuit is easy for voice control system, it shows how to use speech recognition with Arduino.

Also, we can use this idea for many home automation projects.

Exit mobile version