Interface between Headset and Co by pengxuebo


									     Group # 6
 TAJ’S House

    Tatiana Torres
  Aysenur Basagalar
    Jessica Clifton
Mohammad   ’Sameer Khan
• TAJ’S is a wireless voice
  control system. “You say it,
  and it will do it.”
• It provides more comfort
  for elderly and
  handicapped people.
• Main idea is to control a
  thermostat and a light
  switch using human voice
               Project Goals
•   Controlling Light Switch
•   Controlling Thermostat
•   Wireless
•   Voice Controlled
•   Price Efficient
Overall Block Diagram

Blue Soleil
                   Speech     Computer

                              Blue Soleil

               Light           Arduino
              Switch          Bluetooth     Thermostat
          Software Block Diagram
                                                                                Turn On                               Red Fan
                                                                                 Heater                               Turns On
                                                                     and        No Action
                                                                 Surrounding                      Microcontroller
                                                                 Temperature                         Arduino
                                                                                 Current             Program

                                                                                Turn On
                                                                                                                      Blue Fan
                                                                                                                      Turns On
                                                Analyze                        Conditioner
          Microsoft   Translates
 Verbal                            Data Base   Command
          Software     Voice to
Command                  Text                    Text

                                                                 Turn on                                  Activate    Light turns
                                                                  Light                                   Switch          on

                                                  Light Switch
                                                                 No Action
                                                   Command                         Program

                                                                 Turn off                                Deactivate   Light turns
                                                                  Light                                   Switch          off
          Personal Computer
• We considered each group members’ laptops
• Decided on using Toshiba Satellite A200-
  ST2041 Series which uses the 75 W 100-240 V
  AC Adapter, and it has a 4000 mAh Lithium Ion
  battery pack
• Reasons: there was no problem installing all the
  necessary software, and it has a better
  performance than the other group members’
• In order to demonstrate the on or
  off state of the thermostat, two
  fans are used
• Each acquired fan is a Crystal
  Clear UV JT8025H12S
• It is an 80 mm case with quad LEDs
• This fan has a three wire connection, but only
  two connections are necessary for our design
• It works with a maximum of 12V, and minimum
  of 3.2 V
• It operates with a minimum current of 240 mA
Fan Decision Matrix Operation

                   Increase                 Decrease
                     Temp                    Temp

           OFF                                             OFF
    Turn         Heating Fan’s             Cooling Fan’s         Turn
    ON              Status                    Status             ON

                         ON                        ON

                   Remain                    Remain
                    ON                        ON
The SerLCD v2.5 is selected
• Serial connection
   between the micro
   controller and the LCD
• Low power consumption (works with 5 V)
• It displays yellow on blue contrast with a
   backlight feature
             Battery Pack
• The battery pack is a normal battery
  holder with DC to DC step up converter
• The converter generates a regulated 5.0 V
  supply from two AA size batteries with a
  current of 200 mA
• The battery pack is used to power up the
  Arduino BT
       Microcontroller / Possibilities
Name         Clock    I/O    Price    Wireless
             Speed    Pins   (Dev.Bd) Communications
PIC          20 MHz   33      $65    RF modules to be
16F877                               added
ATMEL        16 MHz   35      $85    RF modules to be
AVR AT162                            added
Stellaris    25 MHz   24      $89    RF modules to be
LM2965                               added
Arduino BT   20 MHz   14     $141    WT11 Bluetooth
                                     module included
Wireless Communications modules

• $25 RF:Nordic

• $44 RF:Nordic

• $70 Bluetooth Module
Permission to use image by
                       Arduino BT

• ATMega 168 Microcontroller
• Serial Bluetooth transmission
  rate of 115200 bits/second
• 1024 bytes of RAM
• Power needed: 5V
• 14 Digital I/O pins
• 9 Analog I/O pins
• Arduino API(C language

                                  Permission to use image by
                     Arduino NG

• ATMega 168 Microcontroller
• Serial transmission rate of
  9600 bits/second
• 1024 bytes of RAM
• Power needed: 5V
• 14 Digital I/O pins
• 9 Analog I/O pins
• Arduino API(C language
Implementing the Arduino BT
              Light Switch
• Controlled directly by a digital pin of the
• A combination of a 5V(MCU) pin – 1 Amp
  relay controls the on/off operation of the
  light bulb.
• The load cannot overpass 1 Amp with this
         Light bulbs Rating
Source   Power   Current   Resistance

120V     120 W   1.00 A    120 Ohms

120V     60 W    0.50 A    240 Ohms

120V     40 W    0.33 A    360 Ohms

120V     30 W    0.25 A    480 Ohms

120V     13 W    0.11 A    1108 Ohms
Circuit Design
          DS18S20-PAR Digital
• This thermometer is selected
  since it requires only one port
  pin for communication
• It converts temperature in 750
   ms (max)
• It can measure temperatures
  from –55°C to +100°C
• For the testing purpose, we have to change the
  surrounding temperature of the sensor
  For cooling, we use ice pack and place it near the sensor
  For warming, we use a hair dryer and blow it in the direction of the
The design of the thermostat includes
• The cooling fan & heating fan
• Two SPDT relays
• Two 9 V batteries
• The Arduino Bluetooth
• DS18S20-PAR digital thermometer
The Heating Fan Design
The Cooling Fan Design
   Interface between Headset and
• We wanted to have
  interface between
  headset and
• It should be wireless
• Easy to transfer data
        Bluetooth Connection
• The PC itself does not contain a Bluetooth radio
  therefore it is necessary to add additional
  software and hardware.
• In order to establish a connection, BlueSoleil
  software is installed and a compatible BT dongle
  is inserted into the PC’s USB port.
• Once the BlueSoleil software is installed, the BT
  headset and Arduino BT can be setup.
   Requirements and Specifications
• Wireless interface connection between user and voice processing
  device (PC) is max 10 meters range
• Wireless interface connection between voice processing device and
  microcontroller is max 100 meters range
• Max data transfer rate is 1 Mbps between all used Bluetooth devices
  which are dongle, BT module (microcontroller), and headset

    Device          Class    Transfer    Maximum    Maximum      Maximum     Bluetooth
                            Data Rate    Distance   Permitted    Permitted   Versions
                                                     Power      Power(dbm)

    Headset          2       1 Mbps       10 m      2.5 mW          4           1.2

    Dongle           1       1 Mbps       100 m     100 mW         20           2.0

  BT module          1      2 ~ 3 Mbps    100 m     100 mW         20           2.0
          Bluetooth Headset
• Motorola H700
• H700 has a battery life of talk
• time of up to 6 hours and a
• standby time of up to 130 hours
• Uses Bluetooth v.1.2 for quicker
   pairing and reduced interference
• Can connect with compatible devices up to 10
  meters away
• Advantage of this headset: It uses the Rapid
  Charge technology meaning that it takes less
  than an hour to charge
         Bluetooth Dongle Options
Requirements       Cyber-Blue Bluetooth USB Bluetooth Dongle
                   v2.0 EDR USB Dongle Adapter ES-388
Range              up to 100m              0-100m

Transfer rate or   2.1 Mbps                1 Mbps
Size               2 x 0.5 x 0.25-inches   2 x 0.5 x 0.25-inches
                   (H x W x D,             (H x W x D,
                   approximate)            approximate)
Price              $29.99                  $6.99
        Bluetooth USB Dongle
• The Bluetooth USB Dongle ES 388
  has data transfer rate of 1Mbps
• Our dongle is class 1 which gives an
  approximate range of 100 meters
• However, the smaller range of the
  headset limits the range of the dongle
  to 10 meters
• It consumes 10mA with 0dbm of output power
• It possesses a very good transmission with very low
  losses in the transmitted signal
•   BlueSoleil is a set of Bluetooth
    Application Profiles implementation on
    Windows operating system and fully
    compliant to Bluetooth SIG latest

•   It enables PCs to form networks and
    exchange information wirelessly

•   The host device is expressed as a
    golden globe in the center, with the
    remote devices within range displayed
    as planets orbiting the Sun (Soleil)

•   It also provides PCs a fast and reliable
    solution for effortless wireless
    connection to mobile phones,
    headsets, PDAs, Access Points,
    Printers, Digital Cameras, PC
    peripherals, and so on
       Headset Bluetooth Setup
• Open BlueSoleil software
• Place the BT headset in
  Pairing mode
• Under My Bluetooth, select
  Bluetooth Device Discovery
• Right click on the headset
  icon, select Pair device here
  make sure that headset switch
  is on it should be displaying
  purple light
• Enter the pass code: 0000
• Right click on the icon again,
  select Connect with that it is
  noticeable headset would start
  blinking with blue color
   Headset Computer Settings
• After pairing headset with BlueSoleil, these
  settings should be applied to the PC
• Under Control Panel, select Sounds and Audio
• Select the Audio tab and change the sound
  default devices to Bluetooth AV/HS Audio
• Select the Voice tab and change the voice
  default devices to Bluetooth AV/HS Audio
• Once these changes have been applied, then all
  audio input and output will be handled through
  the BT headset
         Arduino BT Setup
• Assuming BlueSoleil software is already
  on, Under My Bluetooth, select Bluetooth
  Device Discovery
• Right click on the BT icon, select Pair
• Enter the following pass code: 12345
• Right click on the icon again, select
                Pairing and Repairing
•   After the BT connections have been
    established, the GUI will have the
    capability of using voice to control the
    operation of these devices

•   Every time user closes BlueSoleil, user
    has to repair the devices

•   However that does not mean that user
    has to follow all these steps, BlueSoleil
    recognizes the devices once the
    network address has been inputted.
    Then, user can right click on the
    device and pair device tab
     Graphical User Interface
             Provides a user-friendly design

• Recognizes spoken phrases
          “Light      Command      Computer Response Action
           on”        Fan +On          “Fan is on”    Turn fan on
                      Fan +Off         “Fan is off”  Turn fan off
                      Light +On       “Light is on”  Turn light on
                      Light +Off     “Light is off”  Turn light off

            • Computer responds to user with a customized spoken

• Allows programmatic responses                             “Light is
Speech Recognition Options
  Dragon Naturally $80   Win32 SDK available
  Speaking                     (at a cost)

  IBM ViaVoice    $20    Win32 SDK no longer

  Microsoft       Free   Win32 SDK available
  Speech                       (Free)
         Microsoft Speech
  Software Development Kit (SDK)
• Includes Microsoft Speech API (SAPI)
   – Speech Recognition (SR) engine
      • SAPI takes audio as input and uses the SR engine to output
        that as text
   – Text-To-Speech (TTS) engine
      • SAPI takes text as input and uses the TTS engine to output that
        text as spoken audio

                                     Speech            AUDIO
                            SAPI     Engine
                   Database Tables
   Activity Log

               Database Forms
                Input_Output                  Test Command

Command List
                               Activity Log
                      Input_Output Form
• Speech Applications
    TTS & SR
• COM Port Communication
    Control Devices

                                • Graphical User Interface Responses
                                    • Buttons
                                    • Textboxes
          Text to Speech Integration
• The Microsoft Speech Object Library
  must be selected in the References      Private Sub
  menu of the VBA module so that all      RC_FalseRecognition(ByVal
  applicable methods and objects are      StreamNumber As Long, ByVal
  recognized                              StreamPosition As Variant, ByVal
                                          Result As
• The script to use TTS begins with the
  declaration of “appSpeech” as an        If TTSPreference = -1 Then
  object.                                    Dim appSpeech As Object
                                             Set appSpeech =
• It then defines “appSpeech” as SAPI     CreateObject("SAPI.SpVoice")
                                             appSpeech.Speak "Command not
• The text strings are converted into
  audio by using the appSpeech.Speak
                                  Creating Grammar
                                      Tells SR engine what words it can recognize

          XML File                             GrammarBuilder                       Class Inherits from SR System

<grammar xml:lang="en-US"                 //Build Choice List                       class SrgsGrammar : SrgsDocument
version="1.0" xmlns="http://              Choices grammarChoices = new Choices();   {" tag-                                                        private static string[] _colors = new string[] {"turn", "light", "on"};
format="semantics-ms/1.0">                grammarChoices.Add("Turn");                   public SrgsGrammar(): base(GrammarRule()){
   <rule id="Color" scope="public">       grammarChoices.Add("Light");                  }
      <one-of>                            grammarChoices.Add("On");                     private static SrgsRule GrammarRule()
         <item> turn </item>                                                            {
         <item> light </item>             //Add to Grammar Builder                           //Create new rule
         <item> on </item>                GrammarBuilder gb = new                           SrgsRule rule = new SrgsRule("LightOn");
      </one-of>                           GrammarBuilder(grammarChoices);                   //Create a oneof list
      <tag> $ = $$ </tag>                                                                  SrgsOneOf choices = new SrgsOneOf();
   </rule>                                //Add Grammar Builder to Grammar                  //Get items to add to oneof list
<grammar>                                 grammar = new Grammar(gb);                       foreach (string color in _colors)
                                                                                               SrgsItem grammarItem = new SrgsItem(lighton);
                                                                                            //Add list to rule
                                                                                           //Return Rule
                                                                                          return rule;
                   Creating XML File
•   Deletes any old XML file
                                                  XML File

•   Creates a new Word document
     – Invisible open of MS Word

•   Pulls all commands from Command_Response table

•   Each command formatted into a string readable to SR software
                                                  <grammar xml:lang="en-US"
•   Saves this string as a .txt file and stores   version="1.0" xmlns="http://
                                        " tag-
    onto C: drive                                 format="semantics-ms/1.0">
                                                     <rule id="Color" scope="public">
                                                           <item> turn </item>

                                                           <item> light </item>
    Renames file as .XML                                   <item> on </item>
                                                        <tag> $ = $$ </tag>
    SR Engine Integration


        RC_Recognition                    RC_FalseRecognition

           Recognized                              Not

       Initializes SAPI                         TTS Engine
      Updates the GUI
  Accesses Command Table
                                                             Command not
Looks up appropriate response                                 Recognized

         Controlling Hardware
• DoSomething subroutine is called whenever a phrase is
   – Series of If-Then statements

   – Control Thermostat and Light Switch by sending
     ASCII Decimal values to microcontroller

   – MSComm object library used for COM port control
       Voice Recognition Integrity
• User Commands
   – Distinct and easily recognizable by the SR engine
   – Noticeable recognition issues with some words
   – Limited Commands to two word phrases

• Voice Training
   –   Takes approximately 5 minutes
   –   Improves efficiency by 85%
   –   Necessary for this project
   –   Multiple user speech profiles
      System Design
Command                                               Respond to
            SR              Lookup          TTS
           Engine            Table         Engine

      Thermostat                              Light

                Bluetooth            Connection

  ON/OFF         Get                         ON/OFF
   State        Temp                          State
                         Work Distribution

70%                                                                      Sameer
60%                                                                      Jessica

                                t      on         e      re   re
     ear ch sign   itc
                      h      sta gniti          as ftwa ftwa       PC
   es      De ht Sw erm eco
                            o                tab o          o
  R                    h       R          Da no S iel S
              Lig     T ce                      i     ol
                         Voi               Ardu lueS
Bluetooth USB Dongle      1     $7.99
Motorola H700 Bluetooth   1     $0.00
Case Fan                  2     $6.54
BlueSoleil Software       1     $0.00
MS Speech Software        1     $0.00
DS18S20 Thermometer       2     $10.85
Ser LCD v2.5              1     $29.3
Arduino Bluetooth         1     $141.14
Development Board
Arduino NG USB            1     $35.17
Development Board
PC Board                  1     $1.99
SPDT Relay                3     $4.49
Project Box               1     $4.99
Lamp Base                 1     $1.69
Light Bulb                1     $1.00
Header Pins               1     $3.00
Batteries                 3     $5.00
Battery Pack              1     $10.00
Personal Computer         1     $0.00
TOTAL                           $299.52
           Existing Systems
  System      Characteristics                  Price
             -One word command
HAL 2000     -Wired system                    $ 1500
             -Only two speech voices

             -No voice recognition
ELAN         -Wired system                    $ 3500
             -Touch Screen based

             -No voice recognition features
X10          -Wired connections               $ 900
             -Remote control/Camera

TAJ’S        -Voice recognition
             -Multiple user speech voices     $ 299
             -Wireless System
   Thank You

Question and Answers

To top