We all know that there is some kind of module that can control the light on and off by voice. If you make a sound, the light will turn on. Then after a while the light 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 been 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 many as 15 voice instructions, which is suitable for most cases involving voice control.
- Digital Interface: 5V TTL level UART interface
- Analog Interface: 3.5mm mono-channel microphone connector + microphone pin interface
- 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-dependent. If your friend speaks the voice instruction instead of you, it may not identify the instruction. Sample Recording Instructions
1. Controlling RGB using voice instructions
We need to send serial command to this module. You may need a USB-TTL module (Product Page) to connect it with PC. Send command 0xaa11 to record. Please refer to the manual for more information.
Please record the following voice instructions in order:
Then send command 0xAA21 to import group 1.
2. Hardware Connection
+D12int 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
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
void loop() // run over and over again
com = Serial.read();
color(255,255,255); // turn RGB LED on -- white
color(255, 0, 0); // turn the RGB LED red
color(0,255, 0); // turn the RGB LED green
color(0, 0, 255); // turn the RGB LED blue
color(0,0,0); // turn the RGB LED off
void color (unsigned char red, unsigned char green, unsigned char blue) // the color generating function
Upload the code above to Arduino. Please disconnect TX and RX while uploading code because uploading would occupy serial interface
After uploading is done, connect RX and TX, and then press RESET button on Arduino.