Intro: HAVOC - Home Automation With Voice Control
Before I begin the project description I would like to thank Audrey and Nicole to provide me the Intel Edison board with a bunch of sensors.
In this Instructable I have used Intel Edison to implement home automation with complete voice control. Basically what I mean by this is that we have a normal voice chat kind-off commands like how we speak to one another. This is done using an android apk which uses a STT engine (Speech to Text engine) to recognize what the commands are.
The project consists of 4 sub-systems:
- Automation of Lights/Fan : This sub-system mainly deals with automatic switching ON/OFF of lights and fans depending on sensor values. If the light sensor reads a value lesser than a threshold, it automatically switches on the lights. Similarly with fans
Now if the user wants to manually switch ON/OFF i.e., to override the system automation, he can just speak to the device through the android app to switch ON/OFF. All he has to say is "Switch on the lights/fans". The phase is not only limited to that sentence. He just needs to makes sure the keyword "Switch ON/OFF" and the device is mentioned.
- Security system : In security I have implemented a live video streaming of a camera which follows the person. The camera is mounted on a servo motor (for angular rotations). This system also has 2 PIR (Proximity infrared) sensors attached to it. Basically PIR is a motion sensor. It detects the motion direction (One PIR for left, other for right) and then send that data to Edison to move the camera in that direction. Also instead of storing that data onto a local system I am hosting that data onto a static IP which can be seen on any device (PC/phones/ipads) connected onto the same network as the Edison.
I have also added a timer based switching ON of outside porch lights in the evenings even in the absence of the user.
- Social content; This sub-system mainly deals with the sharing of information. Basically what i mean to say is that you can get updated on any news/sports/stocks or any other genre of that matter by just speaking to the device; like for example "Update me on football" . Edison now goes to the internet and fetches the live news for you. And instead of displaying, it speaks the news to you. This is done using a TTS engine (Text to Speech engine.) The idea is that if the user is tired working late at office, he/she can just sit on the couch and give commands to the device.
- Alert: I have added a timer based alarm system which wakes you in the mornings. The system is designed in such a way that it plays the morning prayers when you wake up.
And please do vote if you liked it.
Step 1: Automation of Lights/Fan
The automation involves the switching ON/OFF of lights/fans automatically.
The sensors connected are LDR (Light sensor), temperature sensor. The edison now read these values and switches ON/OFF depending on the values and threshold.
If the LDR value is lesser than threshold ==>> Switch ON Lights.
if the temperature value is greater than threshold ==>> Switch ON fans.
Now if the user specifically wants to switch ON/OFF the system, all he has to do is speak to the device through the android app - "Android meets robotics." Its available on Google. This will force the system to system to switch ON/OFF depending on what the user wants.
- LDR sensor
- Temperature Sensor
- Bluetooth module - HC -05
Step 2: Security System
The security system consists of a camera mounted on a servo with 2 PIR sensors attached to it.
The PIR sensors are gonna detect the motion and send that data to Edison. Edison will now force the servo to move the camera in that direction. Thus this gives us a presence detector camera. This also improves the field of view rather than having a static stationary camera.
Also the camera data is then streamed live into a static IP address rather than storing it on to a local machine. This gives us the flexibility to access the streaming video with multiple devices.
This is done using websocket programming.
Refer - edi-cam to see how it works.
The servo and the camera are run on two different scripts.
Apart from this I have also added a clock based system which turns on the outside lights in the evenings. This is done by changing the time of the the Edison board and storing it in a variable and checking continuously using a different script running though SSH.
All the codes are run in the Linux part.
- PIR - 2 numbers
Step 3: News Update
This is my personal best sub-system of them all.
This sub-system deals with updating the user on news/sports/stocks or any other genre for that matter. All the user is supposed to do is, speak to the device and let it know you wanna be updated. Like for example "Update me on football"or say "Update me on news" anything what the user wishes to know. (Anything pre-defined in the codes that is.)
Edison now gets the data from the internet (URL's of that particular genre to be previously feed in the codes) and downloads the RSS feed. The system then uses TTS engine called "Espeak" to convert the downloaded RSS into a voice output. The output is heard through a speaker connected to Edison using a USB sound card.
To set-up the sound card, you can refer to my other Instructable post click here
One major advantage of this home automation system is that the entire process is audio;everything from input to output is in audio format.
- USB Sound card
Step 4: Alerts/Play Music
Basically i have designed this system to be an alarm to wake up early morning. It automatically plays early morning prayers at the time of your wake up.
I have designed this by a little change of system time (Setting it to sync with my location) and then storing it in a variable and checking continuously.
You can click here to refer to my previous instructables to learn how to play music with your Edison.
Step 5: General Block Diagrams
The general block diagram is as shown.
If you have any queries, please feel free to comment. And don't forget to vote if you liked it.