Iot Project
Iot Project
By
BATCH-2
2025–2026
Abstract
This project demonstrates a voice-controlled LED system using a Raspberry Pi and Bluetooth
communication. Voice commands given through an Android smartphone are converted to text
using the AMR Voice app and sent to the Raspberry Pi via the HC-06 Bluetooth module. The
Raspberry Pi processes these commands and controls three LEDs accordingly.
The system provides a hands-free way to interact with devices, making it user-friendly and
accessible. It can be easily extended to control AC appliances using relays, forming the basis for
a simple and affordable voice-controlled home automation system.
The LEDs are connected to GPIO pins on the Raspberry Pi and respond to specific commands
such as "red light on" or "all lights off." The HC-06 Bluetooth module receives data wirelessly
from the phone and communicates with the Pi over serial communication. This project highlights
the potential of voice recognition technology in IoT applications. It is low-cost, easy to build,
and scalable for more complex tasks. It is particularly useful for elderly or disabled individuals
who may benefit from voice-operated controls. The setup involves minimal hardware and
leverages open-source tools, making it ideal for beginners.
Voice Controlled Lights using Raspberry Pi
Aim: To design and implement a voice-controlled system using a Raspberry Pi and Bluetooth
module to control multiple LED lights, thereby showcasing the potential for voice-based home
automation.
Components Required:
Raspberry Pi 3
Bluetooth Module HC-06
Bread board
100 ohm Resistors (3)
LED’s (blue, red, green)
Connecting wire
Power Supply
Ethernet cable
Android Phone
Theory: Bluetooth communication enables short-range wireless data exchange. The HC-06
Bluetooth module is a slave device that receives commands from a master device (smartphone)..
The Raspberry Pi processes the command string and triggers the appropriate GPIO pins to
control the LEDs. AMR Voice app, along with Google Voice Services, converts spoken
commands to text and transmits them over Bluetooth.
Working principle:
1. Three LEDs (Red, Blue, Green) are connected to Raspberry Pi GPIO pins.
2. The user gives voice commands using the AMR Voice App on an Android phone.
3. The app uses Google Voice to convert speech into text format.
4. This text is sent via Bluetooth to the HC-06 module.
5. The HC-06 sends the command to the Raspberry Pi through UART (serial
communication).
6. A Python script on the Raspberry Pi reads the command and checks it against predefined
commands.
7. LED Control Logic:
8.This setup allows wireless, voice-based control of LEDs and can be extended for smart
home automation.
Circuit Explanation :
Circuit of this project is very simple, which contains Raspberry Pi 3 Board, LEDs and
Bluetooth Module (HC-06). Raspberry Pi reads the Bluetooth Module and control the LEDs
accordingly. LEDs Blue, Red and Green are connected at GPIO 17, 27 and 22. Rx and Tx of
Bluetooth Module are directly connected to Tx and Rx pins of Raspberry Pi. Remaining
connections are shown in circuit diagram.
Procedure:
1. Hardware Setup:
2. Software Setup:
bash
CopyEdit
sudo apt-get install python-dev
sudo apt-get install python-rpi.gpio
3. Bluetooth Configuration:
Use the provided Python script to control GPIO based on received Bluetooth
commands.
Install AMR Voice and Google Voice apps from Play Store.
Connect to HC-06 via AMR Voice and test voice commands.
Raspberry Pi Configuration and Python Program:
We are using Python language here for the Program. Before coding,
user needs to configure Raspberry Pi.
Python program:
import serial
led1=17
led2=27
led3=22
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(led1, GPIO.OUT)
GPIO.setup(led2, GPIO.OUT)
GPIO.setup(led3, GPIO.OUT)
GPIO.output(led1 , 0)
GPIO.output(led2 , 0)
GPIO.output(led3 , 0)
data1=""
data=''
while 1:
data = Serial.read(1)
data1+=data
print data1
GPIO.output(led1 , 1)
GPIO.output(led1 , 0)
GPIO.output(led2 , 1)
GPIO.output(led2 , 0)
GPIO.output(led3 , 1)
GPIO.output(led3 , 0)
GPIO.output(led1 , 1)
GPIO.output(led2 , 1)
GPIO.output(led3 , 1)
GPIO.output(led1 , 0)
GPIO.output(led2 , 0)
GPIO.output(led3 , 0)
if data1.find("blink")>0:
GPIO.output(led1 , 1)
GPIO.output(led2 , 1)
GPIO.output(led3 , 1)
time.sleep(0.1)
GPIO.output(led1 , 0)
GPIO.output(led2 , 0)
GPIO.output(led3 , 0)
time.sleep(0.1)
Serial.flush();
data="";
data1="";
Observations:(Output photos)
Analysis:
The project reliably converts voice input to control signals via Bluetooth.
The use of AMR Voice and Google Voice Services provides a simple yet effective way
to integrate voice recognition.
There’s a minimal delay (~1-2 seconds) between voice command and execution, mostly
due to processing and Bluetooth transmission.
Can be scaled for home appliances by replacing LEDs with relay modules.
Precautions:
1. Ensure the correct voltage level for the Bluetooth module (HC-06 operates on 5V).
2. Cross-check GPIO pin connections before powering the Raspberry Pi.
3. Use appropriate resistors with LEDs to prevent damage.
4. Test voice commands in a quiet environment to improve recognition accuracy.
5. Avoid physical interference or obstructions between the phone and the Bluetooth module.