0% found this document useful (0 votes)
52 views31 pages

1417 Vissvaa RS

This document describes a project to design and implement a voice-controlled robot. A group of students developed a robotic vehicle that can be controlled using voice commands received through an Android application via Bluetooth. The robot is powered by two DC gear motors connected to an Arduino microcontroller. Voice commands are converted to signals by the Bluetooth transmitter and received by the robot's receiver and microcontroller. The robot was designed and tested to complete tasks based on the user's voice instructions. Preliminary training is required for smooth operation. The initial experiments showed the robot performed as intended.

Uploaded by

Tharun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views31 pages

1417 Vissvaa RS

This document describes a project to design and implement a voice-controlled robot. A group of students developed a robotic vehicle that can be controlled using voice commands received through an Android application via Bluetooth. The robot is powered by two DC gear motors connected to an Arduino microcontroller. Voice commands are converted to signals by the Bluetooth transmitter and received by the robot's receiver and microcontroller. The robot was designed and tested to complete tasks based on the user's voice instructions. Preliminary training is required for smooth operation. The initial experiments showed the robot performed as intended.

Uploaded by

Tharun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

DESIGN AND IMPLEMENTATION OF VOICE

CONTROLLED ROBOT

MHB4233 DESIGN PROJECT – I REPORT

Submitted by

SASIDHARAN V (20130002)
VISSVAA RS (20130004)
NOEL INNOCENT (20130009)
SYED NADEEM (20130010)
Under the guidance of
Ms. S.K. INDUMATHI
Dr. R. M. KUPPAN CHETTY
in partial fulfilment for the award of the degree
of
Bachelor of Technology
in

MECHATRONICS ENGINEERING

DEPARTMENT OF MECHANICAL ENGINEERING


SCHOOL OF MECHANICAL SCIENCES
HINDUSTAN INSTITUTE OF TECHNOLOGY AND SCIENCE
PADUR - 603 103
October 2021
HINDUSTAN
INSTITUTE OF TECHNOLOGY & SCIENCE
(DEEMED TO BE UNIVERSITY)
-CHENNAl-

BONAFIDE CERTIFICATE

IMPLEMENTATION
Certified that this project report titled "DESIGN AND
Mr.
OF VOICE CONTROLLED ROBOT" is the Bonafide work of
Mr. VISSVAA (20130004), Mr. NOEL
SASIDHARAN (20130002),
and Mr. SYED NADEEM (20130010) who carried
INNOCENT (20130009)
2021-2022.
out the project work under my supervision during the academic year

SÚPERVISORS 02
HEABOPrAE DEPARTMENT

Dr. D. DINAKARAN
Mrs. S. K. INDUMATHI

Professor and Head Assistantprofessorban chlly


Dr. R. M. KUPPAN CHETTY
Associate Professor
Centre for Automation and Robotics
Centre for Automation and Robotics
Hindustan Institute of Technology and
Hindustan Institute of Technology and Science

Science Padur, Chennai-603103 Padur, Chennai-603103

golo EXTERNA; EXAMINER


INTERNAL EXAMINER
Name: g.k. JNDUm ATH|_ Name: ánanáecor

Designation: Ari) Meu,


Designation: APcs) , ANRO0

Project Viva - voce conducted on - t 0 - 20|


ABSTRACT

Voice signal plays a major role in the communication among human beings.
Robots reduce the human efforts in their day-to-day tasks. In this project, a
voice-controlled robotic vehicle is developed. The human voice commands are
taken by the robotic vehicle through an android application with a micro
controller. The voice signal commands are directly communicated to the robotic
vehicle using Bluetooth. The robotic vehicle is controlled by voice commands
received from the user. The development of the robotic vehicle is carried out
using two DC gear motors associated with micro-controller at the collector side.
The commands from the application are changed over in to computerized
signals by the Bluetooth RF transmitter for a fitting reach (around 100 meters)
to the robot. At the receiver end the information gets decoded by the receiver
and is taken care of to the micro-controller which drives the DC motors for the
fundamental work. The voice-controlled robot is designed and implemented to
reach out the necessary undertaking by paying attention to the commands of the
user. An earlier preliminary meeting is required for the smooth activity of the
robot by the user. A code is utilized for offering guidance to the user.
Performance valuation is carried out with appreciable results of the initial
experiments.

Keywords: Robot, Plan, Voice control, Micro controller, Bluetooth,


Computerization and Performance.
ACKNOWLEDGEMENT

First and foremost, I would like to thank the Lord Almighty for his presence and
immense blessings throughout the project work.

It’s a matter of pride and privilege for me to express my deep gratitude to the
management of HITS for providing me the necessary facilities and support. I am
highly elated in expressing my sincere and abundant respect to the Vice-
Chancellor Dr. S N Sridhara, for giving me this opportunity to bring out and
implement my ideas in this project.

I wish to express my heartfelt gratitude to Dr. D Dinakaran, Professor and


Head, Centre for Automation and Robotics for much of his valuable support
encouragement in carrying out this work.

I would like to thank my guides, Ms. S.K. Indumathi, Assistant Professor and
Dr. R M Kuppan Chetty, Associate Professor, Centre for Automation and
Robotics for continually guiding and actively participating in my project, giving
valuable suggestions to complete the project work.

I would like to thank all the technical and teaching staff of the Centre for
Automation & Robotics, Department of Mechanical Engineering for all the
support. Last, but not least, I am deeply indebted to my parents who have been
the greatest support while I worked day and night for the project to make it a
success.
TABLE OF CONTENTS
CHAPTER
TITLE PAGE NO
NO
ABSTRACT 3
ACKNOWLEDGEMENT 4

LIST OF TABLES 6
LIST OF FIGURES 8
1. INTRODUCTION 9

1.1 Introduction 9

1.2 Problem Statement 9


1.3 Objective of the project 9
2. LITERATURE REVIEW 10

2.1 Introduction 10

2.2 Review of Literature Survey 10


2.3 Summary 12
3. METHODOLOGY 13

3.1 Introduction 13

3.2 Block diagram of BOT 13


3.3 Flowchart of working of the Bot 15
4. HARDWARE COMPONENTS 16
4.1 Components used in BOT 16
4.2 Component Description 16
4.2.1 Arduino Uno 16
4.2.2 Gear motor 17
4.2.3 L293D motor driver 17
4.2.4 Bluetooth Module HC-05 18
5. SOFTWARES 19
5.1 Arduino Uno 19
5.2 Proteus 20
5.3 Bluetooth Voice: Arduino Voice Controller App 20
6. IMPLEMENTATION AND RESULTS 21
6.1 Implementation 21
6.2 Result 21
7. CONCLUSION AND OUTCOME 24
7.1 Conclusion 24
7.2 Future Work 24
7.3 Outcome 25
REFERENCES 26
ANNEXURE 27
PLAGIARISM REPORT 31
LIST OF FIGURES

FIGURE NO. TITLE PAGE NO.

3.1 Block diagram of Bot 13


3.2 Flowchart of the working of Bot 15
4.1 Arduino Uno 16
4.2 Gear Motor 17
4.3 L293D Motor Driver 17
4.4 Bluetooth module HC-05 18
5.1 Bluetooth Voice: Arduino Voice Controller 20
6.1 Circuit Diagram of Voice Controlled Bot 21
6.2 Top view of Voice Controlled Bot 22
6.3 Side view of Voice Controlled Bot 22
6.4 Front view of Voice Controlled Bot 23

8
CHAPTER 1
INTRODUCTION
1.1 OVERVIEW
The rapid growing and advancement of modern technology has yield to the
developments and inventions of modern equipment and machineries. Many
amputate people usually depend on others in their daily life. Nowadays, many
kinds of bots have implemented utilizes the analogue joysticks, touch activated
switches, chin-controlled switches and head-controlled switches. They also
implemented the GUI system to control the bot. In this project, we will develop
control system of the bot movement will be employed by the voice and the robot
will response the commanding persons.

1.2 PROBLEM STATEMENT


• People who are disabled and handicapped and cannot drive their own vehicle.
• Amputated and handicapped people dependent to the other person.
• People who cannot use the GUI and Joystick

1.3 OBJECTIVE OF THE PROJECT


The project aims to achieve the following
• To control the robotic vehicle using human voice
• To integrate mobile application, actuators, and controllers along with wireless
communication to gain good experience at training.
• The Interface between the mobile application and bot is done through via
Bluetooth technology.

8
CHAPTER 2
LITERATURE REVIEW

2.1 INTRODUCTION
In this chapter we are discussing about the previous researches which are focused
on designing and developing of voice-controlled bot. There are many types of
voice control techniques in bot which has been implemented. The sources of this
information are mainly from journals and conference papers.

2.2 REVIEW OF LITERATURE SURVEY


[1] Single-Equipment with Multiple-Application for an Automated Robot-
Car Control System by Saleem Ullah, Zain Mumtaz, Shuo Liu, Mohammad
Abubaqr, Athar Mahboob and Hamza Ahmad Madni (2019). This paper is
deals about the innovative element of the proposed work in this paper the
integration of greater functionalities into vehicles increase the complexity of
car-controlling. The proposed system has capability to identity voice commands
and makes them to move using Bluetooth technology. They have used two
modes of transmission and controlling of the robot car. The first mode is to
control a robot car with an android mobile application when the user presses the
corresponding touch button in mobile application , a signal is transferred to the
micro-controller that is attached to the car through the built-in mobile Bluetooth
device motor module to move the wheels of the robot car accordingly to the
received signal .The second mode is the hand-gesture system in that
accelerometer first senses the acceleration forces from the direction of the hand
and sends them to the micro-controller that is attached to the hand. After
receiving the data, micro-controller converts it into different angles, between 0–
450°, and sends it to the RF receiver of the Arduino Uno that is attached to the
robot car through the RF sender. After receiving the signal, it will process the
data and sends the signal to motor module to move the wheels of the robot car
9
accordingly to the angles.

[2] Voice-Controlled Autonomous Vehicle Using IoT (2019) by Sumeet


Sachdeva, Joel Macwana, Chintan Patela, Nishant Doshia. This paper
deliberates about the concept of Internet of things which can be accessed by any
others part of the world. In this project, the motor will be controlled using voice
commands through google assistant in smartphones. To use the google assistant,
they use the software called “IFTTT”. In this “IFTTT”, we can create the simple
programs to control the devices. They also used the Adafruit.io for storing the
data, viewing the data and control devices.

[3] Design of Voice Controlled Smart Wheelchair (2015) by Ali A. Abed The
motivation behind the project to help the handicapped people and patients to
control the wheelchair using voice commands. In this project, they use new
component called “voice recognition board with HM2007”. This will enable the
system to recognize different voices, inflections and enunciations of the target
word so that it will recognize the different languages .More interesting part in
this project , in order to not respond to some similar words spoken randomly in
an environment, secret voice key is preferred to be a word with complex
pronunciation in order to not pick up by others and also by utter the words twice
in order to respond the system The direction and velocity of the chair are
controlled by pre-defined Arabic voice commands. They have controlled the
direction and velocity of the chair by pre- defined Arabic voice commands.
They have tested and successfully demonstrated with patients for utterance of
Arabic words.

10
[4] Arduino Based Voice Controlled Robot Vehicle by M Saravanan et al
2020 This paper deliberates to create voice controlled robotic vehicle (VCRV) is
to listen and act on the commands of the user. For that, they have developed the
android app AMR voice for the voice control robot using MITA2 app. The
developed app contains the option to connect to Bluetooth module and access
the Bluetooth setting of the phone

[5] Design and Fabrication of a Voice Controlled Wheelchair for Physically


Disabled People by G Azam and M T Islam (2015). The authors have used
CAD/CAE tools to eliminate the early flaws and to improve the quality of the
Wheels and their mechanism. With the combination of these mechanical and
electrical parts, the manual wheelchair is turned to be an electrical wheelchair.
They have utilized a PIC controller manufactured by Microchip Technology to
control the system operations. They have programmed the assembly level code
and stored in controller’s memory. In this project, they have developed a cost
effective and efficient movable and easily controllable Wheelchair that can be
controlled via voice commands. By using PIC, they are controlling the motors
and using voice recognition board to identify the voice commands. It was
allowed to move in a straight line. In voice recognition board, we have to train
the board to recognize the voice. There is no further add upon to their project,
they have calculated the velocity that wheelchair with and without the load.

[6] Obstacle Avoidance and Voice Control Unit for Autonomous Car (2021)
by MA Bhikule, MS Mankame, MS Khot, MY Nhawkar In this paper, the
authors have done new approach in methodology they have included the obstacle
avoidance to their project. when the user is commands move forward to the
robot. But at the same time some objects are in front of robot. The robot can
avoid the way and search another way to move on. They are using the ultrasonic

11
sensor for detection of obstacle. The ability of the machine to receive and
interpret the human voice or to understand and carry out spoken commands can
be concluded as speech recognition.

2.3 SUMMARY
From all the previous methods implemented in the voice controlled based
project we can understand that various methods were used for recognition for
voice. In all these studies we come across a common fact that they used mobile
application for voice recognition

12
CHAPTER 3
METHODOLOGY
3.1 INTRODUCTION
The Voice Controlled bot is designed to provide a mobility to the disability. The
whole process is controlled by the Arduino Uno microcontroller. The user will
control the bot with the mobile application. The mobile application will provide
the user to input their voice to recognize. For adjusting the orientation, they can
use various commands to control the bot

3.2 BLOCK DIAGRAM OF BOT


The aim of the project is to build a bot with voice controlled and of low cost.
The hardware’s implementation has been structured is been selected accordingly
to achieve the goal.

Fig 3.1 Block diagram of BOT

13
a) Arduino Uno: Arduino Uno is the brain of the bot. The microcontroller
board “Arduino at Mega” depends on the Atmega328P microcontroller. It
includes 14 digital input/output pins, where 6 pins are Analog inputs, 6 are
used like PWM outputs, hardware serial ports (UARTs) – 1, a crystal
oscillator of 16 MHz, a power jack, a USB connection, as well as an RST
button. This board will control the motor drivers and Bluetooth module.

b) L293D Motor Driver: L293D motor driver IC is very simple is to drive the
two DC motors simultaneously. This IC works on the principle of Half H-
Bridge. It controls the speed of the motor microcontroller sends the pulse
signals to it accordingly. An L293D has four input pins, four output pins, 2
enable pins, Vss, Vcc and GND.

c) Gear Motor: A gearmotor is an all-in-one combination of an electric motor


and a gearbox. This makes it a simple, cost-effective solution for high-
torque, low-speed applications because it combines a motor with a gear
reducer system.

d) HC-05 Bluetooth module: HC-05 Bluetooth Module is a smooth to use


Bluetooth SPP (Serial Port Protocol) module, designed for obvious wireless
serial connection setup. Its communication is through serial communication
which makes an easy manner to interface with controller or PC. HC-05
Bluetooth module gives switching mode among master and slave mode
which means it capable of use neither receiving nor transmitting records.

e) Power supply: The power supply for the bot will be provided with two
switch mode power supply (SMPS) and a separate small adapter for Arduino
mega. A 3.7V 2000mAh lion battery is used for motor drivers.

14
3.3 FLOWCHART FOR WORKING OF THE BOT
The Voice Controlled bot is designed to get controlled wirelessly by an android
application. The flow of working of the machine is described below,

Fig 3.2 Flowchart of the working of Bot

When the voice-controlled bot is connected to the power supply, the bot gets
initialized. At the initial stage we have connect the Bluetooth module with
mobile application. Once it connected, we will start the commanding the bot by
voice. We have four basic commands which send to microcontroller through
Bluetooth which uses mobile application. Mobile application will process the
input data converted into commanding signal. This signal is processed by
Arduino UNO then signals the motor driver. Gear motors will start rotates
according to signal received from motor driver.

15
CHAPTER 4
HARDWARE COMPONENTS

4.1 COMPONENTS USED IN BOT


Components of the Voice Controlled Bot are chosen to get an efficient output
with a greater accuracy.
• Arduino Uno microcontroller,
• L293D Motor Driver,
• Gear motor,
• Bluetooth module HC-05

4.2 COMPONENT DESCRIPTION

4.2.1 ARDUINO UNO

Fig.4.1 Arduino Uno


Arduino Uno is a microcontroller board and it having 14 output and input
pins, in this 6 pins used as PWM output,6 analog input,1 UARTs 16 having
usb, power jack icsp button and reset button, Vin, Gnd, serial communication,
external interrupts, led can simply connect to a computer and the supply AC
to DC adapter or battery, operating voltage of this boards is 5 volt and the
range of the input will 7 to 12 volts, length of the board is about 68.6 mm and
the width is 53.4, the weight of this is 25 g, comparing to the Arduino Nano it
having more space and more processing, programming of the Arduino Uno
16
can be done in pc with the c programming language and it can transfer to the
Arduino by using USB cables.

4.2.2 GEAR MOTOR

4.2. Gear Motor

A gear motor is an all-in-one combination of an electric motor and a gearbox.


This makes it a simple, cost-effective solution for high-torque, low-speed
applications because it combines a motor with a gear reducer system.

4.2.3 L293D MOTOR DRIVER: -


L293D motor driver IC is very simple is to drive the two DC motors
simultaneously. This IC works on the principle of Half H-Bridge. It controls the
speed of the motor microcontroller sends the pulse signals to it accordingly. An
L293D has four input pins, four output pins, 2 enable pins, Vss, Vcc and GND.

Fig.4.3. L293D motor driver


17
4.2.4 BLUETOOTH MODULE HC – 05

Fig.4.4. Bluetooth module HC-05

HC-05 Bluetooth Module is a smooth to use Bluetooth SPP (Serial Port


Protocol) module, designed for obvious wireless serial connection setup. Its
communication is through serial communication which makes an easy manner
to interface with controller or PC. HC-05 Bluetooth module gives switching
mode among master and slave mode which means it capable of use neither
receiving nor transmitting records.

18
CHAPTER 5
SOFTWARES

5.1 ARDUINO IDE


The Arduino IDE (integrated development environment) is a software
developed by Arduino. cc to assist Arduino microcontrollers. This Arduino IDE
software supports all kinds of Arduino boards like Arduino UNO, Arduino
mega, Arduino micro, Arduino lollypop, Arduino nano, and many more.
The Arduino IDE software supports C and C++ programming languages. This
software is mainly used for writing, compiling, and uploading the code required
for the respective work. Debugging the written code is easier in this software.
The main code in this software is known as the sketch. This software will
automatically generate a hex file after compiling and it will be uploaded to the
Arduino board when the upload option is chosen.
The Arduino IDE software consists of two main parts, Editor and compiler. An
editor area in the software is used to write the required code for the project.
The Arduino IDE software consists of three sections, (1) Menu bar: The bar
located at the top of the window is the menu bar. This contains five options,
File, Edit, Sketch, Tools, Help. In this, the file option contains twelve options
New, Open, Open recent, Sketchbook, Examples, Close, Save, save as, Page set
up, Print, Preferences, Quit. The menu bar also has an option called the Serial
monitor which is used to debug the written code of the respective project. To
use the serial, monitor option, the Arduino board should be connected with the
computer. (2) Text editor: The area below the menu bar is a text editor. (3)
Output pane: the bar located at the bottom of the software is the output pane.
This bar displays the error messages if there are any.
If any components to be integrated with the Arduino board, the library of the
respective component need to be chosen. This can be done using this command,
Sketch -> Include library -> choose the required library.

19
And if I include a servo library, it will appear in the text editor section of the

Software like #include. In Arduino two main coding section is present, (1) Void setup
(): the pin configuration for the components is done in this section. (2) Void loop ():
in this section different kinds of loops will be written with the configured pins to
execute the required operation. Before uploading the compiled code to the Arduino
board, we need to choose the kind of board we are going to use. And also, we need to
choose the required port.

5.2 PROTEUS
The Proteus Plan Suite is an exclusive programming device suite utilized
fundamentally for electronic plan robotization. The product is utilized for the
most part by electronic plan specialists and experts to make schematics and
electronic prints for assembling printed circuit sheets.
It was created in Yorkshire, Britain by Lab center Electronics Ltd and is
accessible in English, French, Spanish and Chinese dialects.

5.3 BLUETOOTH VOICE: ARDUINO VOICE CONTROLLER

DIY Bluetooth voice App is managed tasks with Arduino, raspberry pi, At mega
chips or another micro-controller. It can control from relays to led from your
smartphone.
We are using this app for serial verbal exchange over Bluetooth. This app will
transfer voice commands directly to serial or map your commands to something
you need to send into micro-controller. The app has been examined with Arduino
nano and HC 05.

Fig. 5.1. Bluetooth Voice: Arduino Voice Controller

20
CHAPTER 6
6.IMPLEMENTATION AND RESULT

6.1 IMPLEMENTATION
The “Voice Controlled Bot” could be implemented in the wheel chair and
serving bot. Implementing Bot in a wheel chair could increase the mobility in
disability, due to its low cost, and working with required commands. If we could
implement this bot into hotels, this could increase the chance of job opportunity
for disability people.

6.2 RESULT
The “Voice Controlled Bot” is designed in Proteus Software. The circuit
simulation is designed in Proteus software.

Fig.6.1 Circuit Diagram of Voice Controlled Bot

21
Fig.6.2 Top view of Voice Controlled Bot.

Fig.6.3 Side View of voice controlled Bot

22
Fig.6.4 Front view of voice controlled Bot

When the voice-controlled bot is connected to the power supply, the bot gets
initialized. At the initial stage we have connect the Bluetooth module with
mobile application. Once it connected, we will start the commanding the bot by
voice. We have four basic commands which send to microcontroller through
Bluetooth which uses mobile application. Mobile application will process the
input data converted into commanding signal. This signal is processed by
Arduino UNO then signals the motor driver. Gear motors will start rotates
according to signal received from motor driver.

23
CHAPTER 7

CONCLUSION, FUTURE WORK AND OUTCOME

7.1 CONCLUSION
Human voice is identified the use of a microphone inside the android clever
smartphone. This voice is analyzed and transformed into English phrases using
the android app . Speech reputation is the inter-disciplinary sub-subject of
computational linguistics that develops methodologies and technologies that
permits the recognition and translation of spoken language into text by way of
computers. It is also called computerized speech popularity (ASR) or speech to
textual content (STT). It incorporates expertise and research in the linguistics,
computer technology, and electrical engineering fields.
speech recognition has an extended history with numerous waves of
primary innovations. Most lately, the sphere has benefited from advances in
deep getting to know and massive statistics. The advances are evidenced no
longer handiest by using the surge of instructional papers posted in the
discipline, but more importantly by means of the global enterprise adoption of a
variety of deep studying strategies in designing and deploying speech
recognition systems.

7.2 FUTURE WORK


• To include Internet of Things product offers a completely new direction to robotics.
• To include artificial intelligence in the bot to identify the individual voice of the user
• To include an Object tracking system to track the Objects so that it will avoid the
collision.

24
7.3 OUTCOME
• To Complete the simulation of circuit in Proteus Software.
• A study of pre-existing technology was done successfully.
• Prototype is tested and worked successfully.

25
REFERENCES

[1] Saleem Ullah, Zain Mumtaz, Shuo Liu, Mohammad Abu-Bakr, Athar

Mahboob and Hamza Ahmad Madni, “Single-Equipment with Multiple-


Application for an Automated Robot-Car Control System” Feb-2019.
[2] Sumeet Sachdeva, Joel Macwana, Chintan Patela, Nishant Doshia. “Voice-

Controlled Autonomous Vehicle Using IoT” (2019).


[3] Ali A. Abed, “Design of Voice Controlled Smart Wheelchair” (2015)

[4] M Saravanan et al 2020, “Arduino Based Voice Controlled Robot Vehicle”.

[5] G Azam and M T Islam, “Design and Fabrication of a Voice Controlled

Wheelchair for Physically Disabled People” (2019).


[6] MA Bhikule, MS Mankame, MS Khot, MY Nhawkar, “Obstacle Avoidance

and Voice Control Unit for Autonomous Car” (2021).


[7] M. Meghana et al,2020, Hand gesture recognition and voice-controlled robot .

[8] Abikshit Timsina, Dev Chandra Sharma, Nirmala Sharma, Allen Bhutia,

Sujala Pardhan Voice Command Robotics Car, (2020)


[9] Megalingam R.K., Vadivel S.R.R., Yadav P.K., Nigam K., Geesala R.T.,

Chandra R. (2020), Implementation of Low-Cost Mobile Robot for Rescuing


Challenge. In: In Ranganathan G., Chen J., Rocha Á. (eds) Inventive
Communication and Computational Technologies. Lecture Notes in Networks
and Systems.

26
ANNEXURE

PROGRAM CODE FOR VOICE CONTROLLED BOT

#define led 13
#define m1 4
#define m2 5
#define m3 6
#define m4 7
#define en1 8
#define en2 9

void setup()

{
pinMode(led, OUTPUT);
pinMode(m1, OUTPUT);
pinMode(m2, OUTPUT);
pinMode(m3,OUTPUT);
pinMode(m4,OUTPUT);
pinMode(en1,OUTPUT);
pinMode(en2 , OUTPUT);
Serial.begin(9600);
}

void loop()
{
if (Serial.available())

27
{
String voice = Serial.readString();
Serial.println(voice);
if(voice == "start")

{
Serial.println("start");
digitalWrite(led, HIGH);
delay(1000);
}

else if(voice == "forward")

{
Serial.println("forward");
digitalWrite(en1,HIGH);
digitalWrite(en2,HIGH);
digitalWrite(m1, HIGH);
digitalWrite(m2, LOW);
digitalWrite(m3,HIGH);
digitalWrite(m4,LOW);
}

else if(voice == "backward")

{
Serial.println("backward");
digitalWrite(en1,HIGH);
digitalWrite(en2,HIGH);

28
digitalWrite(m1, LOW);
digitalWrite(m2, HIGH);
digitalWrite(m3, LOW);
digitalWrite(m4, HIGH);
}

else if(voice == "right")

{
Serial.println("right");
digitalWrite(m1, LOW);
digitalWrite(m2, LOW);
digitalWrite(m3, HIGH);
digitalWrite(m4, LOW);

else if(voice == "left")

{
Serial.println("left");
digitalWrite(m1, HIGH);
digitalWrite(m2, LOW);
digitalWrite(m3, LOW);
digitalWrite(m4, LOW);
}

else if(voice == "stop")

29
{
Serial.println("stop");
digitalWrite(led,LOW);
digitalWrite(en1,LOW);
digitalWrite(en2,LOW);
digitalWrite(m1, LOW);
digitalWrite(m2, LOW);
digitalWrite(m3, LOW);
digitalWrite(m4, LOW);
}
}
}

30
PLAGIARISM REPORT

31

You might also like