Arduino Voice Activated Lights / Outlet V1.0

About: Hi, My Name is written there, and i love tech and art, specifically, web design, robotics, music, drawing, and IOT. My instrument is the piano and i like to make stuff with Arduino

Hello everyone , recently i made my room lights controlled via voice command. Its really simple to build and it can be used for other applications not just room lights, it basically control things to switch on and off. Its more like a voice automated switch for "anything" , and the possibilities are endless . Lets now begin.... :D

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Materials You Will Need

these are some stuff i used in making it :

  • Arduino (i used UNO)
  • Relay module (you may use the one with multiple channels but that would need additional codes)
  • 3x male to male jumper wires
  • 3x male to female jumper wires
  • some standard cables
I dont think i should list the tools because you obviously know what will you use.......

Step 2: The Hardware Setup

  • The first step is to connect the Arduino to the relay terminal, just do it as shown above.
  • Then, connect the Relay Gates (NO,COM,NC) to the application you want.To do this just cut one of the wires from the cable of the appliance then connect the chopped wires through the relay gates.
    • if you want the aplliance to turn on when you activate the relay, connect the cables to the NC and COM gate.
    • if you want the aplliance to turn on when you activate the relay, connect the cables to the NO and COM gate.

Step 3: The Arduino Code and CMD Code

open up your Arduino IDE and copy paste the code below, if you dont have or dont know whats an IDE you can download and learn more information about it from here Download Arduino IDE for Mac/Windows

Arduino code :

//*the code starts here*

int incomingByte = 0; // for incoming serial data

void setup() {

Serial.begin(9600); // opens serial port, sets data rate to 9600 bps

pinMode(12, OUTPUT);


void loop() {

// send data only when you receive data:

if (Serial.available() > 0) {

// read the incoming byte:

incomingByte =;

// say what you got:

Serial.print("I received: ");

Serial.println(incomingByte, DEC);


if (incomingByte == 100)

digitalWrite(12, HIGH);

else if (incomingByte == 97)

digitalWrite(12, LOW);


//*the code ends here*

Here is the cmd code

open notepad and type this codes:

echo a> com3 

save it as "lightson.cmd" in a folder


echo d> com3

save it as lightsoff.cmd

note that the "com3" might be different for you to check whats yours, open device manager>ports>Arduino

Step 4: Setting Up the Voice Recognition

Now you will need a speech to text engine , i suggest you download the same one as what i used

Download speech recognition :

click here to download speech recognition

After you downloaded the app, set it according to the picture i've shown above , instructions below:

  1. click the " + " button on the bottom right of the app
  2. go to the "shell commands" tab
  3. in the command box, type what you will say that will let the speech recognition do a task
  4. in the response box, type what you want to get in response for what you said
  5. in the location box type the location of the cmd file/ click browse to browse the CMD file you made in the previous step (lightson.cmd and lightsoff.cmd)
  6. then close the customize window and say "update command" then you can try the commands you inserted

Step 5: Finishing ....

Now your speech recognition outlet is ready and you can test the commands....

thank you for following up, this is my first instructable so dont mind my mistakes .

visit my website

also kindly vote me for "hack your day" contest and "rasbery pi" contest, its free :D

Hack Your Day Contest

Participated in the
Hack Your Day Contest

Raspberry Pi Contest 2016

Participated in the
Raspberry Pi Contest 2016

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    9 Discussions


    2 years ago

    I just made this project, worked great! I would like to suggest for others who wish to make this that they use an ESP module or other wireless alternative to running cables across a room. I would like to try this out as a standalone program maybe with Raspberry Pi.

    1 reply
    Thadeo Arloshiv2132

    Reply 1 year ago

    Hey great idea, actually i've made another instructables that uses ESP, but not the voice recognition, voice recognition can be added easily later on the smartphone using apps like "Automate", it lets you use google's "ok google" to tell it to send commands to the ESP.

    Thadeo ArloSanly

    Reply 1 year ago

    It listens for human voice from my microphone, and then tells the jarvis app what the string is and see if it matches any commands


    3 years ago

    Every link goes to Adfly accounts which is real deal breaker. Secondly, i would never download from those links sorry to say i would not even vote for the same.

    Jarvis direct link to mediafire

    I do not know the content since its already reported by a user of malware.

    1 reply
    Thadeo Arlosamalert

    Reply 3 years ago

    Thank you @samalert for your comment , i believe it would be really helpful for alot of people ,but clicking the link i inserted would really support me for my next projects, its up to you all though.. :D

    Thadeo Arlo

    3 years ago

    thank you @Doubting_Thomas for your comment, i have fixed some errors in the link that redirects you somewhere else, it works for me now but if you still have some problems you may check you browser/PC for some miscellaneous files that may cause the error :)


    3 years ago

    Though I'd like to say "Thanks"... sadly, I'm compelled to state that this is the 1st Instructable that I have followed-through, wherin the Links provided (both for downloading the speech-recognition and for visiting your website) lead to a MalWare_Download...(?!?)

    I hope somebody can fix that. "Cheers".

    Thadeo Arlo

    3 years ago

    Hi , this is my first Arduino project I hope the instructions are helpful , thank you