In this Project, I show you how to control four different color LEDs with voice Command. I am using Arduino UNO R3, Bluetooth module HC-05 and four different color LEDs. Which color I speak, that LED automatically turn ON.
Project Concept
Voice recognition in stand-alone microcontrollers like the Arduino Uno is typically difficult because of memory and processing constraints. This project bypasses those limits by using a Smartphone as the "Brain" for speech recognition. The phone converts spoken words into text strings and sends them to the Arduino over a Bluetooth connection.
System Components
- Arduino Uno: The local controller that manages the LED states.
- HC-05 Bluetooth Module: Facilitates the serial communication between the smartphone and the Arduino.
- Arduino Voice Controller App: A dedicated Android/iOS app that utilizes the phone's native speech-to-text engine (like Google Assistant or Siri).
- LEDs: Four distinct colors (e.g., Red, Green, Blue, Yellow) each connected to a digital pin.
Communication Flow
- Speech-to-Text: The user presses the microphone button on the smartphone app and says a color (e.g., "Red").
- Bluetooth Transmission: The app sends the string
"red"via Bluetooth. - Arduino Processing: The Arduino receives the character array via the SoftwareSerial library.
- Logic Check: A simple
iforswitchstatement checks the string. If the string is"red", the Arduino callsdigitalWrite(RED_LED_PIN, HIGH).
Setup Instructions
Connect the HC-05 module to the Arduino:
- RX (Bluetooth) -> TX (Arduino with Level Shifter or Voltage Divider)
- TX (Bluetooth) -> RX (Arduino)
- VCC/GND -> 5V/GND
Note: For the HC-05 RX pin, it is safer to use a 1k/2k ohm resistor voltage divider to bring the Arduino's 5V TX signal down to the 3.3V logic level required by the module.
Expansion Ideas
This same logic can be used to control high-voltage appliances by replacing the LEDs with a Relay Module, allowing you to turn on fans, lights, or other home devices simply by speaking!