Difference between revisions of "Arduino Voice Recognition Module"

From Geeetech Wiki
Jump to: navigation, search
(Example 1)
(Product list)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Voice One.jpg]]
 
  
 
=='''Description'''==
 
=='''Description'''==
Line 9: Line 7:
  
 
We've beening thinking about a module which helps to control other devices by voice and it will not cost too much. Finally we designed this module. Well, what can this module do? It can recognize as much as 15 voice instruction, which is suitable for most cases involving voice control.<br>
 
We've beening thinking about a module which helps to control other devices by voice and it will not cost too much. Finally we designed this module. Well, what can this module do? It can recognize as much as 15 voice instruction, which is suitable for most cases involving voice control.<br>
[[File:Voice Two.jpg]]
+
[[File:Voice7-2.jpg]]
  
 
=='''Parameters'''==
 
=='''Parameters'''==
Line 21: Line 19:
 
This module can store 15 pieces of voice instruction. Those 15 pieces are divided into 3 groups, with 5 in one group. First we should record the voice instructions group by group. After that, we should import one group by serial command before it could recognize the 5 voice instructions within that group. If we need to implement instructions in other groups, we should import the group first. This module is speaker independent. If your friend speaks the voice instruction instead of you, it may not identify the instruction.
 
This module can store 15 pieces of voice instruction. Those 15 pieces are divided into 3 groups, with 5 in one group. First we should record the voice instructions group by group. After that, we should import one group by serial command before it could recognize the 5 voice instructions within that group. If we need to implement instructions in other groups, we should import the group first. This module is speaker independent. If your friend speaks the voice instruction instead of you, it may not identify the instruction.
  
==Example 1==
+
==Example==
 
Here i will show you an example how to control RGB by voice.<br>
 
Here i will show you an example how to control RGB by voice.<br>
 
'''1. Recording''' <br>
 
'''1. Recording''' <br>
Line 38: Line 36:
 
'''2. Hardware connection'''<br>
 
'''2. Hardware connection'''<br>
 
[[File:Voice Contect.jpg]]<br>
 
[[File:Voice Contect.jpg]]<br>
'''3. Code'''<br>
+
'''3. Code'''<br><br>
 
int redPin = 11; // R petal on RGB LED module connected to digital pin 11<br>
 
int redPin = 11; // R petal on RGB LED module connected to digital pin 11<br>
 
int greenPin = 9; // G petal on RGB LED module connected to digital pin 9<br>
 
int greenPin = 9; // G petal on RGB LED module connected to digital pin 9<br>
 
int bluePin = 10; // B petal on RGB LED module connected to digital pin 10<br>
 
int bluePin = 10; // B petal on RGB LED module connected to digital pin 10<br>
byte com = 0; //reply from voice recognition<br>
+
byte com = 0; //reply from voice recognition<br><br>
  
 
void setup()<br>
 
void setup()<br>
Line 57: Line 55:
 
Serial.write(0xAA);<br>
 
Serial.write(0xAA);<br>
 
Serial.write(0x21);<br>
 
Serial.write(0x21);<br>
}<br>
+
}<br><br>
  
 
void loop() // run over and over again<br>
 
void loop() // run over and over again<br>
Line 90: Line 88:
 
}<br>
 
}<br>
  
}<br>
+
}<br><br>
  
 
void color (unsigned char red, unsigned char green, unsigned char blue) // the color generating function<br>
 
void color (unsigned char red, unsigned char green, unsigned char blue) // the color generating function<br>
Line 97: Line 95:
 
analogWrite(bluePin, blue*173/255);<br>
 
analogWrite(bluePin, blue*173/255);<br>
 
analogWrite(greenPin, green*173/255);<br>
 
analogWrite(greenPin, green*173/255);<br>
}<br>
+
}<br><br>
 +
 
 +
Upload the code above to Arduino. Please disconnect TX and RX while uploading code because uploading would occupy serial interface.<br>
 +
 
 +
=='''Product list'''==
 +
[[File:Voice2-2.jpg]]<br>
 +
'''1、'''Voice recognition Module x1<br>
 +
 
 +
'''2、''' USB-TTL module
 +
 
 +
'''3、'''Mic x1<br>
 +
 
 +
'''4、'''1 pin cable x5<br>
 +
 
 +
=='''Document'''==
 +
The Manual:[[File:Voice_Recognize_manual.pdf]]<br>
 +
 
 +
=='''How to buy'''==
  
Upload the code above to Arduino. Please disconnect TX and RX while uploading code because uploading would occupy serial interface.
+
Click here to buy [http://www.geeetech.com/voice-recognition-module-p-803.html Voice Recognition Module]

Latest revision as of 11:07, 29 April 2014

Description

Headline text

We all know that there is a kind of moule which can control the light on and off. You make a sound, the light turns on. Then after a while it turns off. This is not voice recognition. We may call it Sound Control. Voice recognition is something that knows exactly what you were saying.

We've beening thinking about a module which helps to control other devices by voice and it will not cost too much. Finally we designed this module. Well, what can this module do? It can recognize as much as 15 voice instruction, which is suitable for most cases involving voice control.
Voice7-2.jpg

Parameters


1、Voltage:4.5-5.5V

2、Current:<40mA

3、Digital Interface: 5V TTL level UART interface

4、Analog Interface: 3.5mm mono-channel microphone connector + microphone pin interface

5、Size: 30mm x 47.5mm

This module can store 15 pieces of voice instruction. Those 15 pieces are divided into 3 groups, with 5 in one group. First we should record the voice instructions group by group. After that, we should import one group by serial command before it could recognize the 5 voice instructions within that group. If we need to implement instructions in other groups, we should import the group first. This module is speaker independent. If your friend speaks the voice instruction instead of you, it may not identify the instruction.

Example

Here i will show you an example how to control RGB by voice.
1. Recording
We need to send serial command to this module. You may need a USB-TTL module to connect it with PC. Send command 0xaa11 to record. Please refer to the manual for more information.

Please record the following voice instrctions in order :

1、WHITE
2、RED
3、GREEN
4、BLUE
5、OFF

Then send command 0xAA21 to import group 1.

2. Hardware connection
Voice Contect.jpg
3. Code

int redPin = 11; // R petal on RGB LED module connected to digital pin 11
int greenPin = 9; // G petal on RGB LED module connected to digital pin 9
int bluePin = 10; // B petal on RGB LED module connected to digital pin 10
byte com = 0; //reply from voice recognition

void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
pinMode(redPin, OUTPUT); // sets the redPin to be an output
pinMode(greenPin, OUTPUT); // sets the greenPin to be an output
pinMode(bluePin, OUTPUT); // sets the bluePin to be an output
delay(2000);
Serial.write(0xAA);
Serial.write(0x37);
delay(1000);
Serial.write(0xAA);
Serial.write(0x21);
}

void loop() // run over and over again
{

while(Serial.available())
{
com = Serial.read();
switch(com)
{
case 0x11:
color(255,255,255); // turn RGB LED on -- white
break;

case 0x12:
color(255, 0, 0); // turn the RGB LED red
break;

case 0x13:
color(0,255, 0); // turn the RGB LED green
break;

case 0x14:
color(0, 0, 255); // turn the RGB LED blue
break;

case 0x15:
color(0,0,0); // turn the RGB LED off
break;

}
}

}

void color (unsigned char red, unsigned char green, unsigned char blue) // the color generating function
{
analogWrite(redPin, red*102/255);
analogWrite(bluePin, blue*173/255);
analogWrite(greenPin, green*173/255);
}

Upload the code above to Arduino. Please disconnect TX and RX while uploading code because uploading would occupy serial interface.

Product list

Voice2-2.jpg
1、Voice recognition Module x1

2、 USB-TTL module

3、Mic x1

4、1 pin cable x5

Document

The Manual:File:Voice Recognize manual.pdf

How to buy

Click here to buy Voice Recognition Module