Introduction: VRBOT (Voice Recognition Robot)
In this Instructable we'll make a robot (more like a RC car) which is controlled by voice i.e. Voice Recognition. Before I start to give you any further details one must know that this is Voice Recognition and not Speech Recognition that means the controller does not understands what you are speaking. This project uses a elechouse VR3 module which sends data to the 2 and 3 digital pins of Arduino . It also has a HC-SR04 sensor for the autopilot mode. This VRBOT works as follows:
- First I train the module with some specific commands like "FORWARD" ,"BACKWARD" etc.
- Than by using simple switch_case construct I program the Arduino in such that if it (VR module) receives the same command it gives arduino a value that is compared with the existing values int the memory.
- If the condition falls true than a set of specific commands is executed.
- e.g FORWARD makes the VRBOT to move forward.
There are only 4 commands in this project but you can have max 80 commands. Those 4 are
- "Autopilot" (this commands activates the sensor and VRBOT becomes an obstacle avoiding robot, this function has some glitches due to the inaccuracy of the HC-SR04 module)
Do not forget to click vote. And thank you for reading my instructable.
If you are making one than its assumed that one has a basic knowledge of Arduino and it IDE basic.
I am doing a small giveaway (by small I mean only 2) of arduino board. I was thinking of a big project and ordered 3 arduino's (but later I aborted the idea and made this with only one Arduino) so I thought to keep one with myself and give2away. To enter just comment VRBOT. (and do not forget to vote/like/subscribe but that is not the part of giveaway).
Step 1: Parts:
Believe me this step is really a formality because if you are making a VRBOT for yourself than you know very well that you'll need motors, wheels, batteries, Arduino. But those who are knew may take a moment to read this step.
- Arduino (The sole of any DIY smart car or robot we'll talk about this later)
- Voice Recognition module (Any, but VR V3 is recommended)
- Li-Ion cells
- Motors (If building a large size use low RPM motors)
- L293D motor driver (ic or module)
- HC-SR04 (if you don't want your robot to bang his head against walls)
- White LED's (driving at night without headlight is quite risky)
These were the main parts some tools may be helpful:
- Soldering Iron
- Hot Glue
- Male to Female wires (that's what they call it)
- Wire Strippers
- Male Pins
- Alligator Clips
Don't forget to buy or make a chassis
Step 2: Chassis
To make the Chassis (although the body looks more like a plank than like a chassis) you can use any material that you are comfortable with, I have used hardboard because its easy to cut yet it provides rigidity.
Where all the components are placed I have used 2 layers of hardboard so that it doesn't bends. Cut the hardboard and give it any shape that you want.
Now paint it!
Step 3: Making L293D
If you have brought a module good set it up and skip this step.
And if you have the IC and the specific tools follow this step.
The schematic of L293D IC is given in the image you just have to solder the wires appropriately.
For more details go here:
Step 4: Attaching the Motors and L293D
Glue the motors or attach them with rivets on the hardboard thereafter with male to female wires join them to L293D IC. Stick the IC with double sided tape
TIP: If you are making one of your own do not use this chassis design because in this design when one turns the robot than the only motors due to which it turns are the back ones.
Connect the motors to the L293D ic as mentioned in the schematic in the previous step.
Step 5: The Voice Recognition
This is the most important step. First we will do the connections thereafter programming. There are two sub steps of this step.First involves the saving of a 2D array of specific tone and amplitude i.e. recording your voice or training the Voice Recognition module.(If new to arduino than install the software needed for arduino)
- TX pin of module --Arduino's DP2
- RX pin of module --Arduino's DP3
- Vcc--+5 volt of arduino
After that go to (https://github.com/elechouse/VoiceRecognitionV3) to download all the libraries and sample codes.
After that upload [vr_sample_train] code and open Serial Monitor (it'll guide you ahead) you can speak in any language and make any appropriate wordings as your commands.
After that upload led sample code which turns the LED on when you command it.
Step 6: Programming Arduino
B/W arduino and motors
The motors are connected to the L293D IC's and the sensor pin of L293D is connected in such a way that the motors on one side are in a parallel connection. (because when it turns two motor go backward and two go forward). So you just need to use 4 pins of arduino for motor connections rest of it is written in the code.
Digital Pin 2&3 are reserved for TX and RX pins of module. 4, 5, 6, 7 are for motors. 9 and 10 are for the sensors.
First train your module with commands (Code can access only 4) in order i.e. train1 than train2.
Than upload this code which does the following things:
- Moves forward when forward or command no.0 is executed
- Moves backward when backward or command no. 1 is executed
- Turns when turn command is executed
- Becomes an object avoiding robot when Autopilot command is executed
The connections throughout this instructable are according to the code if you wish you can change the connections by changing them in the code.
Step 7: Attaching HC-SR04
HC-SR04 is an ultrasonic distance sensor that's highly inaccurate. Yes this thing has its own issues therefore its recommended to buy a costly Ping sensor but for cheapness (pun intended) i had made use of HC-SR04.
below are the connections of HC-SR04 and arduino
Upload the same code now. And now when you say 'Autopilot' command it'll become an object avoiding robot.
Step 8: Making a Battery Pack
Connect two Lithium Ion cells in series and its done!
You may provide it a covering of paper or whatever you like.
Note: Li-Ion cells shouldn't be charged with normal chargers use specific chargers only.
Connect it to arduino's Vin and L293d's Vcc. (with alligator clips)
Step 9: Adding Lights
Providing eyes to your robot may not be that difficult but for newbies connect the LED's to the motor with 220-1K resistor(depending on the color). So know when it goes forward LED's light up.
Step 10: Thank You
Thank You for reading. I would be more obliged if you vote for me. And if making one for yourself do let me know. Happy Making!
We have a be nice policy.
Please be positive and constructive.