Control home lights with your voice (Arduino Home Hacks #1)

It’s now the age were the word “Hack” is a relevant word we see and hear everywhere, and i don’t mean the software cyber hacks,I am talking about DIY hacks πŸ˜€ . We made this Home Automation Hacks series to help you add fun features to your home stuff by doing it yourself πŸ˜‰ .

In the first blog of this series, we decided to pick up one of the most popular hacks “Voice Controlled Switches”, we will control home lights with our voice and it’s really easy specially when we have such a powerful tool like the smartphone. Let’s start with…

1- Components

These are the components we need, so we will test the system first before hacking our real home switch.
1- Arduino Uno
2- 1Sheeld
3- Relay board
4- Switched light bulb
5- Female to Male jumpers
6- USB cable
7- Smartphone
8- Screw driver

2- Connections


1- From the components, we got the switched light bulb to simulate the process of controlling home lights. The switch comes with two wire lines, at first we gonna cut one of these wires and strip the ends to wire them to our relay board.
2- Then connect the relay board to the 1Sheeld&Arduino on Vcc, GND & pin13 for the signal line.

3- Code

Here’s the full working code. The code uses the Voice Recognition shield library provided with the 1Sheeld library to control pin13 (which already connected to the relay signal pin) and whenever I say certain words like “Turn on the lights”, it will trigger the signal to pin13 to open the way for the current to pass through the light bulb turning it on, and of course when I say “Turn off”, it will close the path making the light bulb to turn off.

4- Testing


1- Now plug your arduino to your PC/Laptop and upload the code (make sure first to put your 1Sheeld to uploading mode preventing errors).
2- Open 1Sheeld application and connect to 1Sheeld board.
3- Make sure to open the switch to always make the path opened for the current to reach the bulb, think of it like a two series switch, the system won’t work unless the two are opened and one of them is controlling the current flow which is the relay in our case.
4- Scroll down and choose voice recognition shield, then speak out the words “Turn on the lights/Turn off” to turn on/off the light bulb.

5- Designs


I have designed a 3D case to hold the electronic parts together, so it won’t look messy over the switch, you can check and download the files from Here, and feel free to design your own 3D cases for your extra electronic parts πŸ™‚ .

6- Deployment


1- With same circuitry of testing, we gonna wire things up on a real switch, but before touching or unscrewing anything…! first cut the power off the switch, or preferably the entire section of your home preventing damages.
2- Now unscrew the switch and reach in to one of the wire lines, cut&strip it the same way we did in testing.
3- Connect the two stripped ends to the relay board.
4- Power up the system with a 12V DC adapter or with a 9V battery.
5- Return the power back to the switch, then open the application, connect and open the voice recognition shield and enjoy the hack πŸ˜‰

This was it for the first hack please share your ideas in the comments bellow and stay tuned for more home automation hacks πŸ™‚ .




Related Blogs

Arduino Robotics

Arduino Robotics Series, from a car to a robot arm

Arduino keeps standing out from the crowd of all-around development boards due too its ease of use and budget price. As a result, this has enabled almost anyone to get his own idea into life no matter how crazy or even useless to the whole world it was, except for its maker! Also, it has …

Arduino Robot Arm

How to build an Arduino Robot Arm placed on RC Car

Arduino robots are always funny and definitely more enjoyable when combined with robotic arm! And today, I will walk you through the making of a simple Arduino Robot Arm that’s made of cardboard and how you can attach it over your Arduino Bluetooth RC CarΒ / Robot that you have made so far through this series. …

Arduino Line Following Robot

How to build an Arduino Line Following Robot using Cardboard

Arduino Line Following Robot is one of the easiest and most well-known projects that anyone can make to learn the basics of programming, electronics, and mechanics all in one project. It’s known that this project is common for most of the makers and tech students and today I am going to give it a revisit …

Arduino Obstacle Avoiding Robot

How to build an Arduino Obstacle Avoiding Robot using Cardboard

Back again with another Arduino Bluetooth RC Car tutorial but with an advanced feature that makes your car autonomous by adding ultrasonic sensors to the RC Car you have made before!. Yeah, I know that you may have seen other tutorials using ultrasonic to make the car/robot avoid obstacles ahead, but I am going to …

Arduino Bluetooth RC car

How to make an Arduino Bluetooth RC Car using Cardboard

  Cardboard crafts are one of the most popular and easy to make DIY stuff. Mixing this with the unmatchable enjoyment of RC Cars and the ease of using Arduino, I am going to show you how to make a Cardboard Arduino Bluetooth RC car that you can control via Bluetooth from your smartphone. ο»Ώ …

Arduino Security Camera

Arduino Security Camera System (Arduino Home Hacks #4)

Arduino Security Camera Have you ever wanted to check your home in real time? AfraidΒ that maybe someone has stormed in, don’t remember if you shut the door or not or maybe wanna check if your Hyper-energetic dog has broken any of your dishes AGAIN!! πŸ™‚ Then this is the perfect place for you cause today …