Sei sulla pagina 1di 7

let's make Explore (/tag/type-id/) Publish (/about/create.

jsp)
Login (/account/login/) | Sign Up (/account/gopro)

Classes (/classes/)
Featured: share what you make
(/tag/type-id/category-craft/channel-leather/) Leather (/tag/type-id/category-craft/channel-leather/)
(/)
(/tag/type-id/category-outside/channel-camping/) Camping (/tag/type-id/category-outside/channel-camping/) (/id/intel/) Intel IoT (/id/intel/)

(/id/Fusion/) Fusion 360 (/id/Fusion/)

About This Instructable

8 21,865 views License:

236 favorites

RajkumarRaval
(/member/RajkumarRaval/)
Raj's Blog
(http://www.theeureka.net)

(/member/RajkumarRaval/)
Follow 32

Bio: I am an electronics engineer,


researcher, hobbyist, DIYer, geek,
programmer, micro-chip designer. From
childhood I have had great affinity towards
electrical and electronic devices and ...
More (/member/RajkumarRaval/)

(/file/FJTXNR5HYVDMX6I/) More by RajkumarRaval:

Yet another voice controlled home automation system!


(/id/Super-Simple-
As shown in the picture, the system can control any electrical appliance, by turning
ON or OFF, that is connected into the electrical socket. The system does this using
bespoke voice commands. The system uses a micro-controller board (PIC or
DIY-Coffee-Table-Made-From-Waste-
Arduino) and a PC/Laptop with the Microsoft Windows Operating System.
Motivation
Pipe/) (/id/A-Simple-
I always wanted to make a system that worked on my voice commands. I started
working on this project to realize my dream to be able to control gadgets/appliances
with my voice commands. I made this project at home from my electronics
laboratory in my garage and in my holiday time and on weekends. Bluetooth-Upgrade-batteryless-for-Your-

Disclaimer

1) Please note that since this project involves controlling of electrical appliances Me/) (/id/Voice-
running at very high voltage (230V AC), please do so carefully and at your own
risk.
2) All the instructions and code are provided "as is", please follow/use them at your Activated-Power-Sockets-Home-
Automation/)
own risk, I will not be liable for anything what so ever.

3) Also please let me inform you that I do not have any tie-up with the vendors that I
have mentioned below from whom I have acquired, obtained, purchased various
software and hardware components, nor do I receive any commission from them.
These components carry license agreements from the vendors. Please adhere to
their respective license agreements.

Step 1: Project Theme: ! (Re-Inventing the Wheel)


I strongly believe in not "re-inventing the wheel" therefore most of the components
that I have used are off-the-shelf (Hw/Sw both). This enables anybody to create this
project very quickly without requiring in depth technical knowledge about electronic
circuits and without worrying about the complexity of speech recognition.
This project is more of an innovation hobby project. The components that I required
to build a basic speech recognition based home automation system were a speech
recognition software, a PC or an embedded computer with an internal or external
microphone to run the speech recognition software, an electronic circuit to control
the power to an electrical appliance or a gadget.

ADVERTISEMENT

Step 2: System Design

(/file/FHGGMV5HZB3LQN1/)

The way this automation system is designed and works is as shown in the figure.
When a voice command (any voice command that I like) is uttered, it is recognized
by a speech recognition software running on a PC with a microphone. The speech
recognition software then invokes a 'C' program, i.e. Serial port driver, that sends a
command over to the PC serial port to which a micro-controller board is interfaced.
The micro-controller on the board runs a firmware that receives the command from
the serial port and interprets it. The micro-controller then toggles an output pin
which drives a transistor which in turn drives a relay. The relay then controls any
appliance that is connected to it. The figure shows the complete system design.

Voice Activated Power Sockets (Home Automation)


Step 3: Finding the Right Speech Recognition System
by
RajkumarRaval (/member/RajkumarRaval/) in technology (/tag/type-id/category-technology/) Eremote-control (/tag/type-id/category-technology/channel-remote-con
TheDownload
very first thing(/id/Voice-Activated-Power-Sockets-Home-Automation/)
that I required was a speech recognition system that 10 would
Steps allow
h .
me implement my own commands and train my voice on the same commands. In
other words I wanted the functionality where the system would accept Collection
my own I Made it! Favorite Share
customized voice commands and upon recognizing the commands the system
would then run an executable or a program that I have implemented. While I was
looking for such system on the internet, I stumbled upon a PC based speech
recognition system called "TAZTI". I selected this software as the speech
recognition front end is because it satisfied the main two requirements: firstly it
allows the user to create their own custom voice commands and secondly the
system allows user to run their own program or executable upon recognizing these
commands. There are quite a few other useful features in the Tazti speech
recognition software (can be obtained from their website www.tazti.com ). Older
versions of the software were freeware but the current versions are paid however
they do provide a trial version for 15 days.

Step 4: Interfacing with the PC

(/file/FE4EQ4VHYVDMX8P/)

The second thing that I needed was a way to interface an electrical appliance with
the PC using possibly the parallel or the serial or the USB port . So when a voice
command is recognized in the PC a program would be executed which then sent a
control command to the interfacing circuit to activate or de-activate a relay that
controlled the electrical appliance or the gadget. I chose to use an off-the-shelf PIC
micro-controller board that also had a relay and a serial port interface on the same
board. You could use any such micro-controller board for an example Arduino.

While looking for such micro-controller board I came across PIC-MT a


development board for 28 pin PIC microcontroller from Olimex (can be obtained
from their website www.olimex.com ). This board comes with a Serial/RS232
interface which can directly be connected to a PC serial port and an on-board
circuit with a relay. All the details about the board such as schematic/circuit
diagram and user manual etc are available from their website. I used PIC 16F876A
for my prototype and implemented the firmware for the micro-controller in 'C'. I
have also used the PIC boot loader and downloader software from Sparkfun (from
www.sparkfun.com ). The boot loader allowed me to download the firmware in hex
in to the program memory of the micro-controller over the serial port of the PC
without requiring a proper PIC programmer and the special board socket for PIC
programmers. Also this was carried out while keeping the micro-controller in the
chip socket on the board, i.e. ICSP (In Circuit Serial Programming). Although I did
have to program the boot loader for the very first time using the PIC programmer
(PIC Start Plus or similar) into the micro-controller.
Step 5: PC Serial Driver/Client Program
I implemented a simple 'C' program (essentially a Serial/RS232 driver and a client
program) for the PC which would send a control command over to the serial port to
the PIC board whenever this program is executed. The PIC serial server program
would then listen to the commands arriving on the serial port and upon recognizing
a control command it would perform a task(s) such as turning ON the relay or
turning OFF the relay.

The attached 'C' Serial/RS232 driver/client program sends command word 27 to the
PIC board. I programed the voice command to be "TV ON". This code has been
successfully tested on Windows XP. For the voice command "TV OFF" the
command word was 28. This 'C' program is in older style, shown here as an
example, more modern Win32 user mode driver program could easily be written
using Windows API for accessing serial port.

serial_driver.c (/files/orig/F0S/X7MU/HZB3LRFF/F0SX7MUHZB3LRFF.c)

Step 6: PIC Firmware (Serial Port Server Program)

(/file/FCQ3A55HYVDMX74/)

The firmware is essentially a server program running on the board, which listens to
commands arriving via the serial port from the PC and executes the commands i.e.
Toggle a port pin and drive a relay. You could make the controller carry out
anything you like.

I would like to show the part of the PIC-16F876A firmware that receives the
command from the PC over the serial port and toggles a pin which then turns the
relay ON or OFF. The following code has been extracted from a larger working
firmware program so it has not been tested in its isolated form.

firmware.c (/files/orig/FTZ/VWGP/HZB3LREB/FTZVWGPHZB3LREB.c)

Step 7: PIC Board


Since the PIC-MT board has many other features, If you would like to make your
own PIC micro-controller board to carry out just the above functionality all you
require is following, you will need a PIC programmer to program your PIC:

1) PIC16F876A
2) A crystal oscillator: 20MHz

3) 2 Capacitors: 22pF
4) 1 Transistor to drive the relay

5) 1 Relay
6) 5V supply to the PIC controller.

This can be achieved using a dedicated power supply such as wall adapter or
make your own using the 7805 regulator Integrated Circuit.
7) A way to interface with the PC serial port. There are several ways to achieve
this, for more details on how to implement the following please use your favorite
search engine:
(7.1) MAX232 Serial Driver/Receiver Integrated Circuit
(7.2) FTDI- FT232R USB to UART Integrated Circuit

(7.3) A USB dongle that converts USB to Serial and provides you with an emulated
Serial port.

(7.4) A two transistor level converter circuit for directly interfacing with the PC
serial port.
Similarly you may choose to use an Arduino board instead.

Step 8: Even Safer Design (Paranoid Safety Level!)


Additionally in order to make the design even safer (with respect to dealing with the
230V AC supply) I added a second relay. The reason is that if I had used the on-
board relay full 230V AC would be arriving on the relay terminals on the board.
Instead a second relay is driven using the relay that is on the board. As you can
see in the images the on-board relay is orange in color whereas the second relay
is separate to the board and has Red tape over it. So whenever the relay on the
board is driven it provides supply to the external relay turning the second relay ON
or OFF.

Step 9: Going Wireless!


The main idea is to make the interfacing between the computer and the micro-
controller board wireless. It is important to know that there are quite a lot of very
cheap different types of off-the-shelf wireless modules available. Many of these
modules provide simple serial communication protocol the RS232 over a wireless
protocol. For an example, such Bluetooth module can provide serial communication
over Bluetooth protocol. Similarly modules providing Serial communication protocol
over Wifi and RF are also available. Let's take an example of Bluetooth protocol for
making the home automation system wireless.
1) For the micro-controller board: You can get one of the Bluetooth modules with
Serial interface and connect the RX, TX and GND pins to the micro-controller serial
interface pins. You need to take care of the voltage levels while interfacing with the
micro-controller or a micro-controller board, most of these wireless modules can
work with 5 or 3.3V.
2) For a PC you could use a Bluetooth-USB dongle that emulates serial port over
Bluetooth. This means when you connect the dongle to your PC, it will show up as
a Serial/COM port. Then it is quite simple, you can use the same 'C' application
and same speech recognition software as mentioned in this project to send
command to the Bluetooth dongle via the emulated COM port thus making this home
automation system wireless. Very simple.
I leave it upto you to find out various ways to control this home automation system
with countless Bluetooth enabled devices.

Step 10: General List of Components


The following is a general list of components, just to give you an idea to what is
required.

1 Windows PC/Laptop with Internal/External Microphone

1 Serial - RS232 cable

1 Olimex PIC-MT, 28 pin PIC or similar micro-controller development board with


onboard relay & serial port
Alternatively an Arduino board with a shield having 230V Relay.

1 12V DC power supply to power the micro-controller board

1 Tazti or similar speech recognition software

1 AC - 230 V power socket with cable (to interface with the relay)
1 AC - 230 V power plug with cable (to interface with relay)

We have a be nice comment policy.


Please be positive and constructive. w I Made it! Add Images Post Comment

X RajkumarRaval (/member/RajkumarRaval) (author) 2 years ago Reply


8
hi,
Thanks for your comments. Yes it is a good idea.

Best regards,

X RajkumarRaval (/member/RajkumarRaval) (author) 2 years ago Reply


8
Thanks for your comments. Yes, I will put the video showing the actual working of
the system soon.
Best regards,

X seamster (/member/seamster) 2 years ago Reply


|
8 Cool! Very nice project. Do you have a video showing it in action? As in "TV ON"...
"TV OFF" and so on?
That would be great to see it in use!
FEATURED CHANNELS

Woodworking Paper Kitchen Hacks Puzzles Space Ice Cream Homesteading 3D Printing Sewing
(/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type- (/tag/type-
id/category- id/category- id/keyword- id/category- id/keyword- id/keyword- id/category- id/category- id/category-
workshop/channel- craft/channel- kitchen%20hacks/?play/channel- astronomy/? ice%20cream/? home/channel- technology/channel-
craft/channel-
woodworking/) paper/) sort=FAVORITES) puzzles/) sort=FAVORITES)sort=FAVORITES)homesteading/) 3D-Printing/) sewing/)
Newsletter
Join 2 million + to receive instant
DIY inspiration in your inbox.

enter email I'm in!

Mobile
Download our apps!

Android (https://play.google.com/store/apps/details?id=com.adsk.instructables)
iOS (https://itunes.apple.com/app/instructables/id586765571)
Windows (http://apps.microsoft.com/windows/en-us/app/7afc8194-c771-441a-9590-54250d6a8300)
About Us Find Us
Who We Are (/about/) Facebook (http://www.facebook.com/instructables)
Advertise (/advertise/) Youtube (http://www.youtube.com/user/instructablestv)
Contact (/about/contact.jsp) Twitter (http://www.twitter.com/instructables)
Jobs (/community/Positions-available-at-Instructables/)
Pinterest (http://www.pinterest.com/instructables)
Help (/id/how-to-write-a-great-instructable/)
Google+ (https://plus.google.com/+instructables)

Resources
For Teachers (/teachers/)
Artists in Residence (/air)
Gift Premium Account (/account/give?sourcea=footer)
Forums (/community/)
Answers (/tag/type-question/?sort=RECENT)
Sitemap (/sitemap/)

Terms of Service (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |


Privacy Statement (http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |
Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (http://www.instructables.com)
(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2016 Autodesk, Inc.

Potrebbero piacerti anche