DIY do it yourself
Master classes, instructions, useful tips, recipes.
» » »Voice Recognition Module

Greetings, dear friends. Finally, I got to recording a lesson on working with the voice module. I see you liked my home-made voice-activated device and many have already begun to wonder when the practical lesson on working with the voice control module will be released.

Voice recognition module

About the advantages of this recognition module:

- The module is autonomous and can work without an external control controller, which is very important for radio amateurs who are not familiar with programming.

- Along with other models, this module compares favorably with functionality, price and relative simplicity in management and connection.

- Has a high recognition ability.

- No smartphone required.

And so let's go! This video will be aimed primarily at beginners, those who are not familiar with programming and interfaces, in general, for ordinary radio lovers. In the video, I will show everything from “A” to “Z”: we will start by installing programs and connecting and end with the concrete result of the module’s autonomous operation.

All the same, we will begin with theoretical knowledge in order to understand how this miracle of engineering still works. First of all, you need to know some of the characteristics of this voice recognition module:

Current consumption: no more than 40 mA, current is not critical, so just keep that in mind. The supply voltage is 5 V, we will power the USB port module of the computer during programming, and then during work you yourself decide what to power from. Voice command recognition accuracy - 99% under ideal conditions. Voice recognition module version V3.1 is able to remember 80 voice commands! Which in my opinion is quite enough for any purpose. But then again this is “BUT”. But a module per unit of time can recognize only seven of any commands, and you can choose which canopy of commands.

Voice recognition module

That is, you can write all 80 commands to the database, but for recognition, select only seven, any seven out of eighty. It’s like with a computer: you can write 80 commands to the hard drive, and in the RAM you can only work with 7 commands. If it’s hard for you to understand now, then a little later in practice, I think, it will become clear to you what this is about. The length of the voice command is 1.5 seconds (1500ms) maximum value. The module board can be controlled via the UART interface, but information can be taken both from the UART and from the GPIO ports located on the board. Actually, what we will do: we will take the signal from the port output.

We pass to the practical part.

What do we need for work?

- Voice recognition module version V3 (V3.1) itself. The version is not so important - the principle of work is the same for everyone. The module comes with a microphone.

- The module manual, that is, the date is shit.

- The program of the terminal.

- Converter USB-UART interfaces.

All links to purchase and download software under the video at the end of the article.

That's all. As Gagarin said - “Let's go.”

Download the manual and terminal. We install the terminal. We connect the module to the interface converter.

Voice recognition module

Be very careful when connecting. It’s not scary if you mix TXD and RXD, nothing bad will happen. But if you mix up the plus power with a common wire - it will be a disaster! As it happened to me - the module and the computer port burned out immediately! Be very careful not to repeat my mistakes. Do not rush, do not rush, check the circuit several times before turning it on, and only then connect to USB.

After connecting to USB, your system will start searching for drivers for the converter, in 90% of cases the system will find the driver and install it, but if for some reason this did not happen, then you will need to find the driver on the network and install it yourself. To do this, in the search bar write “CP2102 driver download” or something like that, the module is common, there are a lot of driver options.

Further, after the successful installation of the equipment, we go to the device manager and look at the ports. We are interested in the assigned number of our converter. When we find out the port number, run the terminal. We go to the settings and set the values ​​as in my picture.

We write a command in the terminal window - “AA 02 00 0A” (from the datasheet | AA | 02 | 00 | 0A |). In all teams, letters are always uppercase and Latin.

The send field should be followed by an answer such as: "AA 08 00 STA BR IOM IOPW AL GRP 0A" (or from the datasheet | AA | 08 | 00 | STA | BR | IOM | IOPW | AL | GRP | 0A |). If the answer came, then everything is fine, the floor is done. If not, we play with the settings for the transmission speed in the terminal, it’s just possible the module is configured for a different speed.

I will not dwell on what this module response means, you yourself can see it in the instructions. And the command is a request for the installed settings.

Voice recognition module

Now you need to connect the load to the module. In the role of the load, I will use LEDs with resistors. Well, in the future, during operation, these LEDs will be replaced by a load control relay with transistor switches, I think this is understandable.

I will explain the team itselfAA 02 00 0A"Is a packet consisting of 4 bytes, bytes are pairwise characters in the hexadecimal system - AA, 02.00.0A. In all commands, the packet will begin with a byte. AA and end with a byte 0A (Zero and A) Is a prerequisite. Module responses will also begin and end with these characters.

«AA 02 00 0A"- the second byte of this command means the number of bytes between the bytes of the beginning and the end, in short except AA and 0A. And all that between them is counted and written in the second byte. As we see in this example, that between AA and 0A there are two bytes - 02 00, therefore - 02, that is, the number considers itself. Another example, "AA 03 20 01 0A"That is between AA and 0A cost three bytes - «03 20 01", Therefore, the second byte is 03. I think you will understand.

Team 12 - configuration of module ports.

On the module board there are ports from which we will take a signal before doing this, you need to configure these ports. You can configure the ports with this command.

"AA 03 12 01 0A" - the third byte is the command, and the fourth is the value of the command. The fourth byte can take the following values ​​and set the following options: if “00” is the pulse mode, that is, when a voice command is recognized, a short pulse is sent to the port we need. If “01” is the inversion mode, that is, when a voice command is recognized, the port we need will change the state to the opposite, if it was 0, it will become 1 and vice versa. If "02" - the mode in which the port goes to zero. If "03" - the mode in which the port goes to one.

Team 20 - configuration of module ports.

"AA 03 20 01 0A" - the third byte is the number of the command that we will write. An example of recording two commands 1 and 2: "AA 04 20 01 02 0A." An example of recording two commands 1, 2, 3: "AA 05 20 01 02 03 0A."

Team 30 - loading a record into the “recognizer” of the module.

"AA 03 30 01 0A" - the third byte is the load command in the memory of the recognition recognizer 01. If you need to write two commands - "AA 04 30 01 02 0A"if you need to record all seven commands - "AA 09 30 01 02 03 04 05 06 07 0A."

Team 15 - Autostart of voice commands to the recognizer when the power is turned on - offline operation without an external controller.

"AA 03 15 07 01 02 03 0A" - the third byte is the command, the fourth byte is the label of the commands, that is, a kind of identifier, and equal to 01 to load one command, 03 to load two teams, 07 to load three teams, and so on, see the datasheet. Well, then come the numbers of the commands that need to be downloaded.

That's all: we checked the connection with the module, configured the ports, wrote down the commands, and configured the startup of voice commands.

Read the rest of the commands in the datasheet. I just explained the approximate type of work with the module.

 

 

Buying Links:

Module - #

Converter - #

Converter with wires - #

 

Download links:

Date Shit - #

Terminal - #

After reading the article, did you understand working with the voice module?


come back
Comments (2)
  1. Artyom
    #1 Artyom Guests December 30, 2016 10:12
    1
    Hello. But can you purchase a ready-made voice control unit for a smart home from you?
  2. Excellent device, Author clever.
    #2 Excellent device, Author clever. Guests Today, 12:09
    0
    I also want to buy a finished device or wait for help in the settings
    respectfully
    Uncle Misha.

Read also

Error codes for washing machines