Voice Controlled Car

Published Jul 18, 2020
 2 hours to build
 Intermediate

It is a car that follows vocal command given via smartphone.

display image

Components Used

Ultrasonic Module HC-SR04
Ultrasonic module HC-SR04 is generally used for finding distance value and obstacle detection. It can operate in the range 2cm-400cm.
1
L298N Motor driver
L298N is a high current, high voltage dual full bridge motor driver. It is useful for driving inductive loads.
1
Bluetooth Module HC-05
Bluetooth is a wireless communication protocol used to communicate over short distances. It is used for low power, low cost wireless data transmission applications over 2.4 – 2.485 GHz (unlicensed) frequency band.
1
Arduino UNO
Arduino UNO
1
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
1
Caster Bearing Wheel
Adafruit Accessories 20mm Height Metal Caster Bearing Wheel
1
9V Battery
Consumer Battery & Photo Battery 9V RECTANGLE
1
DC Gearbox Motor
Adafruit Accessories DC Gearbox Motor - TT Motor - 200RPM - 3 to 6VDC
2
Wheel for DC Gearbox Motors
Adafruit Accessories Skinny Wheel for TT DC Gearbox Motors
2
SPDT Slide Switche
Slide Switches Large-sized Type 1P2T
1
Description

How I build the project:

While I started building this car, my first choice for micro-controller was Node MCU, but I wanted to try Arduino, so I went with Arduino UNO R3. Now I had to make a choice between making a separate console for giving vocal inputs or using an android application on our smartphone. I went with the android application as it reduces the hardware cost and also there are many such apps available on play store that are compatible with Arduino (I have given the link below). 

I used an HC05 BT module to connect the Arduino to the smartphone. The app will transfer the commands as text to Arduino via Bluetooth. I have attached an L298N motor driver to control the direction of the car and sync the motors. I have attached two motors and a caster wheel in the front so when the car takes a turn it is a smooth one rather than a sharp one both motors are fixed with small toy wheels. 

Now I am providing Arduino power from a 12 V battery(1.3 Ah, 15.6 Watts). L298N module has to be given power separately from the battery as Arduino I/O pin voltage is limited to 5V. I have also installed an HC SR04 ultrasonic sensor in order to sense any obstacle in the path, in which case Arduino will stop the car. I have attached a switch to power it on and off. 

Circuit Diagram 

Circuit Diagram

This was about the hardware. Now coming to the code. We have used some basic and simple commands("forward", "back", "right", "left", "right and continue", "left and continue", "turn around" and "of" as in "off") to operate this car. Now to explain the turning logic, I programmed it to stop the left wheel to turn left and stop the right wheel when to turn right. I will attach the code in attachments.

link for the application: click here

 

Video

Codes

Downloads

Circuit Diagram Download
Comments
Ad