+ All Categories
Home > Documents > Speech Control Home Appliances

Speech Control Home Appliances

Date post: 07-Jul-2018
Category:
Upload: harrysingh
View: 218 times
Download: 0 times
Share this document with a friend

of 15

Transcript
  • 8/19/2019 Speech Control Home Appliances

    1/38

    SPEECH CONTROL HOME APPLIANCES

    ABSTRACT

     The concept of controlling home appliances using human voice is an

    interesting. This project is designed to control home appliances using a

    voice-controlled Android application. A Bluetooth device is interfaced to the

    control unit for sensing signals transmitted by the Android application. This

    data is conveyed to the control unit which switches on loads ON/O as

    desired. An !"#$ series microcontroller is used in this project as a controlling

    device.

    %emote operation is achieved by any smart-phone or Tablet with

    Android O&' upon a ()* +(raphical )ser *nterface, based voice operation.

     The transmitting end uses an Android application for the voice commands

    that are transmitted to digital bits. At the receiver end' these commands are

    used for controlling the home appliances on and o. At the receiving end' the

    appliances are driven by %elays through Opto isolators that are interfaced to

    the microcontroller. &erial communication data sent from the Androidapplication is received by a Bluetooth receiver interfaced to the

    microcontroller. The program on the microcontroller refers to the serial data

    to generate respective output based on the input data to operate the %elays

    through Opto coupler *.

  • 8/19/2019 Speech Control Home Appliances

    2/38

    Introduction

    evice controlling by switch or remote is old concept now. The ne0t

    generation technology is here. 12oice operated device controlling3 project

    utili4es human voice command to control electrical devices. )ser has to give

    voice commands to an android application. This application recogni4es the

    voice commands and sends it to the project. A receiver and decoder decode

    these commands and gives it to the !"#$ microcontroller over a serial port.

     Then microcontroller ta5es decision on which devices to control depending

    upon input received from android application.

    evice control with voice is one of the main areas about future research.*magine a world where user can do each and every tas5 by just tal5ing. 6e

    have already seen few automobile industries have implemented this in cars.

    2oice ontrolled 7ome Appliances has many applications including device

    controlling inside home as well as in industry. &o basically we are going to

    ontrol home appliance using voice based command.

     Tal5ing about voice operated device controlling' we can say that roughly

    there are two types of controlling operations. *n 8rst one' user has to spea5

    in a microphone connected to electronic circuit. And in another type user can

    spea5 in Android mobile or any other device and then this device sends

    commands to the project through wireless communication techni9ue. *n this

    project we have used second type of operation' which means voice

    controlling through android mobile application. One of the main purposes of 

    this techni9ue is to reduce the human eorts. )ser doesn:t have to get up

    from his place to control the device. This is an advanced 2oice Operated

    7ome Appliance ontrol &ystem which needs Android smart-phone or tablet.

    2oice recognition technology is used inside the Android app. 6e can control

    device by using our voice. This project really proves useful for physically

    disabled people or senior citi4ens or elderly person at hour home or even

    those people who are injured and cannot wal5 or move.

  • 8/19/2019 Speech Control Home Appliances

    3/38

  • 8/19/2019 Speech Control Home Appliances

    4/38

    Circuit Diagram

    Material used

    •  Transformer

    • iode

    • %esistor

    • 2oltage regulator

    • ;ed

    • Arduino

    • ;

    • Bluetooth

  • 8/19/2019 Speech Control Home Appliances

    5/38

    time. &o if we apply A voltage across one winding' a voltage will be induced

    in the other winding. Transformer wor5s on this same principle. *t is made of 

    two windings wound around the same core of iron. The winding to which A

    voltage is applied is called primary winding. The other winding is called as

    secondary winding. Transformers are of two types &tep )p transformer and

    &tep own transformer.

    Ste! "! trans#ormer$ %  These transformers are used to increase the

    voltage level at the output means 2oltage at secondary winding is more than

    the primary winding. *n this transformer secondary winding has more

    number of turns than primary winding. These types of transformers are

    generally used in power station.

    Ste! Do&n trans#ormer$ %  These transformers are used to decrease the

    voltage level at the output winding means voltage of secondary winding is

    less than the primary winding. *n this transformer secondary winding has less

    number of turns than primary winding. These types of transformers have

  • 8/19/2019 Speech Control Home Appliances

    6/38

    major applications in electronics industry. urther these are divided into two

    categories

    A, &imple TransformerB, entral tapped transformer

    Sim!le Trans#ormer$ %  *t:s a four wire transformer. These types of 

    transformer have > wires on primary winding and > wires on secondary

    output. &ymbol of this transformer is shown below. 2oltage rating of these

    transformer e0pressed as ?2'$>2' >@2 etc.

  • 8/19/2019 Speech Control Home Appliances

    7/38

    Central Ta!!ed trans#ormer$ - *t:s a # 6ire transformer. This type of transformer has > wires on primary winding and wires on secondary.

    2' >@-"->@ 2 etc.

    Central Ta!!ed trans#ormerS!eci'cation o# trans#ormer$%6hile purchasing a transformer generally two considerations have to

    be 5ept in mind' 8rst one is voltage rating and second is current rating.

    2oltage rating depends upon the circuit:s operating voltage its

    generally # or $> 2olt so ? or $> 2olt transformers are generally used.

    urrent rating of transformer depends upon the load of circuit. *f our

    load current is more than the transformer current then due to loading

    eects transformer can burn out. &o to protect our transformer' current

  • 8/19/2019 Speech Control Home Appliances

    8/38

    rating of transformer should be more than the load current. All

    transformer comes with dierent current rating e.g. ? 2 transformer is

    available in #""m A' #"mA' $A' >A so on. One thing should be 5ept in

    mind as the ampear increases cost of transformer also increases. 6e

    have to choose best one according to our circuit re9uirements.

    RESISTORS

     The Cow of charge +or current, through any material' encounters an opposing

    force similar in many respect to mechanical friction. This opposing force is

    called resistance of the material. *t is measured in ohms. *n some electric

    circuits resistance is deliberately introduced in the form of the resistor.

    %esistors are of following typesD

    $. 6ire wound resistors.

    >. arbon resistors.

    . watts to several

  • 8/19/2019 Speech Control Home Appliances

    9/38

    hundred watts and resistance values from $ohm to $""5 ohms. Thus wire

    wound resistors are used for high currents.

    Car)on Resistors$

    arbon resistors are divided into three typesD

    a. arbon composition resistors are made by mi0ing carbon grains with

    binding material +glue, and moduled in the form of rods. 6ire leads are

    inserted at the two ends. After this an insulating material seals the

    resistor. %esistors are available in power ratings of $/$"' $/!' $/@ ' $/> ' $.>

    watts and values from $ ohm to >" ohms.

    b. arbon 8lm resistors are made by deposition carbon 8lm on a ceramic

    rod. They are cheaper than carbon composition resistors.

    c. ement 8lm resistors are made of thin carbon coating 8red onto a

    solid ceramic substrate. The main purpose is to have more precise

    resistance values and greater stability with heat. They are made in a

    small s9uare with leads.

     

    Metal ilm Resistors$

     They are also called thin 8lm resistors. They are made of a thin metal

    coating deposited on a cylindrical insulating support. The high resistance

  • 8/19/2019 Speech Control Home Appliances

    10/38

    values are not precise in valueE however' such resistors are free of 

    inductance eect that is common in wire wound resistors at high fre9uency.

    *aria)le Resistors$

    =otentiometer is a resistor where values can be set depending on the

    re9uirement. =otentiometer is widely used in electronics systems. F0amples

    are volume control' tons control' brightness and contrast control of radio or

     T.2. sets.

  • 8/19/2019 Speech Control Home Appliances

    11/38

    RESISTOR COLOR CODE

    Color+st

    )and

    ,nd

    )and

    -rd  )and

    .multi!lier/

    0t1  )and

    .tolerance/

    Tem!2

    Coe3cient

    Blac5 " " G$""

    Brown $ $ G$"$ H$I +, $"" ppm

    %ed > > G$"> H>I +(, #" ppm

    Orang

    e G$" $# ppm

     Jellow @ @ G$"@ ># ppm

    (reen # # G$"# H".#I +,

    Blue ? ? G$"? H".>#I +,

    2iolet G$" H".$I +B,

    (ray ! ! G$"! H"."#I +A,

    6hite K K G$"K

    (old G$"L$ H#I +M,

    &ilver G$"L> H$"I +,

    None H>"I +

  • 8/19/2019 Speech Control Home Appliances

    12/38

      Band+

      Band ,

      Band -

      Band 0

    CAPACITORS

    A capacitor can store charge' and its capacity to store charge is called

    capacitance. apacitors consist of two conducting plates' separated by an

    insulating material +5nown as dielectric,. The two plates are joined with two

    leads. The dielectric could be air' mica' paper' ceramic' polyester'

    polystyrene' etc. This dielectric gives name to the capacitor. ;i5e paper

    capacitor' mica capacitor etc.

     Types of apacitorsD- apacitors are of two Types i0ed and variable

    capacitor.

    i0ed types of capacitor are further of two typesD-

    =olar apacitorD- Those capacitor have polarity are 5nown as polar capacitor.

    Flectrolytic capacitor are the e0ample of polar capacitors.

  • 8/19/2019 Speech Control Home Appliances

    13/38

    Non =olar apacitorD- Those capacitor have no polarity are 5nown as NON-

    polar capacitor. eramic capacitor are the e0ample of non polar capacitors

    Electrol6tic Ca!acitor$ Flectrolytic capacitors have an electrolyte as a

    dielectric. 6hen such an electrolyte is charged' chemical changes ta5es

    place in the electrolyte. *f its one plate is charged positively' same plate

    must be charged positively in future. 6e call such capacitors as polari4ed.

    Normally we see electrolytic capacitor as polari4ed capacitors and the leads

    are mar5ed with positive or negative on the can. Non-electrolyte capacitors

    have dielectric material such as paper' mica or ceramic. Therefore'

    depending upon the dielectric' these capacitors are classi8ed.

  • 8/19/2019 Speech Control Home Appliances

    14/38

    Ceramic Ca!acitorD &uch capacitors have disc or hollow tabular shaped

    dielectric made of ceramic material such as titanium dio0ide and barium

    titanate. Thin coating of silver compounds is deposited on both sides of 

    dielectric disc' which acts as capacitor plates. ;eads are attached to each

    sides of the dielectric disc and whole unit is encapsulated in a moisture

    proof coating. isc type capacitors have very high value up to ".""$uf. Their

    wor5ing voltages range from 2 to ?""""2. These capacitors have very low

    lea5age current. Brea5down voltage is very high.

  • 8/19/2019 Speech Control Home Appliances

    15/38

    Diode$%

    iodes are semiconductor devices which might be described as passing

    current in one direction only. iodes have two terminal' an anode and a

    cathode. The cathode is always identi8ed by a dot' ring or some other mar5.

    iode is a unidirectional device. *n this current Cows in only one direction.

    iodes can be used as voltage regulators' tuning devices in rf tuned circuits'

    fre9uency multiplying devices in rf circuits' mi0ing devices in rf circuits'

    switching applications  or can be used to ma5e logic decisions in digital

    circuits. There are also diodes which emit light' of course these are 5nown

    as light-emitting-diodes or ;FPs.

    a rectifying diode of the $N@""$-" + $A, type or even one of the high power'

    high current stud mounting types. Jou will notice the straight bar end has the

    letter 5' this denotes the cathode while the a denotes anode. urrent

    http://www.electronics-tutorials.com/basics/diodes.htmhttp://www.electronics-tutorials.com/basics/diodes.htmhttp://www.electronics-tutorials.com/basics/diodes.htmhttp://www.electronics-tutorials.com/basics/current.htmhttp://www.electronics-tutorials.com/basics/diodes.htmhttp://www.electronics-tutorials.com/basics/diodes.htmhttp://www.electronics-tutorials.com/basics/current.htmhttp://www.electronics-tutorials.com/basics/diodes.htm

  • 8/19/2019 Speech Control Home Appliances

    16/38

    can only Cow from anode to cathode and not in the reverse direction' hence

    the arrow appearance. This is one very important property of diodes.

     The principal early application of diodes was in rectifying #" / ?" 74 A

    mains to raw which was later smoothed by cho5e transformers and / or

    capacitors. This procedure is still carried out today and a number of 

    rectifying schemes for diodes have evolved' half wave' full wave and bridge'

    full wave and bridge recti8ers.

    As e0amples in these applications the half wave recti8er passes only the

    positive half of successive cycles to the output 8lter through $. uring the

    negative part of the cycle $ does not conduct and no current Cows to the

    load. *n the full wave application it essentially is two half wave recti8ers

    combined and because the transformer secondary is centre tapped' $

    conducts on the positive half of the cycle while > conducts on the negative

    part of the cycle. Both add together. This is more eQcient. The full wave

    bridge recti8er operates essentially the same as the full wave recti8er but

    does not re9uire a cetre tapped transformer. urther discussion may be seen

    on the topic power supplies

    +N0557 series Diode$%

    http://www.electronics-tutorials.com/basics/chokes.htmhttp://www.electronics-tutorials.com/basics/power-supply.htmhttp://www.electronics-tutorials.com/basics/chokes.htmhttp://www.electronics-tutorials.com/basics/power-supply.htm

  • 8/19/2019 Speech Control Home Appliances

    17/38

    eatures

    R iused Munction

    R 7igh urrent apability and ;ow orward 2oltage rop

    R ;ow %everse ;ea5age urrent

    R ;ead ree inish

    +N0+08 Diode

     The $N@$@! and $N@@@! are high-speed switching diodes fabricated in

    planar technology' and encapsulated in hermetically sealed leaded glass

    &O> +O-#, pac5ages.

  • 8/19/2019 Speech Control Home Appliances

    18/38

    EAT"RES

    R 7ermetically sealed leaded glass &O> +O-#, pac5age

    R 7igh switching speedD ma0. @ ns

    R (eneral application

  • 8/19/2019 Speech Control Home Appliances

    19/38

    R ontinuous reverse voltageD ma0. $"" 2

    R %epetitive pea5 reverse voltageD ma0. $"" 2

    R %epetitive pea5 forward currentD ma0. @#" mA.

    APPLICATIONS

    R 7igh-speed switching

    IC

    * +*ntegrated ircuit, means that all the components of the circuit are

    fabricated on same chip. igital *s are a collection of resistors' diodes' and

    transistors fabricated on a single piece of semiconductor' usually silicon

    called a substrate' which is commonly referred to as Swafer:. The chip isenclosed in a protective plastic or ceramic pac5age from which pins e0tend

    out connecting the * to other device. &uQ0 N or = stands for dual-in-line

    +plastic pac5age +*=, while suQ0 M or * stands for dual-in-lime ceramic

    pac5age. Also the suQ0 for 6 stands for Cat ceramic pac5age.

     The pins are numbered counter cloc5wise when viewed from the top of the

    pac5age with respect to an identity notch or dot at one end of the chip.The

    manufacturer:s name can usually be guessed from its logo that is printed on

    the *. The * type number also indicates the manufacturer:s code. or e.g.

    < @"! N &N @"@ indicates National &emiconductor and Te0as *nstruments.

  • 8/19/2019 Speech Control Home Appliances

    20/38

    Ot1er e4am!les are$

    air hild D )A' )A

    National &emiconductor D

  • 8/19/2019 Speech Control Home Appliances

    21/38

    &T%*=

    O)T N/

    O)T N/O

    &=%*N(

    "2 P

    RELA9S

    A relay is an electrically operated switch. The relay contacts can be made to

    operate in the pre-arranged fashion. or instance' normally open contacts

    close and normally closed contacts open. *n electromagnetic relays' the

    contacts however comple0 they might be' they have only two position i.e.

    O=FN and ;O&F' whereas in case of electromagnetic switches' thecontacts can have multiple positions.

    "SE O RELA9 

  • 8/19/2019 Speech Control Home Appliances

    22/38

     The reason behind using relay for switching loads is to provide complete

    electrical isolation. *t means that there is no electrical connection between

    the driving circuits and the driven circuits. The driving circuit may be low

    voltage operated low power circuits that control several 5ilowatts of power. *n

    our circuit where a high fan could be switched on or o depending upon the

    output from the telephone.

    &ince the relay circuit operated on a low voltage' the controlling circuit is

    9uite safe. *n an electromagnetic relay the armature is pulled by a magnetic

    force only. There is no electrical connection between the coil of a relay and

    the switching contacts of the relay. *f there are more than one contact they

    all are electrically isolated from each other by mounting them on insulatingplates and washers. 7ence they can be wired to control dierent circuits

    independently.

    &ome of the popular contacts forms are described belowD

      $. Flectromagnetic relay

    >. =ower %elay.

    . Time elay %elay.

    @. ;atching %elay.

    #. rystal an %elay.

    :2 o-a0ial %elay

    +2 Electromagnetic rela6$

  • 8/19/2019 Speech Control Home Appliances

    23/38

    An electromagnetic relay in its simplest form consists of a coil' a current

    passing through which produces a magnetic 8eld. This magnetic 8eld

    attracts an armature' which in turn operates the contacts. Normally open

    contacts close and normally closed contacts open. Flectromagnetic relays

    are made in a large variety of contacts forms.

    ,2 Po&er rela6s$

    =ower relays are multi-pole heavy duty lapper type relays that are capable of 

    switching resistive loads of upto >#amp.. These relays are widely used for a

    variety of industrial application li5e control of fractional horse power motors'

    solenoids' heating elements and so on. These relays usually have button li5e

    silver alloy contacts and the contact welding due to heavy in rush current is

    avoided by wiping action of the contacts to 9uench the arc during high

    voltage switching thus avoiding the contact welding.

    -2 Time Dela6 Rela6$

    A time delay relay is the one in which there is a desired amount of time delay

    between the application of the actuating signal and operation of the load

    switching devices.

    02 Latc1ing Rela6$

     *n a ;atching %elay' the relay contacts remain in the last energi4ed position

    even after removal of signal in the relay control circuit. The contacts are held

    in the last relay-energi4ed position after removal of energisation either

    electrically or magnetically. The contacts can be released to the normal

    position electrically or mechanically.

    Transistor$%

  • 8/19/2019 Speech Control Home Appliances

    24/38

     The schematic representation of a transistor is shown. Note the arrow

    pointing down towards the emitter. This signi8es itPs an N=N transistor A

    transistor is basically a current ampli8er. &ay we let $mA Cow into the base.

    6e may get $""mA Cowing into the collector. NoteD The currents Cowing into

    the base and collector e0it through the emitter +sum o all currents entering

    or leaving a node must e9ual 4ero,. The gain of the transistor will be listed in

    the datasheet as either V

    or 7fe

    . The gain wonPt be identical even in

    transistors with the same part number. The gain also varies with the collector

    current and temperature.

  • 8/19/2019 Speech Control Home Appliances

    25/38

    Signals #rom s&itc1es

    6hen a switch is used to provide an input to a circuit' pressing the switch

    usually generates a voltage signal. *t is the voltage signal which triggers the

    circuit into action. 6hat do you need to get the switch to generate a voltage

    signalW . . . Jou need a voltage divider. The circuit can be built in either of two

    waysD

  • 8/19/2019 Speech Control Home Appliances

    26/38

     The !ull do&n resistor in the 8rst circuit forces V out to become ;O6 e0cept

    when the push button switch is operated. This circuit delivers a 7*(7 voltage

    when the switch is pressed. A resistor value of $" is often used.

    *n the second circuit' the !ull u! resistor forces V out to become 7*(7 e0cept

    when the switch is operated. =ressing the switch connects V out directly to " 2.

    *n other words' this circuit delivers a ;O6 voltage when the switch is

    pressed.

    *n circuits which process logic signals' a ;O6 voltage is called Plogic "P or just

    P"P' while a 7*(7 voltage is called Plogic$P or P$P. These voltage divider circuits

    are perfect for providing input signals for logic systems.

    6hat 5inds of switches could you use. One variety of push button switch is

    called a miniature tactile s&itc1. These are small switches which wor5

    well with prototype boardD

    LED$% ;F means light emitting diode. *ts function is similar to the diode.

    But these are not made up from silicon or germanium. These are generally

    used as a indicating device. There are variety of ;Fs are available in mar5etdepending upon their si4e and colour.

  • 8/19/2019 Speech Control Home Appliances

    27/38

    Polarit6 o# LED$%  ;F have polarity. 6e can judge its polarity by watching

    Cags in its structure. Bigger Cag is 5nown as cathode and smaller Cag is

    5nown as anode as shown below.

    *oltage Regulator  The ;

  • 8/19/2019 Speech Control Home Appliances

    28/38

    eatures

    ■ Output current up to $ A

    ■ Output voltages of #E ?E !E KE $>E $#E $!E >@ 2

    ■ Thermal overload protection

    ■ &hort circuit protection

    Arduino "NO

  • 8/19/2019 Speech Control Home Appliances

    29/38

    Arduino )NO Board Arduino is a popular open-source single-board

    microcontroller' descendant of the open source 6iring platform' designed toma5e the process of using electronics in multidisciplinary projects more

    accessible. The hardware consists of a simple open hardware design for the

    Arduino board with an Atmel A2% processor and onboard input/output

    support. The software consists of a standard programming language

    compiler and the boot loader that runs on the board. Arduino hardware is

    programmed using a 6iring-based language +synta0 and libraries,' similar to

    XX with some slight simpli8cations and modi8cations' and a =rocessing

    based integrated development environment. urrent versions can be

    purchased pre-assembledE.

    OQcial Arduino have used the mega A2% series of chips' speci8cally the

    ATmega!' ATmega$?!' ATmega>!' ATmega$>!"' and ATmega>#?". A

  • 8/19/2019 Speech Control Home Appliances

    30/38

    handful of other processors have been used by Arduino compatibles. > serial connection' but the

    way this is implemented varies by hardware version. &erial Arduino boards

    contain a simple inverter circuit to convert between %&->>- level and TT;-

    level signals. urrent Arduino boards are programmed via )&B. The Arduino

    board e0poses most of the microcontrollerPs */O pins for use by other circuits.

    =rovides $ digital */O pins' si0 of which can produce pulse-width modulated

    signals' and si0 analog inputs. These pins are on the top of the board' via

    female ".$ inch headers.

    Bluetoot1 Module

    7ere we are using Bluetooth module 7-"# which wor5s on standard

    Bluetooth communication protocol we are using this for establishing a

    wireless communication between android phone and Arduino when mobile

    sends the data it receives the data and decodes its information and send to

    the Arduino via serial port. *t can be used in both ways for sending and

    receiving data to android.

  • 8/19/2019 Speech Control Home Appliances

    31/38

    *t wor5s on X#2 ' it has two wor5ing modes serial mode and AT mode' AT

    mode is used for con8guring the Bluetooth. 7ere is various types of 

    Bluetooth module e.g. 7-"'7-"#'7-"? etc we are using 7-"# module.

    LI;"ID CR9STAL DISPLA9 

    A li

  • 8/19/2019 Speech Control Home Appliances

    32/38

      ; haracter > 0 $?

  • 8/19/2019 Speech Control Home Appliances

    33/38

    PIN Name unction

    $ 2&& (round voltage

    > 2 X#2

    2FF ontrast voltage

    @ %&

    %egister &elect

    " Y *nstruction %egister

    $ Y ata %egister

    # %/6

    %ead/ 6rite' to choose write or read mode

    " Y write mode

    $ Y read mode

    ? F

    Fnable

    " Y start to latch data to ; character

    $Y disable

    B" ;&B

    ! B$ -

    K B> -

    $" B -

    $$ B@ -

    $> B# -

    $ B? -

    $@ B

  • 8/19/2019 Speech Control Home Appliances

    34/38

     The user may select whether the ; is to operate with a @-bit data bus or

    an !-bit data bus. *f a @-bit data bus is used' the ; The @@!" standard

    re9uires control lines as well as either @ or ! */O lines for the data bus. The

    user may select whether the ; is to operate with a @-bit data bus or an !-

    bit data bus. *f a @-bit data bus is used' the ; will re9uire a total of data

    lines + control lines plus the @ lines for the data bus,. *f an !-bit data bus is

    used' the ; will re9uire a total of $$ data lines + control lines plus the !

    lines for the data bus,.

     The three control lines are referred to as EN' RS' and R(.

    Ena)le$% The EN line is called Fnable. This control line is used to tell the

    ; that you are sending it data. To send data to the ;' your program

    should 8rst set this line high +$, and then set the other two control lines

    and/or put data on the data bus. 6hen the other lines are completely ready'

    bring EN low +", again. The $-" transition tells the @@!" to ta5e the data

    currently found on the other control lines and on the data bus and to treat it

    as a command.

    Register Select$% The RS line is the %egister &elect line. 6hen %& is low+",' the data is to be treated as a command or special instruction +such as

    clear screen' position cursor' etc.,. 6hen %& is high +$,' the data being sent

    is te0t data which should be displayed on the screen. or e0ample' to display

    the letter T on the screen you would set %& high.

    Read (rite$% The R( line is the %ead/6rite control line. 6hen %6 is low

    +",' the information on the data bus is being written to the ;. 6hen %6 is

    high +$,' the program is eectively 9uerying +or reading, the ;. Only one

    instruction +(et ; status, is a read command. All others are write

    commands--so %6 will almost always be low.

  • 8/19/2019 Speech Control Home Appliances

    35/38

    inally' the data bus consists of @ or ! lines +depending on the mode of 

    operation selected by the user,. *n the case of an !-bit data bus' the lines are

    referred to as B"' B$' B>' B' B@' B#' B?' and B.

    Program

    Zinclude [;i9uidrystal.h\

    ;i9uidrystal lcd+$' $>' $$' $"' K' !,E

    &tring voiceE

    int

    led$ Y >' //onnect ;F $ To =in Z>

    led> Y ' //onnect ;F > To =in Z

    led Y @' //onnect ;F To =in Z@

    led@ Y #' //onnect ;F @ To =in Z#

    led# Y ?E //onnect ;F # To =in Z?

    //--------------------------all A unction-------------------------------//

    void allon+,]

      digital6rite+led$' 7*(7,E

    digital6rite+led>' 7*(7,E

    digital6rite+led' 7*(7,E

    digital6rite+led@' 7*(7,E

    digital6rite+led#' 7*(7,E

    ^

  • 8/19/2019 Speech Control Home Appliances

    36/38

    void allo+,]

      digital6rite+led$' ;O6,E

    digital6rite+led>' ;O6,E

    digital6rite+led' ;O6,E

    digital6rite+led@' ;O6,E

    digital6rite+led#' ;O6,E

    ^

    //-----------------------------------------------------------------------//

    void setup+, ]

      &erial.begin+K?"",E

      lcd.begin+$?' >,E

      pin

  • 8/19/2019 Speech Control Home Appliances

    37/38

    voice XY cE

    ^

    if +voice.length+, \ ", ]

      &erial.println+voice,E

      delay+$",E

      lcd.clear+,E

      delay+$",E

      lcd.setursor+"' ",E

      lcd.print+voice,E

    delay+#"",E

      lcd.clear+,E

    //-----------------------------------------------------------------------//

    //----------ontrol

  • 8/19/2019 Speech Control Home Appliances

    38/38

      else if+voice YY _computer o,

    else if+voice YY _lights o,

    else if+voice YY _fan o,

    //-----------------------------------------------------------------------//

    voiceYE^^


Recommended