Introduction: Home Automation Using Cortana
Hello! This is the instructable of the project that I came up with on new ideas on home automation.Here, I am using Cortana s the user interface b/w the user and the Arduino enabling many opportunities like voice recognition and low budget home automation And sorry if you are not unable to understand any aspect of this project because I am totally new to this and this is my first instructable. Jumping onto the steps.
I have also another project based on Cortana at my hackaday.io page you can view this at the link given below.
My blog spot
Step 1: Setting Up Hardware - Arduino and Relay Circuit
In this, the Arduino is controlling some relay switches which in turn controls the appliances and the Arduino is controlled by certain programs that we will discuss later on.
For this, you will need some prebuilt boards including the Arduino(i am using an Arduino Uno). You will also need relay breakout boards that are compatible with Arduino(link to some of those is given below)
The one I am using is a 4 channel 12 relay module. The connection diagram is given Above in the pictures
Step 2: Software Part 1: Arduino
You can download the Arduino code attached to this.
You will need the Arduino IDE to compile the code. The link is given below.
Now after uploading the sketch to the Arduino, connect the Arduino to the PC via the data cable(try to use the USB port that is less used and ought to be only for the Arduino.)Now find the com port the Arduino is connected into by going to the device manager and note it down.
Step 3: Software Part 2: Windows
Now for the computer program
The code is in c# and you will need an appropriate compiler for that(I am using visual studio 2010)
Simply paste the code and make the appropriate changes as indicated and then debug it. In the code change, the com port number to the one your Arduino is connected into and also change the character that needs to be sent accordingly.
For example, the light to connected to relay 1 and hence to turn it on we have to send the character 'F' and also change the name of the program accordingly like "Lights ON". Here I will need 9 programs 2 (on/off) each relay and one to turn all off.
Step 4: Setting Up Cortana
Now after creating all the programs we want to create the shortcuts of these program in the below directory of your windows operating system (windows 10 of course ...Cortana sorry but here the screenshots are from a windows 7 PC but the directory will be the same for windows 10 also, instead of windows 7 click windows 10 ).
- Go to local disk c and click organize and from the menu opened select folder options(you can also open this from control panel also).
- Then in the view tab, mark view hidden files
- Now follow the directory shown in the image and create your shortcut for your .exe program here.
- That's it you are done
Step 5: Testing
Open Cortana and ask her to open the name of the program (eg: open Lights on) and she will start the program and the character will be sent to the Arduino via the com port we already set and the Arduino will control the relays according to the command received.
Step 6: Video
And for the last part, there is a video demonstration of this project(sorry for the poor video quality)
We have a be nice policy.
Please be positive and constructive.