Speech recognition is commonly used  for controlling appliances, toys, tools and computers. It is used in Robotics to control motors according to voice commands.

The heart of the circuit is the HM2007 speech recognition IC. HM2007 is made by HUALON Microelectronics Corporation(Taiwan) .

The IC can recognize 20 words, each word a length of 1.92 seconds.

 

HM2007_1

 

Speech samples are acquired by a Microphone on board.HM2007 analyzes the analog signal received compares with the data stored in external RAM & finally outputs a corresponding 8 bit Data.This 8 bit data can be directly connected to a port of Microcontroller for further action.

An 8 kB external RAM is needed to store data.As the RAM is volatile , a 3v button battery is used to backup stored data.The 8 bit data is passed through an octal latch IC 74HC573.

To display the command numbers 2 common cathode 7 segment displays are provided.This is driven by a BCD to 7 segment decoder/driver IC CD4511.

The board requires 5v DC supply. A 12v adapter can be used as a power source, as the board has inbuilt 5v regulator with heat sink.

The HM 2007 IC requires initial configuration or training of words, which is performed using a 4 x 3 Matrix Keypad. In the training process user trains the IC by speaking words into the microphone and

assigning a particular value for that word. For example a world “left” can be assigned a value 01.This can then be later connected to a microcontroller for further functions.

Words  can be assigned from 01 to 20.

 

Training Words for Recognition:

Before starting the training process we can erase the previous memory.

Press 99 & then press the CLEAR button.

The display will scroll from 01 to 20 erasing all the memory

To train a word

Press “01” on the keypad.Display will show “01” and the READY LED will turn off.Now press the TRAIN key ( the LED will turn on) & HM2007 goes to  training mode, for word one.

Say the target word into the onboard microphone (near LED) clearly. The READY LED should blink momentarily indicating the acceptance of word.

If the LED did not flash, start again by pressing “1” and then “TRAIN” key.

You may continue training new words in the circuit. Press “02” then TRAIN key to train the second word and so on. The circuit will accept and recognize up to 20 words (numbers 01 through 20).

It is not necessary to train all word spaces. If you only require 5 target words that’s all you NEED TO TRAIN.

If the system has to work under noisy environments, background noise may corrupt the original data and leads to malfunctioning.Take care to avoid using this board in Noisy places.

Error codes generally displayed

 

55 = word too long

66 = word too short

77 = word no match

 

Image 1

 

Let us test the board by connecting to a Motor through a motor driver board L293.This L293 can drive 2 motors at a time.For demo we’re using one part of the IC.

Functioning of L293 can be understood from this post.

EN1 of L293 should be made HIGH and according to logic levels at IN1 & IN2 the motor will rotate to Right or Left or Stop.

DSC01106            HM2007_MOTOR

 

 

HM2007 Outputs an  8 bit Data buffered by 74HC573 IC & available as two 4 bits.

D0 to D3 represent one digit & the second one by D4 to D7

We shall connect

EN1 of L293 TO  D4

IN1 of L293 TO  D3

IN2 of L293 TO  D0

Provide a separate 12v DC power source to L293 board.Do not forget to make common the GND of L293 BOARD and that of HM2007 board.

Check out the table below to see how to achieve a number for a Word.

Here we’ve assigned decimal  11 for RIGHT  ,  18 for LEFT  &  08 for STOP.

 

hm2007_1

To rotate the motor to RIGHT we assign Decimal value  11 .To rotate LEFT a decimal value of 18 is assigned.

To stop the motor decimal 08 is assigned.The calculation of arriving at these values are shown in table above.

 

Train the HM2007 board by pressing 11 & then TRAIN key for the word RIGHT.

Then press 18 & TRAIN for the word LEFT.

Finally 08 & TRAIN for the word STOP.

Now speak the word RIGHT to see the motor rotate Rightwards, LEFT to notice the motor rotating leftwards & STOP will apply brake to motor.Corresponding Digit will be displayed on the 7 SEGMENT Displays.

 

VIDEO DEMO :

Motor Control by Voice Recognition

 

cooltext753793315  cooltext753790696