Introduction: Voice Control 9W 220-240v BULB Using ARDUINO+ANDROID
Hi guys in this instructable I'll show you how to control (9W 220-240V) BULB using arduino and android phone.
Step 1: Components Required
1) Arduino Uno
2) Bluetooth Module HC-05
3) Relay
4) Bulb 9W 220V (obviously :D)
5) Breadboard
6) Bulb Holder
7) some jumper wires
8) Android Smartphone
Step 2: Connect Bluetooth and Relay on ARDUINO
In Bluetooth Module HC-05 have 6 pins but we're using only 4 pins
RX (Receive Clock )
TX (Transmit Clock )
5V
GND
And Relay have mainly 3 pins (if you're using 1ch relay)
VCC
GND
IN1
-connect the bluetooth rx pin to the arduino tx pin
-connect the bluetooth tx pin to the arduino rx pin
-connect the relay and bluetooth 5v and vcc pin to the arduino 5v pin using breadboard
-connect GND pin same as a 5v.
note : 1 connection is remain i'll show you in next step.
RX (Receive Clock )
TX (Transmit Clock )
5V
GND
And Relay have mainly 3 pins (if you're using 1ch relay)
VCC
GND
IN1
-connect the bluetooth rx pin to the arduino tx pin
-connect the bluetooth tx pin to the arduino rx pin
-connect the relay and bluetooth 5v and vcc pin to the arduino 5v pin using breadboard
-connect GND pin same as a 5v.
note : 1 connection is remain i'll show you in next step.
Step 3: RELAY Connection
So now in relay have 3 connection(shown in image)
NO - Normal Open
C - Common
NC - Normal Close
-Normal Open(NO) connect to the bulb Positive.
-Common connect to the plug positive.
-bulb another wire connect to the plug's second wire.
so here all connection is ready !
NO - Normal Open
C - Common
NC - Normal Close
-Normal Open(NO) connect to the bulb Positive.
-Common connect to the plug positive.
-bulb another wire connect to the plug's second wire.
so here all connection is ready !
Step 4: Arduino Code
// NOTE : in this code i'm using CH3 but its depend on which channel you're using so if you use channel 2 then you type the( CH2 7 ) and 7 is the number of pin which we connect through the channel 2 //
String voice;
#define CH1 7
void setup() {
Serial.begin(9600);
pinMode(CH1, OUTPUT);
digitalWrite(CH1,HIGH);
}
void loop()
while (Serial.available()) {
delay(10);
char c = Serial.read();
if (c == '#') {break;}
voice += c;
}
if (voice.length() > 0) {
Serial.println(voice);
if(voice == "*switch on") {digitalWrite(CH1, LOW);}
else if(voice == "*switch off") {digitalWrite(CH1, HIGH);}
voice=" ";}}
String voice;
#define CH1 7
void setup() {
Serial.begin(9600);
pinMode(CH1, OUTPUT);
digitalWrite(CH1,HIGH);
}
void loop()
while (Serial.available()) {
delay(10);
char c = Serial.read();
if (c == '#') {break;}
voice += c;
}
if (voice.length() > 0) {
Serial.println(voice);
if(voice == "*switch on") {digitalWrite(CH1, LOW);}
else if(voice == "*switch off") {digitalWrite(CH1, HIGH);}
voice=" ";}}
Attachments
Step 5: Download the Android App
https://play.google.com/store/apps/details?id=robo...
after download the app
go to the connect robot
and say switch on and switch off !
THANK U :)
if any query then ask me... comment section below
![Lamps and Lighting Contest 2016](https://content.instructables.com/F7T/STOV/IRXT1INC/F7TSTOVIRXT1INC.jpg?auto=webp&frame=1&width=320)
Participated in the
Lamps and Lighting Contest 2016