Alexa Voice Control DIY

4.2K4521

Intro: Alexa Voice Control DIY

Hello, this is my first instructable.

Here I'm going to show how to make voice control switches for Amazon Alexa which can even work with Google Assistant. Please vote for me!

STEP 1: The Parts

1: Adafruit Huzzah or an Arduino with a wifi chip

2: USA sockets

3: Wires

4: Relay Board

5: A box to store the circuit

6: Alexa device

STEP 2: Connecting the Huzzah to Relay Board

1: Connect the GND and VCC of relay board to Huzzah's GND and 3V pin respectively

2: Connect the Input pins of your relay board between pin numbers 4-14 on Huzzah.

Huzzah has a weird pin layout so the pins to be used are 4, 5, 2, 16, 0, 15, 13, 12 and 14.

If you have one relay switch then use one of the above pins.

If two then use two pins.

I have an eight relay board so I'm using eight pins.

STEP 3: Connecting Power Sockets to Relay Board

1: Each relay has 3 pins to be connected to the power

2: Connect the center pin of the relay to the live wire of an AC power source

3: Connect the neutral pin of an AC power source to the neutral pin of a power socket

4: Connect the live pin of the socket to the NO (normally open) relay pin

5: Repeat the above steps for each socket and relay

It can handle up to a total of 1500 watt.

STEP 4: Adafruit IO and Code

Adafruit IO is a great platform for internet connected devices.

You need to create an Adafruit IO Account at https://io.adafruit.com

The code can be uploaded to your Huzzah board.

Before uploading you need to make the following modification:

1: Change the "UR IO ID" to your actual Adafruit IO id

2: Change the "UR IO Key" to your actual Adafruit IO Key

You can find you IO id and Key by logging into your Adafruit IO dashboard and clicking on "View AIO Key" on the left.

3: Change "UR Wifi SSID" to your actual wifi SSID

4: Change "UR Wifi password" to your actual wifi password

Heres a quick guide on creating a dashboard:

https://learn.adafruit.com/adafruit-io-basics-dash...

STEP 5: IFTTT

Create an account on https://ifttt.com

Go to My Applets -> New Applet:

1: Select +this and select Alexa from the list

2: Select Say a specific phrase

Type in the phrase as "bed lamp on"

3: Select +that and select Adafruit

Click on the drop-down of field down and select "CBon"

In data to save enter "1"

If you don't see CBon try uploading your code on Huzzah and keeping it powered on for few mins and refresh the webpage

- Repeat the above steps for all the relays and enter different command names for all and keep data to enter

in series (i.e: 1,2,3,...)

- Repeat the above steps again with dropdown field as "BCoff"

- Enter the data to save numbers as 8,9,10,... .

STEP 6: Looks and Final Operation

Add the entire circuit in a good looking case.

I used an Amazon box and spray painted it silver for good looks

Connect the devices to power and that's it.

Ask Alexa to turn on and off your devices.

STEP 7: Demo


You can add more features like automatic lights on when alarm/timer goes off etc.

Be creative and add as many features as you wish.

A similar thing can be achieved using google home mini too by using different IFTTT functions.

Thank you for watching

-Sahil Parikh

NOTE: This is just a simple project to kick-start your voice control project. For a more complex one to increase safety, I'll recommend you to connect the ground wires and even add a fuse with a steadier case.

15 Comments

Has anyone has any issues with the code? Im fairly new to coding and have been having trouble with errors regarding the adafruitIO_wifi.h file, saying it does not name a type?

hello, can we set some different rules for each GPIOS, for example when say ALEXA "OPEN THE GARAGE DOOR" the GPIO 14 will set to high for 3sec then go to LOW level, and if say ALEXA "CLOSE THE GARAGE DOOR" the GPIO 14 will set to high for 3sec then go LOW.

hello, can we set some different rules for each GPIOS, for example when say ALEXA "OPEN THE GARAGE DOOR" the GPIO 14 will set to high for 3sec then go to LOW level, and if say ALEXA "CLOSE THE GARAGE DOOR" the GPIO 14 will set to high for 3sec then go LOW.

Will This Work With Google Home Mini??

This is unsafe. Your wires are undersized, and you don't have any ground wires. The controls are neat but the power distribution needs work.
Hey!
This is only for small appliances to get started. Lights And other appliances under 1500 watt normally don’t even have ground.
I really like what you did here, but i tend to agree with the other posts. I am not an electrician by any stretch.. but i think that if you use 14/2 cable you can only have 80% of its capacity. You really think you should pull anywhere near 1,500 watts from that? Even if it is just lights, it isnt sturdy enough or offer any protection to be carrying 120 volts at 15 amps.. You are correct on the ground thought.. most lights dont even have a ground. I think for a proof of concept this is good.. and i am going to build somethign similiar, but in a wood box with actual electric boxes. (the clips you used are meant to be fastened to a desk or furniture).
I am impressed with this instructable. I would just suggest a more sturdy structure than cardboard for the housing. I am interested in trying this out.
Interesting overall idea... but... CARDBOARD? Seriously? Also: no fuse??
Hey!
I understand your comments. I just created this to show how to start a basic project.
Normally to be only used with small lights.
I have even mentioned in the steps not to go beyond 1500 watt.
My youtube channel has better projects. youtube.com/sparikh1997
Thanks!
Would this work with a google home?
I have a google home version too. In IFTTT make google assistant applets instead of Alexa and it'll work fine with no code modifications.
i made same thing few month ago but with plastic case and only 4 channel
Great controller design. I am really tempted to make one of these. With 8 outlets you could control most of the appliances in an small apartment.
Yes! Very true. That’s what inspired me to make a 8 socket plug.
Check out my YouTube channel for other ideas. YouTube.com/sparikh1997

Good luck!