top of page

CHAPTER

17

ADDING A VOICE RECOGNITION MODULE & CONTROLLING NOVA WITH VOICE

For this tutorial, we will be using a Geeetech voice recognition module with a microphone. Also, in order to program Geeetech module, we will need a USB to TTL converter.

 

You can easily find these modules on common online retailers such as Ebay and Amazon.

 

Below you can find an image of Geeetech voice recognition module.

 

Below is the photo of the USB to TTL converter we have used for this tutorial, but any model would work.

 

002.png
001.png

We will first start by making the connections between USB to TTL converter and the voice recognition module. You can see the table below for connections. Make sure RXD of one module is connected to the TXD of the other.

 

Voice Recognition Module

VCC

GND

TXD

RXD

 

USB to TTL Converter

5V

GND

RXD

TXD

 

 

003.png

We need to download the necessary software on our PC in order to save our voice commands to the module. If you are using Windows, you can download Access Port, and for Mac, you can download CoolTerm.

Access Port for Windows - goo.gl/58BBMG
CoolTerm for Mac             - goo.gl/uMPFWS

For this tutorial, we are going to use Access Port. When you open the software, the interface you will see is as below:

 

acc01.JPG

Now, connect the USB to TTL converter to your PC as shown below.

 

 

004.png

Via "Tools" tab, go to "Configurations". You need to change the baud rate to 9600, select the relevant COM port that your PC has assigned for USB to TTL module (you can check this via Device Manager), and select "Hex Format" for Send Display, and click "OK". 

 

 

acc02.JPG

On the bottom command line screen, select "Hex". You will automatically see "00000000:" appear. Next to it, type "AA 36" and click "Send". You should see on the above screen that the "Common Mode" is activated.

 

 

acc03.JPG

Following this, type "AA 11" and click "Send". Once you have done this, the software will start recording your voice commands. On the screen above, you will see "START". This means that the software is recording your voice and saving it as a command. You have 5 commands to save in the first group.

When you see "START", tell your command to the microphone. If "AGAIN" appears in the screen, wait until "START" appears again, and tell the same command one more time. "Finish one" means the first command was successfully saved. Software will automatically move on with the next command until all 5 commands are saved.

Type "AA 21" and click "Send". This will import the saved audio files to the Geeetech voice recognition module. You will see a notification saying "Group 1 Imported!".

 

 

acc04.JPG

Following this, type "AA 11" and click "Send". Once you have done this, the software will start recording your voice commands. On the screen above, you will see "START". This means that the software is recording your voice and saving it as a command. You have 5 commands to save in the first group.

When you see "START", tell your command to the microphone. If "AGAIN" appears in the screen, wait until "START" appears again, and tell the same command one more time. "Finish one" means the first command was successfully saved. Software will automatically move on with the next command until all 5 commands are saved.

Type "AA 21" and click "Send". This will import the saved audio files to the Geeetech voice recognition module. You will see a notification saying "Group 1 Imported!". You can now disconnect the voice recognition module from your PC.

Now, it's time to open Arduino IDE and start programming Nova.

 

 

voice01.JPG

Place the code lines below before the setup() function as shown above.

#include <Servo.h>

Servo NovaServo_4;

 

byte com = 0;

In the setup() function, place the lines below.

Serial.begin(9600);

NovaServo_4.attach(38);
NovaServo_4.write(90);

 

delay(2000);

 

Serial.write(0xAA);
Serial.write(0x37);

 

delay(1000);

 

Serial.write(0xAA);
Serial.write(0x21);

 

 

 

voice02.JPG

Place the code lines below in the loop() function.

while(Serial.available()) {

 

com = Serial.read();

 

switch(com) {

      case 0x11:   //Command 1 is to make Nova turn left

      NovaServo_4.write(150);
 

      break;

 

      case 0x12:  //Command 2 is to make Nova turn right

 

      NovaServo_4.write(30);

      break;

      case 0x13:  //Command 3

 

      break;

 

      case 0x14:  //Command 4
 

      break;

      case 0x15:  //Command 5
 

     

      break;

 

      }
}

 

You can place simply anything you want Nova to do when it receives the predefined voice commands, between the "case" sections. For this tutorial, we programmed Nova to turn left when it hears our "turn left" command, and to turn right when it hears our "turn right" command.  

 

voice03.JPG
voice04.JPG

Now, we need to make connections between Creoqode Mini Mega and Geeetech voice recognition module. Start by removing the front panel of Nova that covers the joysticks, in order to reach the pins 0 (RX) and 1 (TX).

 

 

 

Creoqode Mini Mega

5V

GND

0 (RX)

1 (TX)

 

 

 

Voice Recognition Module

VCC

GND

TXD

RXD

 

 

 

05p.png

After making the connections, you can nicely fit the voice recognition module behind Nova on the right hand side as shown below.

 

 

 

005.jpg
006.jpg

That's it! You can now repeat the same commands you have recorded on your PC, and Nova should act according to the functions you have defined in your sketch.

If you need to program Mini Mega again, make sure you disconnect TX and RX pins, otherwise Mini Mega will not allow you to upload a new sketch.

 

bottom of page