ME-303 MECHATRONICS
Mini Project Report
Project Title
To Design and Fabricate Voice Controlled Smart Car
Submitted: to
Dr. Nadeem Khan
: by
Submitted
Muhammad Mir Wais (21JZMEC0456)
Muhammad Farhal (21JZMEC0440)
Malaika Liaqat (21JZMEC0423)
Waleed Wahab (21JZMEC0453)
th
Semester: 6
DEPARTMENT OF MECHANICAL ENGINEERING
UNIVERSITY OF ENGINEERING AND
TECHNOLOGY PESHAWAR (JC)
Contents
Background:............................................................................................................................
Objectives:...............................................................................................................................
Task Specification:..................................................................................................................
Application:.............................................................................................................................
Hardware Used:......................................................................................................................
Arduino UNO:.........................................................................................................................
L298N Motor Driver Module:................................................................................................
Specifications of L298N Motor Driver Module....................................................................
TT Gear Motor:.......................................................................................................................
Circuit Diagram:.....................................................................................................................
Project Creating Steps:..........................................................Error! Bookmark not defined.
Actual Code Designed:............................................................................................................
Cost Analysis:........................................................................................................................ 14
Individual Contribution by Each Student:.........................................................................14
Muhammad Mir Wais:............................................................................................................ 14
Waleed Wahab:........................................................................................................................ 14
Malaika Liaqat:....................................................................................................................... 14
Muhammad Farhal:................................................................................................................. 14
Conclusion:............................................................................................................................ 14
Future Improvements:……………………………………………………………………15
2
Title of the Project:
Voice Controlled Smart Car
Background:
The "Voice Control Smart Car" is an advanced automotive innovation that leverages
artificial intelligence and natural language processing to allow drivers to control various car
functions hands-free using spoken commands. This technology enhances safety,
convenience, and accessibility by enabling voice-activated navigation, climate control,
entertainment, communication, and vehicle operations. Rooted in the broader evolution of
smart and connected cars, voice control systems aim to minimize driver distraction and
improve the overall driving experience. Despite challenges such as speech recognition
accuracy and noise interference, the future of voice control in smart cars looks promising
with continued advancements in AI and integration with autonomous driving technologies.
Objectives:
Enhance Driving Safety
Improve Convenience and User Experience
To know about sensors, controllers etc.
Task Specification:
The primary task of the Voice Control Mini-Smart Car is to integrate a reliable and
responsive voice command system that can accurately interpret and execute a wide range of
driver commands. This involves the use of advanced speech recognition and natural
language processing technologies to understand commands related to navigation, climate
control, entertainment, and basic vehicle functions.
The voice control system must be compatible with existing car systems and infotainment
platforms. It should seamlessly integrate with the car's hardware and software, ensuring
smooth communication between the voice assistant and the car's operational components.
A user-friendly interface is essential for the Voice Control Mini-Smart Car, providing clear
visual and auditory feedback to the driver. The system should prioritize safety, ensuring that
voice commands can be given and executed without requiring the driver to look away from
the road or engage in complex interactions. Features like wake word activation, voice
training for personalized recognition.
3
Application:
This device has application in surveying different landscapes and mapping them. It can also
be used in commercial devices like
• Hands-Free Navigation.
• In-Car Entertainment Control.
• Unmanned vehicle driving
• Climate and Comfort Adjustments
• Communication and Connectivity
Hardware Used:
Arduino UNO:
Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started. You can
tinker with your UNO without worrying too much about doing something wrong, worst-
case scenario you can replace the chip for a few dollars and start over again. "Uno" means
one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno
board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino,
now evolved to newer releases. The Uno board is the first in a series of USB Arduino
boards, and the reference model for the Arduino platform; for an extensive list of current,
past or outdated boards see the Arduino index of boards.
Figure 1 Arduino UNO
4
L298N Motor Driver Module:
The L298N motor driver module is a robust and versatile component designed to control
the speed and direction of two DC motors or a single stepper motor in various robotics
and automation projects. It utilizes the L298N dual H-bridge motor driver IC, which
allows for independent control of two motors, enabling bidirectional movement and speed
control through pulse-width modulation (PWM). The module is equipped with heatsinks
to dissipate heat, ensuring stable operation under high current loads. It also features
onboard logic-level converters to interface easily with microcontrollers like Arduino,
providing a simple and efficient way to control motors in DIY and professional
applications.
Specifications of L298N Motor Driver Module
Motor Driver IC: L298N
Operating Voltage: 5V to 35V
Logic Voltage: 5V
Maximum Output Current: 2A per channel (4A total)
Control Mode: Dual H-Bridge
Channels: 2 (can control 2 DC motors or 1 stepper motor)
PWM Control: Supported, allows speed control of motors
Heat Dissipation: Integrated heatsinks for cooling
Protection: Over-temperature and over-current protection
Dimensions: Approximately 43 mm x 43 mm x 27 mm
Input Pins:
o ENA and ENB: Enable pins for motors A and B
o IN1, IN2, IN3, IN4: Control pins for motor directions
o OUT1, OUT2, OUT3, OUT4: Motor output pins
o 12V and GND: Power supply for motors
o 5V and GND: Power supply for logic circuitry (can be connected to
microcontroller’s 5V pin)
Figure 2 L298N Module
5
TT Gear Motor:
• The obstacle detection and avoiding robot uses two 200rpm and 12V DC geared
motors. The motor used has a 6mm shaft diameter with internal holes. The internal
holes are for easy mounting of the wheels by using screws. It is an easy to use
lowcost motor for robotics application.
• An Electric DC motor is a machine which converts electric energy into mechanical
energy. The working of DC motor is based on the principle that when a
currentcarrying conductor is placed in a magnetic field, it experiences a mechanical
force.
• The direction of mechanical force is given by Fleming’s Left-hand Rule and its
magnitude is given by F = BIL Newton. DC motors are seldom used in ordinary
applications because all electric supply companies furnish alternating current.
Figure 3 TT Gear Motor and its Architecture
HC-05 Module:
The HC-05 Bluetooth module is a popular and versatile Bluetooth SPP (Serial Port
Protocol) module designed for wireless serial communication. It is widely used in various
electronics projects, including voice control applications for smart cars, due to its ease of
use and reliable performance.
General Specifications
Bluetooth Standard: Bluetooth V2.0+EDR (Enhanced Data Rate)
Frequency: 2.4 GHz ISM band
Profiles Supported: Serial Port Profile (SPP)
Operating Voltage: 3.3V (with onboard 5V to 3.3V regulator, allowing 5V power
input)
Operating Current: 30 mA (typical), 50 mA (maximum)
6
Figure 4 HC-05 BT
Circuit Diagram:
Figure 5 Circuit Diagram
Actual Code Designed:
#include <SoftwareSerial.h>
SoftwareSerial BT(0, 1); //TX, RX respetively
7
String readvoice;
void setup() {
BT.begin(9600);
Serial.begin(9600);
pinMode(4, OUTPUT);
pinMode(3, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
}
//-----------------------------------------------------------------------//
void loop() {
while (BT.available()){ //Check if there is an available byte to read
delay(10); //Delay added to make thing stable
char c = BT.read(); //Conduct a serial read
readvoice += c; //build the string- "forward", "reverse", "left" and "right"
}
if (readvoice.length() > 0) {
Serial.println(readvoice);
if(readvoice == "*forward#")
{
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);
}
else if(readvoice == "*back#")
{
digitalWrite(3, LOW);
digitalWrite(4, LOW);
digitalWrite(5, HIGH);
digitalWrite(6,HIGH);
delay(100);
}
else if (readvoice == "*left#")
{
digitalWrite (3,HIGH);
8
digitalWrite (4,LOW);
digitalWrite (5,LOW);
digitalWrite (6,LOW);
delay (800);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);
else if ( readvoice == "*right#")
{
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (800);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(100);
}
else if (readvoice == "*stop#")
{
digitalWrite (3, LOW);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}
else if (readvoice == "*keep watch in all direction#")
{
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (100);
}
9
else if (readvoice == "*show me Garba#")
{
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
10
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
11
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
12
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, LOW);
digitalWrite (6, LOW);
delay (400);
digitalWrite(3, HIGH);
digitalWrite (4, HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
delay(600);
digitalWrite (3, LOW);
digitalWrite (4, HIGH);
digitalWrite (5, HIGH);
digitalWrite (6, LOW);
delay (500);
digitalWrite (3, HIGH);
digitalWrite (4, LOW);
digitalWrite (5, LOW);
digitalWrite (6, HIGH);
delay (500);
}
readvoice="";}} //Reset the variable
13
Cost Analysis:
Name of Component Quantity Cost Product:
Arduino 1 1500 1500
TT Gear Motor+ 4 150 600
tires
L298N module 1 230 230
HC-05 BT module 1
Lithium Ion Battery 3 90 270
Jumper Wires 2 100 200
Total Amount RS 3140
Individual Contribution by Each Student:
Muhammad Mir Wais:
• Mechanical Attachment
• Hardware setup
• Buying Components
Waleed Wahab:
• |Mechanical Attachment
• Hardware Setup
• Online search for components
Malaika Liaqat:
• Circuit Design
• Coding
• Project Report
Muhammad Farhal:
• Aesthetics
• Mechanical Attachments
• Project Report
Conclusion:
The "Voice Control Smart Car" project successfully demonstrates the integration of
advanced voice recognition technology with automotive systems to enhance driving safety,
14
convenience, and accessibility. By enabling hands-free control over navigation, climate
settings, entertainment, and communication, this project reduces driver distractions and
provides a more intuitive and enjoyable driving experience. Utilizing components such as
the HC-05 Bluetooth module for wireless communication and the L298N motor driver for
precise motor control, the smart car showcases the potential of merging artificial
intelligence with modern vehicles. This innovation not only caters to the needs of tech-
savvy drivers but also offers significant benefits for individuals with disabilities, paving the
way for a more inclusive and connected future in automotive technology.
Future Improvements:
Speech Recognition Accuracy:
Improve NLP algorithms for better accuracy in diverse conditions.
Offline Voice Processing:
Enable voice control functionality without internet dependency.
Extended Command Set:
Expand and diversify available voice commands.
User Personalization:
Implement AI to learn and adapt to individual user preferences.
Security Enhancements:
Strengthen security measures to prevent unauthorized access.
15