A System for Smart Home Control of Appliances based on Timer and Speech Interaction
PProceedings of the 4 th International Conference on Electrical Engineering & 2 nd Annual Paper Meet26-28 January, 2006
A System for Smart-Home Control of Appliances Based on Timer and Speech Interaction
S. M. Anamul Haque , S. M. Kamruzzaman and Md. Ashraful Islam Department of Computer Science & Engineering, International Islamic University Chittagong. Manarat International University.E-mail: [email protected]
ABSTRACTThe main objective of this work is to design and construct a microcomputer based system: to control electric appliances such as light, fan, heater, washing machine, motor, TV, etc. The paper discusses two major approaches to control home appliances. The first involves controlling home appliances using timer option. The second approach is to control home appliances using voice command. Moreover, it is also possible to control appliances using Graphical User Interface. The parallel port is used to transfer datafrom computer to the particular device to be controlled. An interface box is designed to connect the highpower loads to the parallel port. This system will play an important role for the elderly and physically disable people to control their home appliances in intuitive and flexible way. We have developed a system,which is able to control eight electric appliances properly in these three modes. 1. INTRODUCTION
Personal computers are increasingly becoming theplatform of choice to design and implement controlalgorithms because it is simple to write, modify andupdate software programs that implement a control algorithm. In this project, we use the personal computer to control the electric appliances. For example turning high power AC loads such as lights,fans, heater etc. ON or OFF. To successfully integrate the digital controller with the analog plant, an interface device is used within the PC that canperform the necessary tasks [1]. In this document, we present the design of the interface box. The interfacebox can be controlled by the computer by connectingto the parallel port and written a program in anypreferable language. Here we write a program inVisual basic programming language. The programwill demonstrate the basic idea of how to controldevices and monitor events. By the program we can have the computer to turn electric devices ON/OFF while away from home by using timing option. Moreover the people who are physically disabled in homeand work place are able to control the homeappliances using voice commands.The paper first describes the general architecture ofthe home-appliances control system. The details hardware of the interface box, which is the mostimportant part for interfacing high power loads with the computer, is described in section 3. In section 4,we describe the software development phase. Finally,we represent the Graphical User Interface (GUI) of the system software and summarize our work in theremaining sections.
2. ARCHITECTURE OF THE PROPOSED SYSTEM
The aim of this project is to be controlled homeappliances by using a personal computer. The overallsystem architecture is shown in fig.1.
Fig. 1 : Architecture of the proposed systemThe system consists of two units: a Control unit andan interface unit. The control unit is based on the use of standard personal computer with Graphical User Interface (GUI) software to control the electrical aque et. al : Proceedings of the 4 th ICEE & 2 nd APM, January 2006 appliances. The Interface unit is for interfacing the high power loads with the control unit.
3. HARDWARE DESIGN OF THE INTERFACE BOX
In this section, we present the design of the interface box that is used to connect high power loads to the computer. Details about the components that comprisethe interface box are also shown here. We have shown how to interface a relay and an AC load
The upper panel of the interface box consists ofsockets, which are easily accessible to the electric appliances for proper and safe operation. A snapshotof the external panel of the interface box is shown in fig.2.
Fig. 2:
External panel of an interface box The Front Panel consists of an AC power supplyCable, Power ON switch, Printer cable, Sockets, andLEDs. AC power supply cable connects the interfacebox to the main AC supply. Power ON switch supplies220V (50Hz) mains’ supply to the interface box whenturned on and stop supplies when turned off. Printer cable connects the interface box to the PC’s parallelport. Electric appliances are generally connected to Socket. The LEDs indicate the status of the Electric appliances (i.e. ON or OFF).
The Internal circuitry of the interface box can be divided into three main categories: Relay driver Circuit, Relays and +6V DC power supply.
The relay [2] driver circuit is necessary to drive the 6V DC relay. The circuit diagram for each unit in therelay driver with relay and socket is shown in fig.3. The relay driver circuit is necessary for each socket. +Vcc+Vcc
LEDD1 (cid:159) (cid:159)
Q2N3904
Fig. 3:
Circuit diagram for the relay driver with relayand socket.
A total of eight relays are used for the eight output sockets. Eight relays are wired in such a way that thenormally closed pin of the relay connects to the PowerResistors and the Normally Open pin connects to asocket.
The DC power supply is needed to provide +6V DC source to the Relay driver circuit.
PC’s parallel port is a 25 pins D-shaped femaleconnector in the back of the computer [3], [4]. This is an inexpensive and yet powerful platform forimplementing projects dealing with the control of real world peripherals. The parallel port is made up of three different sections. These are data lines, control lines and status lines. There are 8 data lines, and they are the primary means of getting information out of the port. The control lines are another 4 outputs. The status linesare a standard parallel port’s inputs. There are 5 of them. The fig.4 shows all the pins of the parallel port. The pins 18,19,20,21,22,23,24 and 25 are all ground pins.
Fig. 4:
Pin outlines of the parallel port
ControlDataStatus129 aque et. al : Proceedings of the 4 th ICEE & 2 nd APM, January 2006
Table 1:
Parallel port address
Address Notes
4. SOFTWARE DEVELOPMENT
We have implemented our software using Visual Basic 6.0 as programming language and Microsoftvoice engine tools for speech recognition purpose. The develop software can be run under Windows 98/ME/NT/2000/2000 Server/XP.
Visual Basic can not directly access the hardware on a system [5], [6]. All hardware requests must gothrough Windows. In order to control the port directly,we used something external to our program. Writingprograms to talk with parallel port was pretty easy in old
DOS version and in
WIN95/98 too. We use win95IO.dll file and the functions
VbOut() and
VbInp() for outputting and inputting data to and fromthe parallel port respectively. But entering to the new era of NT clone operating systems like
WINNT/WIN2000/WINXP all this simplicity goes away.Windows NT assigns some privileges and restriction to different types of program running on it. Itclassifies all the programs into two categories: usermode and kernel mode . Device drivers are capable of running in kernel mode. We have write a device driver to handle the “Interface Box” by using the
Inpout32.dll file and
Inp32() and
Out32() functionfor
WINNT/2000/XP operating system .4.2 Speech Recognition
Speech recognition, or speech-to-text, involvescapturing and digitizing the sound waves, convertingthem to basic language units or phonemes, constructing words from phonemes, and contextuallyanalyzing the words to ensure correct spelling for words that sound alike (such as write and right) [7]-[9]. The fig.5 illustrates this high-level description ofthe process.
User Microphone Sound CardOutput as text SpeechRecognition engine
Fig. 5:
Block diagram of speech recognition process flowA number of English recognition engines are availablenow. Microsoft has also been developing voice recognition for a few years. We have used MicrosoftSpeech Recognition Engine (version 4.0) for therecognition of English speech in our system.
5. GRAPHICAL INTERFACE
The graphical interfaces of the developed software are smart enough to guide a person to extract full functionality of the utility program without any priorexperience. The Main window provides three options to control the electric appliances as shown in fig.6.
Fig. 6:
Main window
This window contains ON and OFF push buttons foreach of the electric appliances to turn ON or OFFrespectively, as shown in fig.7.
Fig. 7:
Manual control window aque et. al : Proceedings of the 4 th ICEE & 2 nd APM, January 2006
Fig. 9:
Voice control window
This window provides the facilities to set date andtime and status of the device operation (ON or OFF)to turn ON or OFF the devices according to the given date and time as shown in fig.8. The user needs only to utter the words with in the Command button to turn ON/OFF the specific device.Suppose, anybody wants to turn on the light, he needs only to utter the word “LightOn”.
6. CONCLUSION
The developed system is a robust combination of anumber of diverse technologies, to construct a speechactivated portal to home appliances to assists users who are disable and in home and workplaces. Thissystem can control only eight electric appliances andcan be further control 256 electric devices in industryor large organization through a single PC byupgrading the interface box and a little modification inthe program . REFERENCEFig. 8:
Timer control window [1] Douglas V. Hall,
Microprocessor and Interfacingprogramming and hardware.
Tata McGraw-HillPublication, Second Edition, 2002.