0% found this document useful (0 votes)
18 views51 pages

PRG-14-Android Controlled Arduino Robot Car

Robot car

Uploaded by

Vikesh Kumar
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)
18 views51 pages

PRG-14-Android Controlled Arduino Robot Car

Robot car

Uploaded by

Vikesh Kumar
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/ 51

A

Project Report
on

Android Controlled Arduino Robot Car


Submitted to

Sant Gadge Baba Amravati University, Amravati

Submitted in partial fulfilment of


the requirements for the Degree of
Bachelor of Engineering in
Electronics and Telecommunication Engineering

Submitted by

Mr. Hardik Motghare Mr. Abhijit Palkar


(PRN: 193120109) (PRN: 203120437)
Mr. Pratik Dhole Mr. Shubham Sharma
(PRN: 203120441) (PRN: 203120431)

Under the Guidance of


D. L. Bhombe
Professor, E & TC Dept.

Department of Electronics & Telecommunication Engg.


Shri Sant Gajanan Maharaj College of Engineering,
Shegaon – 444 203 (M.S.)
2022-2023
i

Abstract

The project aims to design an android interface, Arduino bot and to write the program into
the Arduino microprocessor. Arduino car contains Arduino UNO microcontroller with
basic mobility features. Arduino programs contains instructions mediating between
android controller and Arduino car. Android mobile controller uses different mobile
sensors to supervise motion. An appropriate program in the Arduino microprocessor to
interact with the android controller has to be created. The program has been successfully
complied through Arduino IDE & uploaded in to it after proper checking of logic to
decrease any loss/damage of hardware. We have to create an android application that will
provide user an interface to interact with the Arduino powered car. The interface is easy to
use and provide feedback from the Arduino microprocessor through the Bluetooth after
giving instruction to Arduino for various actions through interface via Bluetooth module.
The android application is to be created with the help of android studio that provide us with
more capability & stability. After performing these procedures we have tested this project
thoroughly and rectified the maximum no. of errors & wrong logic found in the
microcontroller program. The Arduino Car has been designed and tested and found
working satisfactorily and we can firmly say that we have been able to create the project
as per our goal described.
ii

Acknowledgement

We would like to take this opportunity to express our heartfelt thanks to our guide Prof.
D.L. Bhombe for his esteemed guidance and encouragement, especially through difficult
times. His suggestions broaden our vision and guided us to succeed in this work. We are
also very grateful for his guidance and comments while designing part of our project and
learnt many things under his leadership. Also we would like to thank to Dr. M. N.
Tibdewal, Head of Electronics and Telecommunication Department, all teaching and non-
teaching staff of EXTC Department for their encouragement and suggestions for our
project.

We extend our thanks to Dr. S. B. Somani, Principal, Shri Sant Gajanan Maharaj, College
of Engineering, for his valuable support.

We sincerely thank to all our friends, who helped us directly or indirectly in completing
our project work. We would like to express our appreciation for the wonderful experience
while completions of this project work.

Mr. Hardik Motghare

Mr. Abhijit Palkar

Mr. Pratik Dhole

Mr. Shubham Sharma


iii

Abbreviations

RC - Remote Control

DC - Direct Current

SDK - Software Development Kit

GSM - Global System for Mobile Communication

Wi-Fi - Wireless Fidelity

WLAN - Wireless Local Area Network

PAN - Personal Area Network

ASCII - American Standard Code for Information Interchange

ATMEL - Advanced Technology for Memory and Logic

IDE - Integrated Development Environment

GUI - Graphical User Interface

IC - Integrated Circuit

LED - Light Emitting Diode

SRAM - Static Random Access Memory

EEPROM - Electrically Erasable Programmable Read-Only Memory

USB - Universal Serial Bus

USART - Universal Synchronous Asynchronous Receiver Transmitter

mAh - Milli Ampere Hour

RPM - Rotation Per Minute

PWM - Pulse Width Modulation


iv

List of Figures

Figure Page No.

Figure 3.2: Block Diagram 6

Figure 3.3: Circuit Diagram 7

Figure 3.4: Arduino IDE 9

Figure 3.5: Arduino Uno 10

Figure 3.6: Arduino Uno connections 13

Figure 3.7: HC-05 Bluetooth Module 14

Figure 3.8: Bluetooth communication between devices 15

Figure 3.9.1: Pulse Width Modulation(PWM) Technique 17

Figure 3.9.2: Motor driver module L298N 18

Figure 3.10: Voltage Drop of L298N 19

Figure 3.11: Micromors and Grippy Wheels 20

Figure 3.12: Jumper Wires 21

Figure 3.13: Batteries 22

Figure 3.14: Switch 23

Figure 3.15.1: Smartphone with app 24

Figure 3.15.2: Application Interface 25

Figure 4.1: Connecting Motor Driver Module to an Arduino 27

Figure 4.2: Flow diagram to control robot car with mobile-application 28

Figure 6.2: Working Explanation 36


v

List of Tables

Table Page No.

Table 6.2: Table of 5 conditions for directions 35


vi

Contents

Abstract i
Acknowledgement ii
Abbreviations iii
List of Figures iv
List of Tables v
Contents vi
1. Introduction 1
1.1. Purpose of Plan 2
1.2. Project Objectives 2
1.3. Project Goals 2
1.4. Scope of Definition 3
2. Literature Review 4
3. Hardware Requirements and Specifications 6
3.1. Components Required 6
3.2. Block diagram and working principle 6
3.3. Circuit Diagram 7
3.4. Arduino IDE 8
3.5. Arduino Uno 10
3.6. Arduino Uno Features and Pin Configuration 11
3.7. HC-05 Bluetooth Module 14
3.8. Bluetooth Communication Between Devices 15
3.9. Motor Driver Module L298N 16
3.10. Voltage Drop of L298N 19
3.11. Micromors and Grippy Wheels 20
3.12. Jumper Wires 21
3.13. Batteries 22
3.14. Switch 23
3.15. Smartphone with app 24
3.16. RC Module 26
vii

4. Design and Implementation 27


4.1. Wiring L298N Motor Driver Module to Arduino UNO 27
4.2. Flow diagram to control robot car with mobile-application 28
5. Source Code of Arduino Car 29
5.1. Source Code for Arduino UNO 29
6. Result & Analysis 32
6.1. Resultant and Analysis 32
6.2. Working Explanation 33
6.3. Limitations 37
6.4. Applications 37
6.5. Advantages 37
7. Conclusion & Future Scope 38
7.1. Conclusion 38
7.2. Future Scope 40
References 41
Android Controlled Arduino Robot Car

Chapter 1
INTRODUCTION

This is an Arduino based, Bluetooth controlled RC car. It is controlled by a smart phone


application. Bluetooth controlled car is controlled by using Android mobile phone
instead of any other method like buttons, gesture etc. Here only needs to touch button
in android phone to control the car in forward, backward, left and right directions. So
here android phone is used as transmitting device and Bluetooth module placed in car
is used as receiver.
Android phone will transmit command using its in-built Bluetooth to car so that it can
move in the required direction like moving forward, reverse, turning left, turning right
and stop.
Smartphone has quite changed the traditional ways of human to machine interaction.
Smartphone is now a vital part of a person’s life. Android is a software platform for
mobile devices that includes an operating system, middleware and key applications.
Android is a safe and secure operating system. All of its essential tools are combined
in software called SDK which stands for Software Development Kit. We know that all
manual operations have been replaced by automated mechanical operations. Our main
objective of writing this paper is to develop an Android app for controlling the robot
using Bluetooth. Bluetooth is used for its various advantages over other wireless
technologies. Hardware technology utilized in smart phones has also greatly improved.
Hence, we can say that Android smartphones will serve a great benefit for industrial,
commercial and other general purpose applications.
The DC motors are widely used for providing variable speed drive system in industrial
applications resembling automation, electrical traction, military instrumentality, fixed
disk drives, thanks to their high potency, noise-free operation, compactness,
dependability and low maintenance and cost. Many connection technologies are used
nowadays such as GSM, Wi-Fi, WLANs and Bluetooth. Every technique has its own
distinctive characteristics and applications.
Among these wireless connections, Bluetooth technology is usually enforced. The
system hardware consists of a controller equipped with Bluetooth communication
module. It’ll be connected to the motors and other alternative components of car. When
the robot app is turned on and is connected with the current system via Bluetooth, one

SSGMCE, Shegaon 1
Android Controlled Arduino Robot Car

will operate the car by giving wireless commands from the app using the functions
already programmed in the app. The vehicle will move all four told directions: left,
right, front and back.
For forward movement, movement of both the motors will be in the same direction and
for backward motion; movement of the motors will be in opposite direction. For left
and right movements, either of the motors will rotate and to stop both the motors will
stop. Instructions are given to the motors through the mobile app by the user.

1.1 Purpose of Plan

As most of the work in this area has been done regarding the Arduino & its application,
what left out most of the time is the Android controller. In this project we are trying to
exploit the android open accessory Bundle so that we can give
a) More realistic experience to the user.
b) Better Connectivity to the Arduino Chip.
c) Increasing the efficiency in controlling of Bot.

1.2 Project Objectives

In this project we will be constructing the android guided Arduino Car by extracting
the powers of both the open-source technologies- Android and Arduino Programming.

1.3 Project Goals

 To develop an android application that will provide user an interface to interact


with the Arduino powered car.
 To develop an appropriate program in the Arduino microchip to interact with
the android controller.
 To compile all the developed modules that we constructed above.
 To produce Arduino car that is controlled by android phone remote which can
be used in various fields, like defence, scientific expeditions and so on.

SSGMCE, Shegaon 2
Android Controlled Arduino Robot Car

1.4 Scope of Definition

The project is limited to designing an android interface, Arduino bot and write program
in to the Arduino microprocessor. Arduino car contains Arduino microcontroller with
basic mobility features. Arduino programs contains instructions mediating between
android controller and Arduino car. Android mobile controller uses different mobile
sensors to supervise motion.

SSGMCE, Shegaon 3
Android Controlled Arduino Robot Car

Chapter 2
LITERATURE REVIEW

Wireless control is one of the most important basic needs for all people all over the
world. Bluetooth is one of the most used wireless technologies. A Bluetooth control car
is such a car that can be controlled wirelessly using a Bluetooth control system and
Arduino. With the combination of Arduino, and Bluetooth we can control many other
things, like home Lighting, air conditioners, and many more through our cell phones.
The Arduino can also contribute at large to the Smart Home system. Nowadays it has
made us easier to convert digital signals into physical movements with such
microcontrollers.
Today people are using automation in every sector. There are many benefits, for
example, it reduces the risk of injury, it is fast, it can work day long, it is reliable, etc.
This Bluetooth control car is just an example of automation. This type of car is used in
law enforcement and military engagements for some the reasons like Hazard exposure
which is controlled from a location of relative safety. Such vehicles are used by many
police department bomb squads to defuse or detonate explosives.
These vehicles are also used in space exploration, by using such vehicle NASA. ESA
and ROSCOSMOS have explored and collected many data from space, the moon, and
mars. In recent days giant companies are using remote control vehicles to deliver their
products. And Many of the giant factories have their transportation which is remotely
controlled.
Here we have connected this 4-wheeler with Arduino and Bluetooth Module/ There is
an Android application that is already installed in the remote device. We send our
instruction to the vehicle with that application, that application is connected with the
module in the vehicle. Bluetooth module transfer that instruction as a signal to the
Arduino, and Arduino works with that signal. In the Arduino, we have installed the
code which can work with the signals and convert those instructions to the pre-defined
signals. Signals were transferred to the motors, and the car started running.
This car does not have advanced features but we can attach any kind of features like
line detecting, or obstacle detecting, even though we can attach the camera to the
vehicle and watch it with the remote. This one is just a basic prototype of a remote-

SSGMCE, Shegaon 4
Android Controlled Arduino Robot Car

control car, we can add a lot of advanced features and get an armed/especially capable
RC Car.
This project aimed to design an automated vehicle prototype built with Arduino and
controlled with software developed on Android that can perform manual or automatic
paths. Until now research and analyzing the simulation of experiments shown, it is
believed that it is feasible to use the prototype designed for cognitive development, for
future users can learn to insert custom paths that can process logic issues and more
complex mathematics allowing the prototype to perform the desired movements.
Analyzing the financial costs of design, it is believed that it is feasible to construct this
type of prototype because it presents a low cost of the components used, particularly if
they are chosen in a largescale production. It is worth noting that both the Arduino
programming language and the language for Arduino in development are free, not
burdening additional costs for the development of the project, pointing out that this
applies also to the tools used for development. [10]

SSGMCE, Shegaon 5
Android Controlled Arduino Robot Car

Chapter 3
HARDWARE REQUIREMENTS AND SPECIFICATIONS

3.1 Components Required


1. Arduino UNO
2. HC – 05 Bluetooth Module
3. Motor Driver L298N
4. Jumper Wire
5. Drilling Machine
6. Soldering Gun
7. 4 X 5V Geared Motors
8. Connecting Wires
9. Battery holder
10. Power Supply
11. Android Phone
12. Bluetooth Controller App

3.2 Block diagram and working principle

Figure 3.2: Block Diagram

SSGMCE, Shegaon 6
Android Controlled Arduino Robot Car

The Block Diagram of our system consists of a Bluetooth module, an Arduino kit and
a couple of motors for driving the car.
The android application controlled robot communicates via Bluetooth to the Bluetooth
module present on the robot. While pressing each button on the application,
corresponding commands are sent via Bluetooth to the robot.
The commands that are sent are in the form of ASCII. The PIC on the robot then checks
the command received with its previously defined commands and controls the DC
motors depending on the command received to cause it to move forward, backward,
left, right or to stop. Thus allowing us to create an android controlled robot.

3.3 Circuit Diagram

The circuit diagram is shown below :-

Figure 3.3: Circuit Diagram

SSGMCE, Shegaon 7
Android Controlled Arduino Robot Car

Here at first we construct the circuit as shown in Figure 2.3 Then through the data cable
we insert the commands in the microcontroller ATMEGA 328P (UNO). These
commands help the microcontroller to interface with the Bluetooth module HC05 and
also with the motor driver L293D.
Here the Bluetooth module act as a receiver which receives the instruction from the
smart phone (remote or transmitter). Then the microcontroller decides the operation for
the instruction which is coming from the smart phone. The functions of the given
instructions are operated by the microcontroller. The instructions are sent by the smart
phone. We can easily control the movements of the dc motor.

3.4 Arduino IDE

The Arduino integrated development environment (IDE) could be a cross-platform


application written in Java, and derives from the IDE for the process programing
language and also the Wiring projects. It’s designed to introduce programming to artists
and different newcomers unfamiliar with code development. It includes a code editor
with options like syntax highlighting, brace matching, and automatic indentation, and
is additionally capable of compilation and uploading programs to the board with one
click. A program or code written for Arduino is named a "sketch".
Arduino programs are written in C or C++. The Arduino IDE comes with a code library
referred to as "Wiring" from the first Wiring project that makes several common
input/output operations a lot of easier. The users would like solely to outline 2 functions
to create a possible cyclic government program:
setup (): a function run once at the beginning of a program that may initialize settings
loop (): a function referred to as repeatedly till the board powers off+ programming
languages.

SSGMCE, Shegaon 8
Android Controlled Arduino Robot Car

Figure 3.4: Arduino IDE

SSGMCE, Shegaon 9
Android Controlled Arduino Robot Car

3.5 Arduino Uno

The Arduino Uno is an open-source microcontroller board based on the Microchip


ATmega328P microcontroller and developed by Arduino.cc. The board is equipped
with sets of digital and Analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. [1]. The board has 14 digital I/O pins (six
capable of PWM output), 6 Analog I/O pins, and is programmable with the Arduino
IDE (Integrated Development Environment), via a type B USB cable. It can be powered
by the USB cable or by an external 9-volt battery, though it accepts voltages between
7 and 20 volts. The Uno board is the first in a series of USB-based Arduino boards; it
and version 1.0 of the Arduino IDE were the reference versions of Arduino, which have
now evolved to newer releases. The ATmega328 on the board comes pre-programmed
with a bootloader that allows uploading new code to it without the use of an external
hardware programmer. There are many versions of Arduino boards introduced in the
market like Arduino Uno, Arduino Due, Arduino Leonardo, Arduino Mega, however,
most common versions are Arduino Uno and Arduino Mega.

Figure 3.5: Arduino Uno

SSGMCE, Shegaon 10
Android Controlled Arduino Robot Car

3.6 Arduino Uno Features and Pin Configuration

Uno means one in Italian, as uno is the first microcontroller of arduino family.
Features of Arduino Uno:-
 The operating voltage is 5V
 The recommended input voltage will range from 7v to 12V
 The input voltage ranges from 6v to 20V
 Digital input/output pins are 14
 Analog I/P pins are 6
 DC Current for each input/output pin is 40 mA
 DC Current for 3.3V Pin is 50 mA
 Flash Memory is 32 KB
 SRAM is 2 KB
 EEPROM is 1 KB
 CLK Speed is 16 MHz

Power Supply
The Arduino Uno power supply can be done with the help of a USB cable or an external
power supply. The external power supplies mainly include AC to DC adapter otherwise
a battery. The adapter can be connected to the Arduino Uno by plugging into the power
jack of the Arduino board. Similarly, the battery leads can be connected to the Vin pin
and the GND pin of the POWER connector. The suggested voltage range will be 7 volts
to 12 volts.

Input & Output


The 14 digital pins on the Arduino Uno can be used as input & output with the help of
the functions like pinMode(), digitalWrite(), & Digital Read().

Pin1 (TX) & Pin0 (RX) (Serial): This pin is used to transmit & receive TTL serial
data, and these are connected to the ATmega8U2 USB to TTL Serial chip equivalent
pins.

Pin 2 & Pin 3 (External Interrupts): External pins can be connected to activate an
interrupt over a low value, change in value.

Pins 3, 5, 6, 9, 10, & 11 (PWM): This pin gives 8-bit PWM o/p by the function of
analogWrite().

SPI Pins (Pin-10 (SS), Pin-11 (MOSI), Pin-12 (MISO), Pin-13 (SCK): These pins
maintain SPI-communication, even though offered by the fundamental hardware, is not
presently included within the Arduino language.

SSGMCE, Shegaon 11
Android Controlled Arduino Robot Car

Pin-13(LED): The inbuilt LED can be connected to pin-13 (digital pin). As the HIGH-
value pin, the light emitting diode is activated, whenever the pin is LOW.

Pin-4 (SDA) & Pin-5 (SCL) (I2C): It supports TWI-communication with the help of
the Wire library.

AREF (Reference Voltage): The reference voltage is for the analog i/ps with
analogReference().

Reset Pin: This pin is used for reset (RST) the microcontroller.

Memory
The memory of this Atmega328 Arduino microcontroller includes flash memory-32
KB for storing code, SRAM-2 KB EEPROM-1 KB.

Communication
The Arduino Uno ATmega328 offers UART TTL-serial communication, and it is
accessible on digital pins like TX (1) and RX (0). The software of an Arduino has a
serial monitor that permits easy data. There are two LEDs on the board like RX & TX
which will blink whenever data is being broadcasted through the USB.

SSGMCE, Shegaon 12
Android Controlled Arduino Robot Car

Figure 3.6: Arduino Uno connections

SSGMCE, Shegaon 13
Android Controlled Arduino Robot Car

3.7 HC-05 Bluetooth Module

HC-05 is a Bluetooth module which is designed for wireless communication. This


module can be used in a master or slave configuration. It is used for many applications
like wireless headset, game controllers, wireless mouse, wireless keyboard and many
more consumer applications. It has range up to to <100m which depends upon
transmitter and receiver, atmosphere, geographic & urban conditions. It is IEEE
802.15.1 standardized protocol, through which one can build wireless Personal Area
Network (PAN). It uses frequency hopping spread spectrum (FHSS) radio technology
to send data over air. It uses serial communication to communicate with devices. It
communicates with microcontroller using serialport (USART).

Figure 3.7: HC-05 Bluetooth Module

SSGMCE, Shegaon 14
Android Controlled Arduino Robot Car

3.8 Bluetooth Communication Between Devices

First Send data from Smartphone terminal to HC-05 Bluetooth module and see this data
on PC serial terminal and vice versa. To communicate smartphone with HC-05
Bluetooth module, smartphone requires Bluetooth terminal application for transmitting
and receiving data. You can find Bluetooth terminal applications for android and
windows in respective app store. Before establishing communication between two
Bluetooth devices, 1st we need to pair HC-05 module to smartphone for
communication. First, search for new Bluetooth device from your phone. You will find
Bluetooth device with ― HC-05 name. Second, click on connect/pair device option;
default pin for HC-05 is 1234 or 0000. In smart phone, open Bluetooth terminal
application and connect to paired device HC-05. It is simple to communicate we just
have to type in the Bluetooth terminal application of smartphone. Characters will get
sent wirelessly to Bluetooth module HC-05.

Figure 3.8: Bluetooth communication between devices

SSGMCE, Shegaon 15
Android Controlled Arduino Robot Car

3.9 Motor Driver Module L298N

This L298N Motor Driver Module is a high power motor driver module for driving DC
and Stepper Motors. This module consists of an L298 motor driver IC and a 78M05 5V
regulator. L298N Module can control up to 4 DC motors, or 2 DC motors with
directional and speed control.

I. Features & Specifications :-


 Driver Model: L298N 2A
 Driver Chip: Double H Bridge L298N
 Motor Supply Voltage (Maximum): 46V
 Motor Supply Current (Maximum): 2A
 Logic Voltage: 5V
 Driver Voltage: 5-35V
 Driver Current:2A
 Logical Current:0-36mA
 Maximum Power (W): 25W
 Current Sense for each motor
 Heatsink for better performance
 Power-On LED indicator

II. Controlling a DC Motor :-


We can only have full control over a DC motor if we can control its speed and spinning
direction. This is possible by combining these two techniques.
1. PWM – to control speed
2. H-Bridge – to control the spinning direction

1. PWM – to control speed


The speed of a DC motor can be controlled by changing its input voltage. A widely
used technique to accomplish this is Pulse Width Modulation (PWM).
PWM is a technique in which the average value of the input voltage is adjusted by
sending a series of ON-OFF pulses. This average voltage is proportional to the width
of the pulses, which is referred to as the Duty Cycle.

SSGMCE, Shegaon 16
Android Controlled Arduino Robot Car

The higher the duty cycle, the higher the average voltage applied to the DC motor,
resulting in an increase in motor speed. The shorter the duty cycle, the lower the average
voltage applied to the DC motor, resulting in a decrease in motor speed.

Figure 3.9.1: Pulse Width Modulation(PWM) Technique

SSGMCE, Shegaon 17
Android Controlled Arduino Robot Car

2. H-Bridge – to control the spinning direction


The spinning direction of a DC motor can be controlled by changing the polarity of its
input voltage. A widely used technique to accomplish this is to use an H-bridge.
An H-bridge circuit is made up of four switches arranged in a H shape, with the motor
in the center.
Closing two specific switches at the same time reverses the polarity of the voltage
applied to the motor. This causes a change in the spinning direction of the motor.

Figure 3.9.2: Motor driver module L298N

SSGMCE, Shegaon 18
Android Controlled Arduino Robot Car

3.10 Voltage Drop of L298N

The L298N has a voltage drop of approximately 2V. This is due to the fact that internal
switching transistors have a voltage drop of approximately 1V when forward biased,
and because an H-Bridge requires the current to pass through two transistors, the total
voltage drop is 2V.
So, if you connect 12V to the motor power supply terminal, the motors will receive
approximately 10V. This means that a 12V DC motor will never spin at full speed.
In order to get the motor to run at its maximum speed, the motor power supply should
have a voltage that is slightly higher (+2V) than the actual voltage requirement of the
motor.
Taking into account a voltage drop of 2V, if you are using 5V motors, you will need to
provide 7V at the motor power supply terminal. If you have 12V motors then your
motor supply voltage should be 14V.

Figure 3.10: Voltage Drop of L298N

SSGMCE, Shegaon 19
Android Controlled Arduino Robot Car

3.11 Micromors and Grippy Wheels

Mobile wheeled or tracked robots have a minimum of two motors which are used to
propel and steer the robot. Hobbyists tend to choose “skid steering” (like a tank)
because of its simplicity to design, incorporate and control. A three wheeled robot‘s
third (front) wheel usually prevents the robot from falling over. Four wheeled robots
have either two or four drive motors and use skid steering. Six wheeled robots most
commonly have either two, four or six drive motors. Adding ―idle wheels (wheels not
connected to a motor) often has the unfortunate consequence of removing weight from
the drive wheels resulting in slip and loss of traction, the center wheel often loses
contact with the ground.

Figure 3.11: Micromors and Grippy Wheels

SSGMCE, Shegaon 20
Android Controlled Arduino Robot Car

3.12 Jumper Wires

A jump wire (also known as jumper, jumper wire, DuPont wire) is an electrical wire,
or group of them in a cable, with a connector or pin at each end (or sometimes without
them – simply "tinned"), which is normally used to interconnect the components of a
breadboard or other prototype or test circuit, internally or with other equipment or
components, without soldering.

Figure 3.12: Jumper Wires

SSGMCE, Shegaon 21
Android Controlled Arduino Robot Car

3.13 Batteries

A battery is an energy source consisting of one or more electrochemical cells and


terminals on both ends called an anode (-) and a cathode (+). Here for the project, 3
3.7V Lithium-ion batteries has been used.

Figure 3.13: Batteries

SSGMCE, Shegaon 22
Android Controlled Arduino Robot Car

3.14 Switch

A switch is used for turning on the power of the vehicle. It controls the battery
connection of the vehicle.

Figure 3.14: Switch

SSGMCE, Shegaon 23
Android Controlled Arduino Robot Car

3.15 Smartphone with app

The smart phone is the transmitter of this circuit. It sends the data to microcontroller
through Bluetooth module. It also helps to send the instruction of forward, backward,
left, right to the microcontroller. Actually, the smart phone is used as a remote of this
system. Here we operating the Bluetooth RC Controller application as the operating
remote of this system. The advantage of this project is that the application software
designed for android phones is kept simple but attractive with all necessary built-in
functions. The novelty lies in the simplicity of the design and functioning.

Figure 3.15.1: Smartphone with app

SSGMCE, Shegaon 24
Android Controlled Arduino Robot Car

An application was developed in the software Android Studio. App can be installed on
an Android smartphone to control the RC unit. The app shows buttons for movement
of the car in different directions. These commands are as follows: Left, forward,
backward and right. The code for the app is written in java.

Figure 3.15.2: Application Interface

SSGMCE, Shegaon 25
Android Controlled Arduino Robot Car

3.16 RC Module

RC module is the main working unit of this system. This unit consists of the Arduino
chip, the two motor drivers, and a Bluetooth module connected to the circuit. Motor
drivers are used to control the dc motors. The Arduino Uno, which is a small android
chip, resides at the center of the unit. It is responsible for communicating with android
smartphone, using the Bluetooth module and controls the motors using the motor driver.
The RC unit is powered using 9V battery connected to this Arduino chip. The command
for controlling the module is received using Bluetooth module HC-05.

SSGMCE, Shegaon 26
Android Controlled Arduino Robot Car

Chapter 4
DESIGN AND IMPLEMENTATION

4.1 Wiring L298N Motor Driver Module to Arduino UNO

Initial procedure is done by connecting the motor power supply. In our experiment, we
are using DC gearbox motors, also called “TT” motors, which are often found in two-
wheel-drive robots. They are rated for 3 to 12V. We will therefore connect an external
12V power source to the VS terminal. Because L298N has a voltage drop of about 2V,
the motors will receive 10V and spin at a slightly lower RPM. But that’s okay.
Next, we need to supply 5V to the logic circuitry of the L298N. We’ll use the on-board
5V regulator to draw 5V from the motor power supply, so keep the 5V-EN jumper in
place.
Now connect the L298N module’s Input and Enable pins (ENA, IN1, IN2, IN3, IN4
and ENB) to the six Arduino digital output pins (9, 8, 7, 5, 4 and 3). Note that both
Arduino output pins 9 and 3 are PWM-enabled.
Finally, wire one motor to terminal A (OUT1 and OUT2) and the other to terminal B
(OUT3 and OUT4). You can swap out your motor’s connections. There is technically
no right or wrong way.

Figure 4.1: Connecting Motor Driver Module to an Arduino

SSGMCE, Shegaon 27
Android Controlled Arduino Robot Car

4.2 Flow diagram to control robot car with mobile-application

Figure 4.2: Flow diagram to control robot car with mobile-application

SSGMCE, Shegaon 28
Android Controlled Arduino Robot Car

Chapter 5
SOURCE CODE OF ARDUINO CAR

5.1 Source Code for Arduino UNO

// Starting of Program
int m1a = 9;
int m1b = 10;
int m2a = 11;
int m2b = 12;
char val;

void setup()
{
pinMode(m1a, OUTPUT); // Digital pin 10 set as output Pin
pinMode(m1b, OUTPUT); // Digital pin 11 set as output Pin
pinMode(m2a, OUTPUT); // Digital pin 12 set as output Pin
pinMode(m2b, OUTPUT); // Digital pin 13 set as output Pin
Serial.begin(9600);
}

void loop()
{
while (Serial.available() > 0)
{
val = Serial.read();
Serial.println(val);
}

if( val == 'F') // Forward


{
digitalWrite(m1a, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2a, HIGH);
digitalWrite(m2b, LOW);
}
else if(val == 'B') // Backward
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, HIGH);
digitalWrite(m2a, LOW);
digitalWrite(m2b, HIGH);
}

SSGMCE, Shegaon 29
Android Controlled Arduino Robot Car

else if(val == 'L') //Left


{
digitalWrite(m1a, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}
else if(val == 'R') //Right
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, HIGH);
digitalWrite(m2b, LOW);
}
else if(val == 'S') //Stop
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}
else if(val == 'I') //Forward Right
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, HIGH);
digitalWrite(m2b, LOW);
}
else if(val == 'J') //Backward Right
{
digitalWrite(m1a, LOW);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, HIGH);
}
else if(val == 'G') //Forward Left
{
digitalWrite(m1a, HIGH);
digitalWrite(m1b, LOW);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}

SSGMCE, Shegaon 30
Android Controlled Arduino Robot Car

else if(val == 'H') //Backward Left


{
digitalWrite(m1a, LOW);
digitalWrite(m1b, HIGH);
digitalWrite(m2a, LOW);
digitalWrite(m2b, LOW);
}
}

SSGMCE, Shegaon 31
Android Controlled Arduino Robot Car

Chapter 6
RESULT & ANALYSIS

6.1 Resultant and Analysis

Here we work on common mode and when we want to change settings of HC-05
Bluetooth module like change password for connection, baud rate, Bluetooth device‘s
name etc. To do this, HC-05 has AT commands. To use HC-05 Bluetooth module in
AT command mode, connect ―Key‖ pin to High (VCC). Default Baud rate of HC05 in
command mode is 38400bps. Following are some AT command generally used to
change setting of Bluetooth module. To send these commands, we have to connect HC-
05 Bluetooth module to the PC via serial to USB converter and transmit these command
through serial terminal of PC.

You can directly use the Bluetooth module after purchasing from market, because there
is no need to change any setting of Bluetooth module. Default baud rate of new
Bluetooth module is 9600 bps. You just need to connect rx and tx to controller or serial
converter and give 5 volt dc regulated power supply to module.
Bluetooth module has two modes one is master mode and second one is slave mode.
User can set either mode by using some AT commands. Even user can set module’s
setting by using AT command. Here is some commands uses are given:

First of all user need to enter AT mode with 38400 bps baud rate by pressing EN button
at Bluetooth module or by giving HIGH level at EN pin. Note: all commands should
ends with \r\n (0x0d and 0x0a) or ENTER KEY from keyboard.
After it if you send AT to module then module will respond with OK

AT → Test Command

AT+ROLE = 0 → Slave Mode select

AT+ROLE = 1 → Master Mode select

SSGMCE, Shegaon 32
Android Controlled Arduino Robot Car

AT+NAME = xyz → Set Bluetooth Name

AT+PSWD = xyz → Set Password

AT+UART =< value1>,<value2>,<value3> → set Baud rate

Eg. AT+UART = 9600,0,0

Pin Description of accelerometer

1. STATE → Open
2. Rx → Serial receiving pin
3. Tx → Serial transmitting pin
4. GND → ground
5. Vcc → +5volt dc
6. EN → to enter in AT mode

6.2 Working Explanation

Bluetooth controlled car moves according to button touched in the android Bluetooth
mobile app. To run this project first we need to download Bluetooth app form Google
play store. We can use any Bluetooth app that supporting or can send data. Here are
some apps' name that might work correctly.
- Bluetooth RC controller
After installing app you need to open it and then search Bluetooth device and select
desired Bluetooth device. And then configure keys. Here in this project we have used
Bluetooth controller app.

1. Download and install Bluetooth Controller.


2. Turned ON mobile Bluetooth.
3. Now open Bluetooth controller app
4. Press scan
5. Select desired Bluetooth device

SSGMCE, Shegaon 33
Android Controlled Arduino Robot Car

When we touch forward button in Bluetooth controller app then car start moving in
forward direction and moving continues forward until next command comes.
When we touch backward button in Bluetooth controller app then car start moving in
reverse direction and moving continues reverse until next command comes.
When we touch left button in Bluetooth controller app then car start moving in left
direction and moving continues left until next command comes. In this condition front
side motor turns front side wheels in left direction and rear motor runs in forward
direction.
When we touch right button in Bluetooth controller app then car start moving in right
direction and moving continues right until next command comes. In this condition front
side motor turns front side wheels in right direction and rear motor runs in forward
direction and by touching stop button we can stop the car.

Bluetooth module’s rx and tx pins are directly connected at tx and rx of Arduino. And
vcc and ground pin of Bluetooth module is connected at +5 volt and gnd of Arduino.
And a 9 volt battery is used for power the circuit at Arduino’s Vin pin.
Then we have created functions for different directions of car.

SSGMCE, Shegaon 34
Android Controlled Arduino Robot Car

There are five conditions for this Bluetooth controlled car which are used to give the
directions:

Touched Output for front side Output for rear side


button in motor to give direction motor to move forward
Bluetooth or reverse direction
controller app

Button M11 M12 M21 M22 Direction

Stop 0 0 0 0 Stop

Forward 0 0 0 1 Forward

Backward 0 0 1 0 Backward

Right 1 0 0 1 Right

left 0 1 0 1 Left

Table 6.2: Table of 5 conditions for directions

SSGMCE, Shegaon 35
Android Controlled Arduino Robot Car

Figure 6.2: Working Explanation

SSGMCE, Shegaon 36
Android Controlled Arduino Robot Car

6.3 Limitations

As the range of the Bluetooth Communication is limited (a maximum of 60 meters for


class 2 devices for example) the control range of Bluetooth Controlled Robot is also
limited. Make sure that sufficient power is provided to all the modules especially the
Bluetooth Module. If the power is not sufficient, even though the Bluetooth Module
powers on, it cannot transmit data or cannot be paired with other Bluetooth devices.

6.4 Applications

 Low range Mobile Surveillance Devices


 Military Applications (no human intervention)
 Assistive devices (like wheelchairs)
 Home automation

6.5 Advantages

 Easy to install and low cost.


 Manually operate.

SSGMCE, Shegaon 37
Android Controlled Arduino Robot Car

Chapter 7
CONCLUSION & FUTURE SCOPE

7.1 Conclusion

To us the need of internet and the things which are internet based are very much
important nowadays. IOT or internet of things is the very important part in both
computer and our daily lives. The above model describes how the arduino programs the
car motor module and by this we actually rotate the wheels and give direction to the
car. It gives us the opportunity to work with different platforms and it helps us to create
various interesting modules to work on. We also tested the applications used to drive
the car. Due to the new concept of Wireless Controlled Car using Bluetooth, Wifi we
were able to come up with various possibilities that can take place.

Thus, in this project, we designed an Android App in the software Android Studio to
control the RC module. We have programmed Arduino and designed the RC car as
shown in the diagram previously. The car will receive the commands via Bluetooth and
move accordingly.

The Arduino is an open source device that has been the brain for numerous projects.
The Arduino has everything that is required by the user which includes its inbuilt
converter, i/o pins etc. With the combination of Arduino, and the Bluetooth Shield we
can control over many other things, like home Lightings, air conditioner and many more
through our cell phones. The Arduino can also contribute at large for the Smart Home
system. By doing this Project we found out a lot about the Arduino, and how it has
made us easier to convert digital signals into physical movements. One more advantage
of Arduino is that once a program is burned we don’t need to worry about the program
getting erased as long as it is not RESET. Arduino has also over all other
microcontroller because of its efficiency and user friendly property.

This project consists of a basic prototype of a Bluetooth control car above stated. The
prototype car can recognize commands from users and can turn the car left, right, and

SSGMCE, Shegaon 38
Android Controlled Arduino Robot Car

stop with great accuracy. It can be further improved by using different sensors like
ultrasonic or infrared and with various levels of coding.
Our Bluetooth control car has a range of 10-20 meter with the mobile Bluetooth
controlling system. The range mostly depends on the receivers transmission level.

In the future, we could use rechargeable batteries like Ni-Cd Battery or Li-ion batteries
that could avoid the present disadvantage. Also, we could make use of this RC Motor
Car as a surveillance system or rovers by adding a few more sensors and updating the
code. This would make them into robots. These robots could self-monitor under any
human supervision, thereby reducing manpower. These are just the alternatives, on
which this project could be improvised and updated.

IoT or the internet of things is a very important part of both computers and our daily
lives. The above model describes how the Arduino programs the car motor module and
by IoT, we rotate the wheels and give direction to the car. IoT allows us to work with
different platforms and it helps us to create various interesting modules to work on.

With the ever-increasing problems, our knowledge has to expand to adapt better to the
changes all around us. In the same way, it is hoped that this activity is a small step that
would lead us to further enhancements and goals.

SSGMCE, Shegaon 39
Android Controlled Arduino Robot Car

7.2 Future Scope

What the Arduino platform has done is to take what was once a fragmented and
expensive market for robotics and microprocessors and become the major platform,
largely by virtue of much lower cost and ease of use, leading to higher volume and
popularity, and community support behind it. Arduino has made it simple to program
their boards with any computer via USB and simple to integrate with a wide array of
sensors and devices. The Arduino is great for hobbyists, prototypes, and people just
starting out in robotics because of its low cost, ease of use, and large following online.
It's easy to learn and teach people to be able to do basic things with the Arduino, yet it's
capable enough to do fairly sophisticated things if you as a developer have the
capability to take advantage of it. It's allowing people to develop projects inexpensively
to build and control their own devices, such as sensors that send data to the Internet and
control systems for all kinds of things. It's also reducing the cost of development by
allowing companies to develop prototypes much more quickly and with less initial
investment.

The Future Prospects are as follows:

 Mobile application of this project can be brought on other mobile operating


system like iOS & windows phone.
 Using of Wi-Fi direct/cellular network instead of bluetooth module, so that the
range of the arduino car be increased to larger scale.
 Application the project concept of guiding through mobile device to quadcopter,
so that we can cover the aerial view of the surrounding.
 With the help of DIP we can install a camera on the car which will provide us
the view of camera on the mobile device.
 Due to time & resource constraints these ideas where not brought to light in the
project
 With the ever increasing problems, our knowledge has to expand to adapt better
to the changes all around us. In the same way it is hoped that this activity is a
small step that would lead us to further enhancements and goals

SSGMCE, Shegaon 40
Android Controlled Arduino Robot Car

References

[1] Wang, F.Q. (2012) Research New Type of Supply Chain Management Model Based on the

Technology of Internet of Things—With Radio Frequency Identification (RFID) Technology as

an Example.
[2] Shen, S.B., Fang, Q.L. and Zong, P. (2009) Research of Internet of Things and related
technology. Journal of Nanjing University of Posts and Telecommunications (Natural Science),
6, 1-11.
[3] Wang, B.Y. (2009) Summary of IOT Technology Research. Journal of Electronic Measurement
and Instrument, 12, 1-7.
[4] Lin, G. (2012) Research on Complex Event of Supply Chain Decision Support Based on Internet
of Things.
[5] Han, Y. and Chai, Y.T. (2011) The Architecture Reference of Flexible Supply Chain Simulation
System. Journal of System Simulation, 6, 1270-1278.
[6] J. Ziegler, M. Graube, L. Urbas, RFID as universal entry point to linked data clouds, in: Proc.

IEEE International Conference on RFID Technologies and Applications, 2012, pp. 281–286.

[7] R. Want, An introduction to RFID technology, IEEE Pervasive Comput. 5 (2006) 25– 33.

[8] M. Gireesh Kumar, K. Sripath Roy, Zigbee based indoor campus inventory tracking using RFID
module, Int. J. Eng. Res. Appl. (IJERA) 4 (7(1)) (2014) 132, ISSN 2248-9622.
[9] Son Minh Huynh, David Parry, A.C.M. Fong, Novel RFID and ontology based home localization
system for misplaced objects, IEEE Trans. Consum. Electron. 60 (3) (2014).
[10] J. Gubbi, R. Buyya, S. Marusic, M. Palaniswami, Internet of things (IoT): a vision architectural

elements and future directions, Future Gener. Comput. Syst. 29 (7) (Sep. 2013) 1645–1660.

[11] A. Ibrahim, D. Ibrahim, Real-time GPS based outdoor WiFi localization system with map display,
Adv. Eng. Softw. 41 (2010) 1080–1086.
[12] R. Tesoriero, J.A. Gallud, M.D. Lozano, V.M.R. Penichet, Tracking autonomous entities using
RFID technology, IEEE Trans. Consumer Electron. 55 (2009) 650–655.
[13] S.M. Huynh, D. Parry, A. Fong, J. Tang, Home localization system for misplaced objects, in: Proc.
IEEE International Conference on Consumer Electronics, 2014, pp. 462–463.
[14] Lalanne, T., and Lempereur, C., Color recognition with a camera: a supervised algorithm for
classification‖, IEEE Southwest Symposium on Image Analysis and Interpretation, Tucson-
Arizona, pp. 198- 204, April 1998.
[15] Signals, Systems and Computers, 2004 Conference Record of the Thirty-Eighth Asilomar
Conference on Publication 7- Nov-2004 Volume: 1, on page(s): 577-581 Vol.1.

SSGMCE, Shegaon 41
Android Controlled Arduino Robot Car

[16] Mukesh Kumar Thakur, Ravi Shankar Kumar, Mohit Kumar, Raju Kumar ―Wireless Fingerprint
Based Security System using Zigbee, International Journal of Inventive Engineering and Sciences
(IJIES) ISSN: 2319-9598, Volume-1, Issue-5, April 2013.
[17] Annie P. Oommen1, Rahul A P2, Pranav V3, Ponni S4, Renjith Nadeshan, Design and
Implementation of a Digital Code Lock , International Journal of Advanced Research in Electrical,
Electronics and Instrumentation Engineering (An ISO 3297:2007 Certified Organization), Vol. 3,
Issue 2, February 2014.
[18] Himani Goyal, Wireless Display using RF-Module‖, International Journal of Inventive
Engineering and Sciences (IJIES) ISSN: 2319 9598, Volume-3 Issue-2, January 2015.
[19] Ujjwal Kumar, Deepak Rasaily, PriyankaRana ― Cell phone - Based Device Control with Voice
Acknowledgement, International Journal of Engineering Trends and Technology (IJETT), ISSN:
2231-5381, Volume-32, Issue-5, February 2016.
[20] Technology Intelligent Home: SMS Based Home Security System with Immediate Feedback
International Journal of Advance Research In Science And Engineering http://www.ijarse.com
IJARSE, Vol. No.2, Issue No.5, May, 2013 ISSN-2319-8354(E).
[21] Design of a Bluetooth Enabled Android Application for a Microcontroller Driven Robot By Vito
M. Guardi,(May2014).
[22] Android Based Robot Implementation For Pick and Retain of Objects By Ranjith Kumar Goud,
B. Santhosh Kumar, (Oct2014).
[23] Smart phone based robotic control for surveillance applications By M.Selvam,(IJRET 2014).
[24] Controlling a Robot using Android Interface and Voice By Kishan Raj KC,(2012).
[25] Motion Control of Wheeled Mobile Robot By Gyula Mester,(SISY 2006).
[26] Design of PI and PID Controllers with Transient Performance Specification By J. C. Basilio and
S. R. Matos,(IEEE 2002).
[27] Robot Control Design Based On Smartphone by Xiao Lu, Wenjun Liu, Haixia Wang, Qia Sun,
IEEE, 978-1-4673-1382, pp-2820-2823, Jun 2013.
[28] Android phone controlled robot using Bluetooth by Arpit Sharma, Reetesh Verma, Saurabh
Gupta, Sukhdeep kaur bhatia, IJEEE, Vol.7,pp-443-448, Nov- 2014.

SSGMCE, Shegaon 42

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy