Talk with your Arduino Board using with Voice Recog...



In this tutorial we will learn how to talk with the Arduino Board. For this we will use the Voice Control Module. So, we can use this module to control motors, lights and robots.

Also, we will use software for record our voice commands. I used the Access Port Software for send HEX commands from Windows to the USB module.
MAC users can use the CoolTerm Software for the record commands.

----------

Required Hardware:

Arduino Board - https://goo.gl/Rqc5w2
Voice Module - https://goo.gl/J18ChT
USB to TTL Module - https://goo.gl/hRsKP0
Servo Motor - https://goo.gl/jQJZlG
Jump Wires - https://goo.gl/n5ljN3

Mid-year Promotion -- https://goo.gl/CreUkc
Arduino & DIY Kits -- https://goo.gl/uwr19e
Flash deals Electronics -- https://goo.gl/qyy5EB
Arduino Basic Starter Kit -- https://goo.gl/Tb7dfq
Recommended Site -- https://goo.gl/V9nYtx


Software:

Access Port for Windows users - https://goo.gl/58BBMG
CoolTerm for MAC users - https://goo.gl/uMPFWS

----------

Geeetech Voice Recognition Module With Microphone

This Geeetech Voice Recognition Module, which can recognize as much as 15 voice instruction and be suitable for most cases involving voice control.
It receives configuration commands or responds through serial port interface. With this module, we can control cars or other electrical devices by voice.
It can store 15 pieces of voice instruction. Those 15 pieces are divided into 3 groups, with 5 in one group.

Features:

Voltage: 4.5-5.5V
Current: Less than 40mA
Digital Interface: 5V TTL level UART interface

Package includes:

1 x Geeetech Voice Recognition Module
1 x Microphone
5 x 30cm 1pin female to female jumper wire

----------

USB To TTL / COM Converter Module

Feature:

Built-in USB to RS232 Transfer chip
Designed to be used for USB to TTL electronic projects
TTL interface output, easy to connect to your MCU
Status LED.
Dual 3.3V and 5V Power output, work with 3.3v and 5v target device

----------

Connection the Voice Module to the USB TTL Module

The Voice module TXD pin will be connect to RXD pin of the USB module
The RXD to the TXD
The GND to the GND
The VCC to the +5V

Then plug the microphone of the Voice module and connect the USB module into computer

----------

Download the Software for Record the Voice Commands

I used the Access Port Software for send HEX commands from Windows to the USB module
MAC users can use the CoolTerm Software for the record commands
You can find the download link of the Software in the video description

----------

Use the Access Port Software for the Record

First we must find the Port where the USB module is connected.
Then we go to program settings and select Port.
Also we choose the command type to send.
Then refresh the following HEX selection
We write the aa36 command to start the "common mode" and press the "send" button
Then, we need record some voice commands. For this we should start the recording mode with send "aa11" command
When we see the START text, we start to say any command we want. We will repeat this a few times.
If the commands we say do not match, the software will alert us!
Now I am recording the GREEN command to activate the green LED
When we see FINISH, our first command is recorded.
Then we can record for other commands.
Now I am recording the RED and YELLOW commands to activate the other LEDs
Then I will record the some commands to activate the Servo motor. And I will be complete the Group1
I recorded the TURN command to rotate the Servo Motor 180 degrees. And I recorded the TURN BACK command to rotate the Servo Motor 0 degrees again.
We now have 5 commands for Group1. We must import the voice commands in Group1 with aa21. Otherwise commands will not be stored in the module.


----------

Connection of the Servo

We can use a mini breadboard to duplicate 5 volts and GND
The Servo Signal connect to the PWM 9 pin of the Arduino
The Servo VCC connect to the +5V of the breadboard
The Servo GND connect to the GND of the breadboard

----------

Connection of the Voice Module

The voice module's GND connect to the GND of the breadboard
The voice module's VCC connect to the +5V of the breadboard
The voice module's TX connect to the RX pin of the Arduino
The voice module's RX connect to the TX pin of the Arduino

----------

Connection of the LEDs

The long legs of the LEDs connect to the Arduino's digital pins 2, 3 and 4 respectively
The other legs of the LEDs connect to the GND of the breadboard

----------

Upload the Source Code

Do not forget disconnect the TX and RX pins from the Voice Module when upload the source code

You can see the basic code in below. 
No hardware was added to this code. 
You can add it to run the hardware you want. 
Now I will add servo motor and LEDs. 
The code has of 5 commands. 
You can type the code you want into these commands. 
I will share the basic code with you.

Adding the Servo and the LED to the code

We add library for servo motor
We define the name for the servo motor
We define the pins to which the LEDs connected
We define the pins to which the Servo motor connected
We specify pin mode of LEDs
We set the starting position of the servo motor
Now, we define any function to run of the first command.
The first command is GREEN. So we add the green LED to the first command.
Then we add the red and yellow LEDs respectively
With the fourth command (turn), we turn the servo motor 180 degrees.
With the fifth and last command we return the servo motor to 0 degrees
After upload the code, connect back TX and RX pins to the board

Source Code

byte com = 0;


void setup() {
  
Serial.begin(9600);

Serial.write(0xAA);

Serial.write(0x37);

delay(1000);

Serial.write(0xAA);

Serial.write(0x21);
}

void loop() {

  while(Serial.available()) {

  com = Serial.read();

  switch(com) {

      case 0x11:   //command 1 is for Green LED 

      

      break;

      case 0x12:  //command 2 is for Red LED

      

      break;

      case 0x13:  //command 3 is for Yellow LED

      

      break;

      case 0x14:  //command 4 is for Servo motor
      
      

      break;

      case 0x15:  //command 5 is for Servo Motor
      
      

      break;

            }
      }
}