SPEECH Device Cntrl

download SPEECH Device Cntrl

of 37

Transcript of SPEECH Device Cntrl

  • 8/2/2019 SPEECH Device Cntrl

    1/37

    1. INTRODUCTION

    The speech recognition system is a completely assembled and easy to use programmable speech

    recognition circuit. Programmable, in the sense that you train the words (or vocal utterances) youwant the circuit to recognize. This board allows you to experiment with many facets of speechrecognition technology. It has 8 bit data out which can be interfaced with any microcontroller for

    further development. Some of interfacing applications which can be made are controlling home

    appliances, robotics movements, Speech Assisted technologies, Speech to text translation, andmany more.

    Voice based device control is an interesting voice based project, mainly useful for

    industrial applications, surveillance applications. This project gives exact concept of controlling

    a device by a voice instruction. This project is the first step to design of voice based deviceautomation projects.

    The use of Device control systems in the industrial environment or automation

    application is an important issue so that the user can find a balance between their devices and itsusage at particular time only. A speech recognizes process to operate the ON/OFF the particular

    device period of work enables reliability to compute them, avoiding interest conflicts between

    the devices and its usage. The ordinary speech control Device systems use a PIC16F877Amicrocontroller to identify the particular key.

    According to that key, devices will be ON /off .These systems can be easily deceived

    because the user can be operated from the microcontroller to another microcontroller using

    ULN2003 driver and relays. In industrial, users do not need to go and switch ON/OFF to the

    particular device, neither to monitor device status. By saying particular word to the

    microcontroller. In this project, it is proposed microcontroller to microcontroller interface

    scheme that improves a user-friendly and flexible interface to the I/O devices.

    Technology: Speech recognition:

    Speech recognition is classified into two categories, speaker dependent and speaker independent.

    Speaker dependent systems are trained by the individual who will be using the system.

    Speaker independent is a system trained to respond to a word regardless of who speaks. Speech

    recognition systems have another constraint concerning the style of speech they can recognize.

    They are three styles of speech: isolated, connected and continuous. Isolated speech recognition

    systems can just handle words that are spoken separately. This is the most common speech

    recognition systems available today.

  • 8/2/2019 SPEECH Device Cntrl

    2/37

    Connected is a half way point between isolated word and continuous speech recognition. Allows

    users to speak multiple words. The HM2007 can be set up to identify words or phrases 1.92

    seconds in length.

    2. Block diagram

    PIC

    Microcontroller

    Voice

    Recognition

    Module

    Microphone

    Power supply to all

    sections

    Step

    down

    T/F

    Bridge

    Rectifier

    Filter

    Circuit

    Regulato

    r

    CLK

    RESETULN

    2003ADIV 1

    DIV 4

    DIV 2

    DIV 3

  • 8/2/2019 SPEECH Device Cntrl

    3/37

    2.1 BLOCK DIAGRAM EXPLANATION

    The PIC microcontroller contains five ports. In this project one port is dedicated for

    speech recognition. Relays are interfaced through ULN driver circuit to control the devices. A

    simple yet powerful program is written in c language and burned into the microcontroller to

    record and accept voice instructions and to control the device.

    This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage

    regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify the ac

    out put of secondary of 230/12V step down transformer.

  • 8/2/2019 SPEECH Device Cntrl

    4/37

    3 .CIRCUIT DIAGARAM

    VOICE RECOGNITION KIT USING HM2007

  • 8/2/2019 SPEECH Device Cntrl

    5/37

    Introduction

    Speech Recognition System

    The speech recognition system is a completely assembled and easy to use programmable speechrecognition circuit. Programmable, in the sense that you train the words (or vocal utterances) you

    want the circuit to recognize. This board allows you to experiment with many facets of speech

    recognition technology. It has 8 bit data out which can be interfaced with any microcontroller forfurther development. Some of interfacing applications which can be made are controlling home

    appliances, robotics movements, Speech Assisted technologies, Speech to text translation, and

    many more.

    Features

    Self-contained stand alone speech recognition circuit

    User programmable Up to 20 word vocabulary of duration two second each

    Multi-lingual Non-volatile memory back up with 3V battery onboard.

    Will keep the speech recognition data in memory even after power off. Easily interfaced to control external circuits & appliances

    Specification

    Input Voltage - 9 to 15 V DC Use a commonly available 12V 500ma DC Adapter

    Output Data - 8 bits at 5V Logic Level

    Interface - Any microcontroller like 8051, PIC or AVR can be interfaced to data port to interpret

    ApplicationsThere are several areas for application of voice recognition technology. Speech controlled appliances and toys

    Speech assisted computer games

    Speech assisted virtual reality Telephone assistance systems

    Voice recognition security

    Speech to speech translation

    Introduction

    Speech recognition will become the method of choice for controlling appliances, toys, tools and

    computers. At its most basic level, speech controlled appliances and tools allow the user toperform parallel tasks (i.e. hands and eyes are busy elsewhere) while working with the tool or

    appliance. The heart of the circuit is the HM2007 speech recognition IC. The IC can recognize

    20 words, each word a length of 1.92 seconds

    Using the System

  • 8/2/2019 SPEECH Device Cntrl

    6/37

    The keypad and digital display are used to communicate with and program the HM2007 chip.

    The keypad is made up of 12 normally open momentary contact switches. When the circuit is

    turned on, 00 is on the digital display, the red LED (READY) is lit and the circuit waits for acommand.

    Training Words for RecognitionPress 1 (display will show 01 and the LED will turn off) on the keypad, then press the

    TRAIN key ( the LED will turn on) to place circuit in training mode, for word one. Say the target

    word into the onboard microphone (near LED) clearly. The circuit signals acceptance of thevoice input by blinking the LED off then on. The word (or utterance) is now identified as the

    01 word. If the LED did not flash, start over by pressing 1 and then TRAIN key. You may

    continue training new words in the circuit. Press 2 then TRN to train the second word and so

    on. The circuit will accept and recognize up to 20 words (numbers 1 through 20). It is notnecessary to train all word spaces. If you only require 10 target words that are all you need to

    train.

    Testing Recognition:Repeat a trained word into the microphone. The number of the word should be displayed on the

    digital display. For instance, if the word directory was trained as word number 20, saying theword directory into the microphone will cause the number 20 to be displayed.

    Error Codes:

    The chip provides the following error codes.55 = word to long

    66 = word to short

    77 = no match

    Clearing Memory

    To erase all words in memory press 99 and then CLR. The numbers will quickly scroll by onthe digital display as the memory is erased.

    Changing & Erasing Words

    Trained words can easily be changed by overwriting the original word. For instances suppose

    word six was the word Capital and you want to change it to the word State. Simply retrain

    the word space by pressing 6 then the TRAIN key and saying the word State into the

    microphone. If one wishes to erase the word without replacing it with another word press theword number (in this case six) then press the CLR key. Word six is now erased.

    Simulated Independent Recognition

    The speech recognition system is speaker dependant, meaning that the voice that trained the

    system has the highest recognition accuracy. But you can simulate independent speech

    recognition. To make the recognition system simulate speaker independence one uses more thanone word space for each target word. Now we use four word spaces per target word. Therefore

    we obtain four different enunciations of each target word. (Speaker independent). The word

    spaces 01, 02, 03 and 04 are allocated to the first target word. We continue do this for the

    remaining word space. For instance, the second target word will use the word spaces 05, 06, 07

  • 8/2/2019 SPEECH Device Cntrl

    7/37

    and 08. We continue in this manner until all the words are programmed. If you are experimenting

    with speaker independence use different people when training a target word. This will enable the

    system to recognize different voices, inflections and enunciations of the target word. The moresystem resources that are allocated for independent recognition the more robust the circuit will

    become. If you are experimenting with designing the most robust and accurate system possible,

    train target words using one voice with different inflections and enunciation's of the target word.

    Homonyms

    Homonyms are words that sound alike. For instance the words cat, bat, sat and fat sound alike.Because of their like sounding nature they can confuse the speech recognition circuit. When

    choosing target words for your system do not use homonyms.

    The Voice with Stress & Excitement

    Stress and excitement alters ones voice. This affects the accuracy of the circuits recognition.

    For instance assume you are sitting at your workbench and you program the target words like

    fire, left, right, forward, etc., into the circuit. Then you use the circuit to control a flight simulator

    game, Doom or Duke Nukem. Well, when youre playing the game youll likely be yellingFIRE! Fire! ...FIRE!! ...LEFT go RIGHT!. In the heat of the action youre voice will

    sound much different than when you were sitting down relaxed and programming the circuit. Toachieve higher accuracy word recognition one needs to mimic the excitement in ones voice when

    programming the circuit. These factors should be kept in mind to achieve the high accuracy

    possible from the circuit. This becomes increasingly important when the speech recognition

    circuit is taken out of the lab and put to work in the outside world.

    Error Codes

    When interfacing the external circuit through its data bus, the decoding circuit must recognizethe word numbers from error codes. So the circuit must be designed to recognize error codes

    55, 66 and 77 and not confuse them with word spaces 5, 6 and 7.

    Voice Security System

    This circuit isnt designed for a voice security system in a commercial application, but that

    should not prevent anyone from experimenting with it for that purpose. A common approach isTo use three or four keywords that must be spoken and recognized in sequence in order to open a

    lock or allow entry.

    Aural Interfaces

    Its been found that mixing visual and aural information is not effective. Products that require

    visual confirmation of an aural command grossly reduces efficiency. To create an effective AUI

    products need to understand (recognize) commands given in an unstructured and efficientmethods. The way in which people typically communicate verbally.

    Learning to Listen

    The ability to listen to one person speak among several at a party is beyond the capabilities of

    todays speech recognition systems. Speech recognition systems can not (as of yet) separate and

    filter out what should be considered extraneous noise. Speech recognition does not understand

    speech. Understanding the meaning of words is a higher intellectual function.

  • 8/2/2019 SPEECH Device Cntrl

    8/37

    Because a circuit can respond to a vocal command doesnt mean it understands the command

    spoken. In the future, voice recognition systems may have the ability to distinguish nuances of

    speech and meanings of words, to Do what I mean, not what I say!

    Speaker Dependent / Speaker Independent

    Speech recognition is divided into two broad processing categories; speaker dependent andspeaker independent. Speaker dependent systems are trained by the individual who will be using

    the system. These systems are capable of achieving a high command count and better than 95%

    accuracy for word recognition. The drawback to this approach is that the system only respondsaccurately only to the individual who trained the system. This is the most common approach

    employed in software for personal computers. Speaker independent is a system trained to

    respond to a word regardless of who speaks. Therefore the system must respond to a large

    variety of speech patterns, inflections and enunciation's of the target word. The command wordcount is usually lower than the speaker dependent however high accuracy can still be maintain

    within processing limits. Industrial applications more often require speaker independent voice

    recognition systems.

    Recognition Style

    In addition to the speaker dependent/independent classification, speech recognition also contendswith the style of speech it can recognize. They are three styles of speech: isolated, connected and

    continuous. Isolated: Words are spoken separately or isolated. This is the most common speech

    recognition system available today. The user must pause between each word and command

    spoken. Connected: This is a half way point between isolated word and continuous speechrecognition. It permits users to speak multiple words. The HM2007 can be set up to identify

    words or phrases 1.92 seconds in length. This reduces the word recognition dictionary number to

    20. Continuous: This is the natural conversational speech we use to in everyday life. It isextremely difficult for a recognizer to sift through the sound as the words tend to merge together.

    For instance, "Hi, how are you doing?" to a computer sounds like "Hi,.howyadoin" Continuous

    speech recognition systems are on the market and are under continual development.

    More on the HM2007 Chip

    The HM2007 is a CMOS voice recognition LSI (Large Scale Integration) circuit. The chipcontains an analog front end, voice analysis, regulation, and system control functions. The chip

    may be used in a stand alone or CPU connected.

    Features:

    Single chip voice recognition CMOS LSI

    Speaker dependent

    External RAM support Maximum 40 word recognition (.96 second)

    Maximum word length 1.92 seconds (20 word)

    Microphone support Manual and CPU modes available

    Response time less than 300 milliseconds

    5V power supply

  • 8/2/2019 SPEECH Device Cntrl

    9/37

    3.1 RELAYS

    A relay is usually an electromechanical device that is actuated by an electrical current.

    The current flowing in one circuit causes the opening or closing of another circuit. Relays are

    like remote control switches and are used in many applications because of their relative

    simplicity, long life, and proven high reliability. Relays are used in a wide variety of applications

    throughout industry, such as in telephone exchanges, digital computers and automation systems.

    Highly sophisticated relays are utilized to protect electric power systems against trouble and

    power blackouts as well as to regulate and control the generation and distribution of power. In

    the home, relays are used in refrigerators, washing machines and dishwashers, and heating and

    air-conditioning controls. Although relays are generally associated with electrical circuitry, there

    are many other types, such as pneumatic and hydraulic. Input may be electrical and output

    directly mechanical, or vice versa.

    All relays contain a sensing unit, the electric coil, which is powered by AC or DC

    current. When the applied current or voltage exceeds a threshold value, the coil activates the

    armature, which operates either to close the open contacts or to open the closed contacts. When a

    power is supplied to the coil, it generates a magnetic force that actuates the switch mechanism.

    The magnetic force is, in effect, relaying the action from one circuit to another. The first circuit

    is called the control circuit; the second is called the load circuit.

  • 8/2/2019 SPEECH Device Cntrl

    10/37

    On/Off Control: Example: Air conditioning control, used to limit and control a high

    power load, such as a compressor Limit Control:

    Example: Motor Speed Control, used to disconnect a motor if it runs slower or faster than the

    desired speed

    Logic Operation: Example: Test Equipment, used to connect the instrument to a number

    of testing points on the device under test.

    Electromechanical Relays:

    In our project we will be using an electromechanical relay, which will be a 5 pin relay

    and the working of the relay will be like as. The general-purpose relay is rated by the amount of

    current its switch contacts can handle. Most versions of the general-purpose relay have one to

    eight poles and can be single or double throw. These are found in computers, copy machines, and

    other consumer electronic equipment and appliances.

  • 8/2/2019 SPEECH Device Cntrl

    11/37

    Load Types:

    Load parameters include the maximum permissible voltage and the maximum permissible

    current. The relay can handle both volts and amps. Both the size of the load and its type are

    important. There are four types of loads:

    1.) Resistive, 2.) Inductive, 3.) AC or DC, and 4.) High or Low Inrush.

    1.) Resistive Load is one that primarily offers resistance to the flow of current. Examples of

    resistive loads include electric heaters, ranges and ovens, toasters and irons.

    2.) Inductive Loads include power drills, electric mixers, fans, sewing machines and vacuum

    cleaners. Relays that are going to be subjected to high-inrush inductive loads, such as an AC

    motor, will often be rated in horsepower, rather than in volts and amps. This rating reflects the

    amount of power the relay contacts can handle at the moment the device is turned on (or

    switched).

    3.) AC or DC This affects the contacts circuit of the relay (due to EMF) and the timing

    sequencing. And may result in performance issues in the switching capacity of the relay for

    different load types (I.e. resistive, inductive, etc.).

  • 8/2/2019 SPEECH Device Cntrl

    12/37

    4.) High or Low Inrush - Some load types draw significantly higher amounts of current

    (amperage) when first turned then they do when the circuit later stabilizes (loads may also

    pulsate as the circuit continues operating, thus increasing and decreasing the current). An

    example of a high inrush load is a light bulb, which may draw 10 or more times its normal

    operating current when first turned on (some manufacturers refer to this as lamp load).

    3.2 INTERNAL OPERATION OF MECHANICAL RELAYS

    Standard: Single Side Stable with any of the following three different methods for closing

    contacts:

    1. Flexure Type: The armature actuates the contact spring directly, and the contact is driven into

    a stationary contact, closing the circuit.

    2. Lift-off Type: The moveable piece is energized by the armature, and the contact closes

    3. Plunger Type: The lever action caused by the energization of the armature produces a long

    stroke action. Reed: A Single Side Stable Contact that involves low contact pressure and a

    simple contact point.

    4. Polarized: Can be either a single side stable or dual-winding. A permanent magnet is used to

    either attract or repel the armature that controls the contact. A definite polarity (+ or -) is required

    By the relay coil. The latching option makes a polarized relay dual-winding, meaning it remains

    in the current state after the coil is de-energized.

  • 8/2/2019 SPEECH Device Cntrl

    13/37

    3.3 RELAY DRIVER(ULN2003)

    The ULN2001A, ULN2002A, ULN2003 and ULN2004Aare high Voltage, high current

    Darlington arrays each containing seven open collector Darlington pairs with common emitters.

    Each channel rated at 500mAand can withstand peak currents of 600mA.Suppressiondiodesare

    included for inductive load driving and the inputs are pinned opposite the outputs to simplify

    board layout.

    These versatile devices are useful for driving a wide range of loads including solenoids,

    relays DC motors; LED displays filament lamps, thermal print heads and high power buffers.

    The ULN2001A/2002A/2003A and 2004A are supplied in 16 pin plastic DIP packages with a

    copper lead frame to reduce thermal resistance. They are available also in small outline package

    (SO-16) as ULN2001D/2002D/2003D/2004D.

    FEATURES OF DRIVER:

    SEVENDARLINGTONS PER PACKAGE.

    OUTPUT CURRENT 500mA PER DRIVER (600mA PEAK)

    OUTPUT VOLTAGE 50V.

  • 8/2/2019 SPEECH Device Cntrl

    14/37

    INTEGRATED SUPPRESSION DIODES FOR

    INDUCTIVE LOADS.

    OUTPUTS CAN BE PARALLELED FOR

    HIGHERCURRENT.

    TTL/CMOS/PMOS/DTLCOMPATIBLE INPUTS.

    INPUTS PINNED OPPOSITE OUTPUTS TO

    SIMPLIFYLAYOUT

    PIN CONNECTION:

  • 8/2/2019 SPEECH Device Cntrl

    15/37

    3.4 EMBEDDED SYSTEMS:

    Embedded System is a combination of hardware and software used to achieve a single

    specific task. An embedded system is a microcontroller-based, software driven, reliable, real-

    time control system, autonomous, or human or network interactive, operating on diverse physical

    variables and in diverse environments and sold into a competitive and cost conscious market.

  • 8/2/2019 SPEECH Device Cntrl

    16/37

    An embedded system is not a computer system that is used primarily for processing,

    not a software system on PC or UNIX, not a traditional business or scientific

    application. High-end embedded & lower end embedded systems. High-end

    embedded

    Systems and hardware layout designed for the specific purpose. Examples Small controllers and

    devices in our everyday life like Washing Machine, Microwave Ovens, where they are

    embedded in.

    System Design Calls

  • 8/2/2019 SPEECH Device Cntrl

    17/37

    The Embedded System Design Cycle

    V Diagram

    In this place we need to discuss the role of simulation software, real-time systems and data

    acquisition in dynamic test applications. Traditional testing is referred to as static testing

    where functionality of components is tested by providing known inputs and measuring outputs.

    Today there is more pressure to get products to market faster and reduce design cycle times.

    This has led to a need for dynamic testing where components are tested while in use with the

    entire system either real or simulated. Because of cost and safety concerns, simulating the rest

    of the the system with real-time hardware is preferred to testing components in the actual real

    system.

    The diagram shown on this slide is the V Diagram that is often used to describe the

    development cycle. Originally developed to encapsulate the design process of software

    applications, many different versions of this diagram can be found to describe different product

    design cycles. Here we have shown one example of such a diagram representing the design

    cycle of embedded control applications common to automotive, aerospace and defense

    applications.

    In this diagram the general progression in time of the development stages is shown from left to

    right. Note however that this is often an iterative process and the actual development will not

  • 8/2/2019 SPEECH Device Cntrl

    18/37

    proceed linearly through these steps. The goal of rapid development is to make this cycle as

    efficient as possible by minimizing the iterations required for a design. If the x-axis of the

    diagram is thought of as time, the goal is to narrow the V as much as possible and thereby

    reduce development time.

    The y-axis of this diagram can be thought of as the level at which the system components are

    considered. Early on in the development, the requirements of the overall system must be

    considered. As the system is divided into sub-systems and components, the process becomes

    very low-level down to the point of loading code onto individual processors. Afterwards

    components are integrated and tested together until such time that the entire system can enter

    final production testing. Therefore the top of the diagram represents the high-level system view

    and the bottom of the diagram represents a very low-level view.

    Notes:

    V diagram describes lots of applicationsderived from software development.

    Reason for shape, every phase of design requires a complimentary test phase. High-level to low-

    level view of application. This is a simplified version. Loop back/ Iterative process, X-axis is

    time (sum up).

    Characteristics of Embedded System:

    An embedded system is any computer system hidden inside a product other than a computer

    There will encounter a number of difficulties when writing embedded system software in

    addition to those we encounter when we write applications

    Throughput Our system may need to handle a lot of data in a short period of time.

    ResponseOur system may need to react to events quickly

  • 8/2/2019 SPEECH Device Cntrl

    19/37

    TestabilitySetting up equipment to test embedded software can be difficult

    Debug abilityWithout a screen or a keyboard, finding out what the software is doing wrong

    (other than not working) is a troublesome problem

    Reliability embedded systems must be able to handle any situation without human intervention

    Memory space Memory is limited on embedded systems, and you must make the software and

    the data fit into whatever memory exists

    Program installation you will need special tools to get your software into embedded systems

    Power consumption Portable systems must run on battery power, and the software in these

    systems must conserve power

    Processor hogs computing that requires large amounts of CPU time can complicate the

    response problem

    Cost Reducing the cost of the hardware is a concern in many embedded system projects;

    software often operates on hardware that is barely adequate for the job.

    Embedded systems have a microprocessor/ microcontroller and a memory. Some have a serial

    port or a network connection. They usually do not have keyboards, screens or disk drives.

    Applications:

    1. Military and aerospace embedded software applications.

    3.5 ABOUT MICROCONTROLLER:

  • 8/2/2019 SPEECH Device Cntrl

    20/37

    The micro-controller is a chip, which has a computer processor with all its support

    function, memory (both program storage and RAM), and I/O built in to the device. These built in

    functions minimize the need for external circuits and devices to design in the final applications.

    Most microcontrollers do not require a substantial amount of time to learn how to

    efficiently program them, although many of them which have quirks which you will have to

    understand before you attempt to develop your first application.

    Along with micro-controllers getting faster, smaller and more power efficient they are

    also getting more and more features. Often, the first version of micro-controller will just have

    memory and digital I/O, but as the device family matures, more and more pat numbers with

    varying features will be available.

    PIC 16F877A:

    Microcontroller Core Features:

    High-performance RISC CPU.

    Only 35 single word instructions to learn.

    All single cycle instructions except for program branches which are two cycle

    Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle.

    Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data Memory

    (RAM) Up to 256 x 8 bytes of EEPROM data memory.

    Pin out compatible to the PIC16C73B/74B/76/77

    Interrupt capability (up to 14 sources)

    Eight level deep hardware stack

    Direct, indirect and relative addressing modes.

  • 8/2/2019 SPEECH Device Cntrl

    21/37

    Power-on Reset (POR).

    Power-up Timer (PWRT) and Oscillator Start-up Timer (OST).

    Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation.

    Programmable code-protection.

    Power saving SLEEP mode.

    Selectable oscillator options.

    Low-power, high-speed CMOS FLASH/EEPROM technology.

    Fully static design.

    In-Circuit Serial Programming (ICSP) .

    Single 5V In-Circuit Serial Programming capability.

    In-Circuit Debugging via two pins.

    Processor read/write access to program memory.

    Wide operating voltage range: 2.0V to 5.5V.

    High Sink/Source Current: 25 mA.

    Commercial and Industrial temperature ranges.

  • 8/2/2019 SPEECH Device Cntrl

    22/37

    PIN DIAGRAM

  • 8/2/2019 SPEECH Device Cntrl

    23/37

    Peripheral Features:

    Timer0: 8-bit timer/counter with 8-bit prescaler

  • 8/2/2019 SPEECH Device Cntrl

    24/37

    Timer1: 16-bit timer/counter with prescaler, can be incremented during sleep via external

    crystal/clock

    Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

    Two Capture, Compare, PWM modules

    - Capture is 16-bit, max. Resolution is 12.5 ns

    - Compare is 16-bit, max. Resolution is 200 ns

    - PWM max. Resolution is 10-bit

    10-bit multi-channel Analog-to-Digital converter

    Synchronous Serial Port (SSP) with SPI (Master Mode) and I2C (Master/Slave)

    Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with 9-bit address

    detection

    Parallel Slave Port (PSP) 8-bits wide, with external RD, WR and CS controls (40/44-pin only)

    Brown-out detection circuitry for Brown-out Reset (BOR)

    CMOS Technology:

    Low-power, high-speed Flash/EEPROM technology.

    Fully static design.

    Wide operating voltage range (2.0V to 5.5V).

    Commercial and Industrial temperature ranges.

    Low-power consumption.

  • 8/2/2019 SPEECH Device Cntrl

    25/37

    4. VOICE RECOGNITION KIT USING HM2007Introduction

    Speech Recognition System

    The speech recognition system is a completely assembled and easy to use programmable speech

    recognition circuit. Programmable, in the sense that you train the words (or vocal utterances) youwant the circuit to recognize. This board allows you to experiment with many facets of speech

    recognition technology. It has 8 bit data out which can be interfaced with any microcontroller for

    further development. Some of interfacing applications which can be made are controlling homeappliances, robotics movements, Speech Assisted technologies, Speech to text translation, and

    many more.

    Features Self-contained stand alone speech recognition circuit

    ser programmable

    Up to 20 word vocabulary of duration two second each

    Multi-lingual

    Non-volatile memory back up with 3V battery onboard.

    Will keep the speech recognition data in memory even after power off.

    Easily interfaced to control external circuits & appliances

    Specification

    Input Voltage - 9 to 15 V DC Use a commonly available 12V 500ma DC Adapter

    Output Data - 8 bits at 5V Logic Level

    Interface - Any microcontroller like 8051, PIC or AVR can be interfaced to data port to interpret

    Applications

  • 8/2/2019 SPEECH Device Cntrl

    26/37

    There are several areas for application of voice recognition technology.

    Speech controlled appliances and toys

    Speech assisted computer games

    Speech assisted virtual reality

    Telephone assistance systems

    Voice recognition security

    Speech to speech translation

    Introduction

    Speech recognition will become the method of choice for controlling appliances, toys, tools andcomputers. At its most basic level, speech controlled appliances and tools allow the user to

    perform parallel tasks (i.e. hands and eyes are busy elsewhere) while working with the tool or

    Appliance. The heart of the circuit is the HM2007 speech recognition IC. The IC can recognize20 words, each word a length of 1.92 seconds.

    Using the SystemThe keypad and digital display are used to communicate with and program the HM2007 chip.

    The keypad is made up of 12 normally open momentary contact switches. When the circuit is

    Turned on, 00 is on the digital display, the red LED (READY) is lit and the circuit waits for a

    Command.

    Training Words for Recognition

    Press 1 (display will show 01 and the LED will turn off) on the keypad, then press the

    TRAIN key (the LED will turn on) to place circuit in training mode, for word one. Say the targetWord into the onboard microphone (near LED) clearly. The circuit signals acceptance of the

    Voice input by blinking the LED off then on. The word (or utterance) is now identified as the

    01 word. If the LED did not flash, start over by pressing 1 and then TRAIN key.You may continue training new words in the circuit. Press 2 then TRN to train the second

    Word and so on. The circuit will accept and recognize up to 20 words (numbers 1 through 20).

    It is not necessary to train all word spaces. If you only require 10 target words thats all youNeed to train.

    Testing Recognition:

    Repeat a trained word into the microphone. The number of the word should be displayed on the

    digital display. For instance, if the word directory was trained as word number 20, sayingThe word directory into the microphone will cause the number 20 to be displayed.

    Error Codes:

    The chip provides the following error codes.55 = word to long

    66 = word to short

    77 = no match

    Clearing Memory

  • 8/2/2019 SPEECH Device Cntrl

    27/37

    To erase all words in memory press 99 and then CLR. The numbers will quickly scroll by on

    the digital display as the memory is erased.

    Changing & Erasing Words

    Trained words can easily be changed by overwriting the original word. For instances suppose

    word six was the word Capital and you want to change it to the word State. Simply retrainthe word space by pressing 6 then the TRAIN key and saying the word State into the

    microphone. If one wishes to erase the word without replacing it with another word press the

    word number (in this case six) then press the CLR key. Word six is now erased.

    Simulated Independent Recognition

    The speech recognition system is speaker dependant, meaning that the voice that trained the

    system has the highest recognition accuracy. But you can simulate independent recognition. To

    make the recognition system simulate speaker independence one uses more than one word spacefor each target word. Now we use four word spaces per target word. Therefore we obtain four

    different enunciations of each target word. (Speaker independent). The word spaces 01, 02, 03

    and 04 are allocated to the first target word. We continue do this for the remaining word space.

    For instance, the second target word will use the word spaces 05, 06, 07 and 08. We continue inthis manner until all the words are programmed.

    If you are experimenting with speaker independence use different people when training a targetword. This will enable the system to recognize different voices, inflections and enunciations of

    the target word. The more system resources that are allocated for independent recognition the

    more robust the circuit will become. If you are experimenting with designing the most robust and

    accurate system possible, train target words using one voice with different inflections andenunciation's of the target word.

    Homonyms

    Homonyms are words that sound alike. For instance the words cat, bat, sat and fat sound alike.Because of their like sounding nature they can confuse the speech recognition circuit.

    When choosing target words for your system do not use homonyms.

    The Voice with Stress & Excitement

    Stress and excitement alters ones voice. This affects the accuracy of the circuits recognition.

    For instance assume you are sitting at your workbench and you program the target words like

    fire, left, right, forward, etc., into the circuit. Then you use the circuit to control a flight simulatorgame, Doom or Duke Nukem. Well, when youre playing the game youll likely be yelling

    FIRE! Fire! ...FIRE!! ...LEFT go RIGHT! In the heat of the action youre voice will

    sound much different than when you were sitting down relaxed and programming the circuit. To

    achieve higher accuracy word recognition one needs to mimic the excitement in ones voice whenprogramming the circuit. These factors should be kept in mind to achieve the high accuracy

    possible from the circuit. This becomes increasingly important when the speech recognition

    circuit is taken out of the lab and put to work in the outside world.

    Error Codes

    When interfacing the external circuit through its data bus, the decoding circuit must recognize

    the word numbers from error codes. So the circuit must be designed to recognize error codes

    55, 66 and 77 and not confuse them with word spaces 5, 6 and 7.

    Voice Security System

    This circuit isnt designed for a voice security system in a commercial application, but that

    should not prevent anyone from experimenting with it for that purpose. A common approach is

  • 8/2/2019 SPEECH Device Cntrl

    28/37

    to use three or four keywords that must be spoken and recognized in sequence in order to open a

    lock or allow entry.

    Aural Interfaces

    Its been found that mixing visual and aural information is not effective. Products that require

    visual confirmation of an aural command grossly reduces efficiency. To create an effective AUI

    products need to understand (recognize) commands given in an unstructured and efficientmethods. The way in which people typically communicate verbally.

    Learning to Listen

    The ability to listen to one person speak among several at a party is beyond the capabilities oftodays speech recognition systems. Speech recognition systems cannot (as of yet) separate and

    filter out what should be considered extraneous noise. Speech recognition does not understand

    speech. Understanding the meaning of words is a higher intellectual function. Because a circuit

    can respond to a vocal command doesnt mean it understands the command spoken. In thefuture, voice recognition systems may have the ability to distinguish nuances of speech and

    meanings of words, to Do what I mean, not what I say!

    Speaker Dependent / Speaker Independent

    Speech recognition is divided into two broad processing categories; speaker dependent andspeaker independent. Speaker dependent systems are trained by the individual who will be using

    the system. These systems are capable of achieving a high command count and better than 95%accuracy for word recognition. The drawback to this approach is that the system only responds

    accurately only to the individual who trained the system. This is the most common approach

    employed in software for personal computers. Speaker independent is a system trained to

    respond to a word regardless of who speaks. Therefore the system must respond to a largevariety of speech patterns, inflections and enunciation's of the target word. The command word

    count is usually lower than the speaker dependent however high accuracy can still be maintain

    within processing limits. Industrial applications more often require speaker independent voicerecognition systems.

    Recognition Style

    In addition to the speaker dependent/independent classification, speech recognition also contendswith the style of speech it can recognize. They are three styles of speech: isolated, connected and

    continuous. Isolated: Words are spoken separately or isolated. This is the most common speech

    recognition system available today. The user must pause between each word and commandspoken. Connected: This is a half way point between isolated word and continuous speech

    recognition. It permits users to speak multiple words. The HM2007 can be set up to identify

    words or phrases 1.92 seconds in length. This reduces the word recognition dictionary number to

    20. Continuous: This is the natural conversational speech we use to in everyday life. It isextremely difficult for a recognizer to sift through the sound as the words tend to merge together.

    For instance, "Hi, how are you doing?" to a computer sounds like "Hi,.howyadoin" Continuous

    speech recognition systems are on the market and are under continual development.

    More on the HM2007 Chip

    The HM2007 is a CMOS voice recognition LSI (Large Scale Integration) circuit. The chip

    contains an analog front end, voice analysis, regulation, and system control functions. The chipmay be used in a stand alone or CPU connected.

    Features:

    Single chip voice recognition CMOS LSI

  • 8/2/2019 SPEECH Device Cntrl

    29/37

    Speaker dependent

    External RAM support

    Maximum 40 word recognition (.96 second) Maximum word length 1.92 seconds (20 words)

    Microphone support

    Manual and CPU modes available Response time less than 300 milliseconds

    5V power supply

    4.1 Analog-to-digital convert

    An analog-to-digital converter (abbreviated ADC, A/D orA to D) is a device which converts a

    continuous quantity to a discrete digital number. The reverse operation is performed by a digital-

    to-analog converter(DAC).

    Typically, an ADC is an electronic device that converts an input analog voltage (orcurrent) to

    a digital number proportional to the magnitude of the voltage or current. However, some non-

    electronic or only partially electronic devices, such as rotary encoders, can also be considered

    ADCs.

    The digital output may use different coding schemes. Typically the digital output will be a two's

    complementbinary number that is proportional to the input, but there are other possibilities. An

    encoder, for example, might output a Gray code.

    An ADC may provide an isolated measurement. ADCs are also used in quantization of time-

    varying signals by turning them into a sequence of digital samples. The result is quantized in

    both time and value.

    http://en.wikipedia.org/wiki/Discrete_signalhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Digitalhttp://en.wikipedia.org/wiki/Rotary_encoderhttp://en.wikipedia.org/wiki/Two's_complementhttp://en.wikipedia.org/wiki/Two's_complementhttp://en.wikipedia.org/wiki/Gray_codehttp://en.wikipedia.org/wiki/Signal_(information_theory)http://en.wikipedia.org/wiki/Signal_(information_theory)http://en.wikipedia.org/wiki/Discrete_signalhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/Digital-to-analog_converterhttp://en.wikipedia.org/wiki/Electronicshttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Digitalhttp://en.wikipedia.org/wiki/Rotary_encoderhttp://en.wikipedia.org/wiki/Two's_complementhttp://en.wikipedia.org/wiki/Two's_complementhttp://en.wikipedia.org/wiki/Gray_codehttp://en.wikipedia.org/wiki/Signal_(information_theory)http://en.wikipedia.org/wiki/Signal_(information_theory)
  • 8/2/2019 SPEECH Device Cntrl

    30/37

    CIRCUIT DIAGRAM

    FIG4.2 POWER SUPPLY UNIT

    POWER SUPPLY UNIT COSISTS OF FOLLOWING UNITS

    1) Step down transformer

    2) Rectifier unit

    3) Input filter

    4) Regulator unit

    v) Output filter

    4.3 STEP DOWN TRANSFORMER

  • 8/2/2019 SPEECH Device Cntrl

    31/37

    The Step down Transformer is used to step down the main supply voltage from 230V AC

    to lower value. This 230 AC voltage cannot be used directly, thus it is stepped down. The

    Transformer consists of primary and secondary coils. To reduce or step down the voltage, the

    transformer is designed to contain less number of turns in its secondary core. The output from

    the secondary coil is also AC waveform. Thus the conversion from AC to DC is essential. This

    conversion is achieved by using the Rectifier Circuit/Unit.

    Step down transformers can step down incoming voltage, which enables you to have

    the correct voltage input for your electrical needs. For example, if our equipment has been

    specified for input voltage of 12 volts, and the main power supply is 230 volts, we will need a

    step down transformer, which decreases the incoming electrical voltage to be compatible with

    your 12 volt equipment.

    4. 4 RECTIFIER UNIT

    The Rectifier circuit is used to convert the AC voltage into its corresponding DC voltage.

    There are Half-Wave, Full-Wave and bridge Rectifiers available for this specific function. The

    most important and simple device used in Rectifier circuit is the diode. The simple function of

    the diode is to conduct when forward biased and not to conduct in reverse bias.

    Bridge rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to achieve

    full-wave rectification. This is a widely used configuration, both with individual diodes wired as

    shown and with single component bridges where the diode bridge is wired internally.

  • 8/2/2019 SPEECH Device Cntrl

    32/37

    A diode bridge or bridge rectifier is an arrangement of four diodes in a bridge

    configuration that provides the same polarity of output voltage for either polarity of input

    voltage. When used in its most common application, for conversion ofalternating current (AC)

    input into direct current (DC) output, it is known as a bridge rectifier. A bridge rectifier provides

    full-wave rectification from a two-wire AC input, resulting in lower cost and weight as compared

    to a center-tappedtransformerdesign.

    The Forward Bias is achieved by connecting the diodes positive with positive of the

    battery and negative with batterys negative. The efficient circuit used is the Full wave Bridge

    rectifier circuit. The output voltage of the rectifier is in rippled form, the ripples from the

    obtained DC voltage are removed using other circuits available. The circuit used for removing

    the ripples is called Filter circuit.

    4.5 INPUT FILTER

    Capacitors are used as filter. The ripples from the DC voltage are removed and pure DC

    voltage is obtained. And also these capacitors are used to reduce the harmonics of the input

    voltage. The primary action performed by capacitor is charging and discharging. It charges in

    positive half cycle of the AC voltage and it will discharge in negative half cycle. So it allows

    http://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Bridge_circuithttp://en.wikipedia.org/wiki/Polarity_(physics)http://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Rectifierhttp://en.wikipedia.org/wiki/Rectifierhttp://en.wikipedia.org/wiki/Center_taphttp://en.wikipedia.org/wiki/Transformerhttp://en.wikipedia.org/wiki/Diodehttp://en.wikipedia.org/wiki/Bridge_circuithttp://en.wikipedia.org/wiki/Polarity_(physics)http://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Rectifierhttp://en.wikipedia.org/wiki/Rectifierhttp://en.wikipedia.org/wiki/Center_taphttp://en.wikipedia.org/wiki/Transformer
  • 8/2/2019 SPEECH Device Cntrl

    33/37

    only AC voltage and does not allow the DC voltage. The 1000f capacitor serves as a "reservoir"

    which maintains a reasonable input voltage to the 7805 throughout the entire cycle of the ac line

    voltage. The four rectifier diodes keep recharging the reservoir capacitor on alternate half-cycles

    of the line voltage, and the capacitor is quite capable of sustaining any reasonable load in

    between charging pulses. This filter is fixed before the regulator. Thus the output is free from

    ripples. Input side the low pass filter has been used.

    Low pass filter:

    One simple electrical circuit that will serve as a low-pass filter consists of a resistorin

    series with a load, and a capacitorin parallel with the load. The capacitor exhibits reactance, and

    blocks low-frequency signals, causing them to go through the load instead. At higher frequencies

    the reactance drops, and the capacitor effectively functions as a short circuit. The combination of

    resistance and capacitance gives you the time constantof the filter = RC (represented by the

    http://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Resistorhttp://en.wikipedia.org/wiki/External_electric_loadhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Reactance_(electronics)http://en.wikipedia.org/wiki/Time_constanthttp://en.wikipedia.org/wiki/Time_constanthttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Resistorhttp://en.wikipedia.org/wiki/External_electric_loadhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Reactance_(electronics)http://en.wikipedia.org/wiki/Time_constant
  • 8/2/2019 SPEECH Device Cntrl

    34/37

    Greek lettertau). The break frequency, also called the turnover frequency orcutoff frequency (in

    hertz), is determined by the time constant: or equivalently (in radians per second):

    One way to understand this circuit is to focus on the time the capacitor takes to charge. It

    takes time to charge or discharge the capacitor through that resistor:

    At low frequencies, there is plenty of time for the capacitor to charge up to

    practically the same voltage as the input voltage.

    At high frequencies, the capacitor only has time to charge up a small amount

    before the input switches direction. The output goes up and down only a small fraction of the

    amount the input goes up and down. At double the frequency, there's only time for it to charge

    up half the amount.

    4.6 REGULATOR UNIT

    7805 REGULATOR

    Regulator regulates the output voltage to be always constant. The output voltage is

    maintained irrespective of the fluctuations in the input AC voltage. As and then the AC voltage

    changes, the DC voltage also changes. Thus to avoid this Regulators are used. Also when the

    internal resistance of the power supply is greater than 30 ohms, the output gets affected. Thus

    this can be successfully reduced here. Meanwhile it also contains current-limiting circuitry and

    thermal overload protection, so that the IC won't be damaged in case of excessive load current; it

    http://en.wikipedia.org/wiki/Tauhttp://en.wikipedia.org/wiki/Tauhttp://en.wikipedia.org/wiki/Cutoff_frequencyhttp://en.wikipedia.org/wiki/Cutoff_frequencyhttp://en.wikipedia.org/wiki/Radianshttp://en.wikipedia.org/wiki/Tauhttp://en.wikipedia.org/wiki/Cutoff_frequencyhttp://en.wikipedia.org/wiki/Radians
  • 8/2/2019 SPEECH Device Cntrl

    35/37

    will reduce its output voltage instead. The regulators are mainly classified for low voltage and

    for high voltage. Further they can also be classified as:

    1) Positive regulator

    Input pin

    Ground pin

    Output pin

    It regulates the positive voltage.

    2) Negative regulator

    Ground pin

    Input pin

    Output pin

    It regulates the negative voltage.

    7805 VOLTAGE REGULATOR:

    The 7805 provides circuit designers with an easy way to regulate DC voltages to 5v.

    Encapsulated in a single chip/package (IC), the 7805 is a positive voltage DC regulator that has

    only 3 terminals. They are: Input voltage, Ground, Output Voltage.

  • 8/2/2019 SPEECH Device Cntrl

    36/37

    BIBILOGRAPHY

    http://www.Wikipedia.com

    http://eed.hutech.edu.vn/Datasheet/HM2007.pdf

    http://www.nskelectronics.com

    http://eed.hutech.edu.vn/Datasheet/HM2007.pdfhttp://www.nsk/http://eed.hutech.edu.vn/Datasheet/HM2007.pdfhttp://www.nsk/
  • 8/2/2019 SPEECH Device Cntrl

    37/37

    http://www.microchip.com

    http://www.google.com

    http://www.microchip.com/http://www.google.com/http://www.microchip.com/http://www.google.com/