Hi there...!
Voice recognition technology has been here around the past few years. We still remember the great excitement we had while talking to the first Siri enabled iphone. Since then, voice command devices has grown to a very advanced level beyond our expectations in a very short time. With the introduction of many advanced voice recognition systems there came many other voice assistants like the Google assistant and the Amazon Alexa. The rapid success of Amazon’s Echo alone proves that we are gradually coming to terms with talking to machines.
So let's start from the basics. In this instructable i'll give you an introduction about the Elechouse V3 Voice Recognition Module and how to turn on/off an LED using voice commands. There are several other ways to implement voice recognition in your project, right from an android phone to Alexa or Raspberry pi or some other tech. But i got several messages from many of my friends asking me how to use this specific module with Arduino. So i'm writing this instructable as a basic tutorial for the Elechouse V3 module. I wanted to make this instructable as simple as possible for beginners, so we won't be discussing the complete features and functions of the module, but at the end, i'm sure you'll get some pretty cool ideas for your next project.
Elechouse V3 is one of the most compact and easy-to-control voice recognition module in the market.
There are two ways for using this module, using the serial port or through the built-in GPIO pins. The V3 board has the capacity to store up to 80 voice commands each with a duration of 1500 milliseconds. This one will not convert your commands to text but will compare it with an already recorded set of voices. So technically there are no language barriers to use this product. You can record your command in any language or literally any sound can be recorded and used as a command. So you need to train it first before you let it recognize any voice commands.
If you're using the module with it's GPIO pins, the module will deliver outputs for only 7 commands out of the 80. For this method you need to select and load 7 commands in to the recognizer and the recognizer will send outputs to the respective GPIO pins if any of these voice commands gets recognized. As we're using this with the arduino, we don't need to bother about the limited features.
The device works at an input voltage range of 4.5 - 5 volts and will draw a current less than 40 mA. This module can work with 99% recognition accuracy if it is used under ideal conditions. The choice of microphone and the noise in the environment plays a vital role in affecting the performance of the module. It's better to choose a microphone with good sensitivity and try to reduce the noise in your background while giving commands to get the maximum performance out of the module.
Now let's talk about the connections to be made.
Hardware required :
Connecting the Module to Arduino
The LED is connected to the digital pin 13 of the Arduino as defined in the sample code. Connect a 470 ohms resistor in series to the LED.
Plug the microphone in to the 3.5 mm jack in the board. Solder it to the mic pins in the module if it doesn't come with a 3.5 mm plug.
That's all it is about the connections. Now let's have a look at the code.
All the codes and libraries mentioned here are open-source and the credits for developing them goes to their respective authors.
You should download and install the "voicerecognitionv3.h" Arduino library before you could use the module with an Arduino.
Download the library from here.
All the codes we need are there in the library zip file as example programs.
Training the V3 Module.
As I've mentioned above, we must train the module before we can use it for voice recognition. Follow these steps to train the module.
Controlling the LED using Voice Commands.
Change the value of "offrecord" to the address of the voice command which you've trained to turn OFF the LED.
Now upload the code to the Arduino. (Ctrl+U)
That's all it is. Now you're ready to control your LED with voice commands.
To test the circuit, speak up the commands just as you trained it to turn ON/OFF the LED. Remember, the quality of your microphone and the noise around your environment will really affect the output. Try testing it in a noise free environment or change the microphone if you're not getting a proper response for your voice commands. Also open the serial monitor to check if the device is responding to your voice commands. If a command gets recognized, the serial monitor will show a message with the address of the recognized command.
Congrats! You've learned to control an LED using voice commands. Now you can convert any such device in to a voice controlled device. Connect a relay module to the Arduino to control AC devices like a light bulb or a fan.
There are numerous possibilities to apply this in our daily life. Share your thoughts in the comments section below.
I hope this instructable has given you a basic idea about using the Elechouse V3 Voice Recognition module with Arduino. If you've any questions, feel free to ask it here or send a mail to [email protected]. I'll try my best to help you out.
Happy Making...!
Thank You...!