In this project 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:
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.
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.
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 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.
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 refer here to learn how to play music with your Edison.
The general block diagram is as shown.If you have any queries, please feel free to comment. And don't forget to respect it if you liked it. Thank you.
#!/usr/bin/env python import mraa #importing mraa import time #importing time import serial #Importing serial uart = mraa.Uart(0) #Initialising Rx and Tx ser =serial.Serial(uart.getDevicePath(), 9600, timeout=1) #Initialising serial x = mraa.Pwm(6) #declaring pin 6 as pwn output for Servo x.period_us(1000) #defining time period x.enable(True) value = 0.0 #Declaring value = 0 while True: z = mraa.Aio(5) #Reading left PIR value y = mraa.Aio(4) #Reading right PIR value if z.read() >=550: #If motion detected at Left side x.write(0.0) #Move servo to left time.sleep(3) #Wait for 3 seconds if y.read() >=550: #If motion detected at Right side x.write(0.99) #Move servo to right time.sleep(3) #Wait for 3 seconds if (z.read()>550)and(y.read()>550): #If motion detected at both left and right x.write(0.33) #move to center time.sleep(3) #Wait for 3 seconds
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!