Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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/)
236 favorites
RajkumarRaval
(/member/RajkumarRaval/)
Raj's Blog
(http://www.theeureka.net)
(/member/RajkumarRaval/)
Follow 32
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.
ADVERTISEMENT
(/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.
(/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.
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)
(/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)
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.
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)
Best regards,
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.
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/)