0% found this document useful (0 votes)
7 views27 pages

Bletooth Control Obstacle Avodiance, High Low Beam Robot Car

The document presents a minor project on a Bluetooth-controlled obstacle avoidance robot car, developed by students in Electronics and Communication Engineering. It details the project's components, including Arduino, ultrasonic sensors, GPS technology, and motor drivers, as well as the methodology for obstacle detection and navigation. The project aims to demonstrate autonomous movement and obstacle avoidance, with potential applications in robotics and automated systems.

Uploaded by

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

Bletooth Control Obstacle Avodiance, High Low Beam Robot Car

The document presents a minor project on a Bluetooth-controlled obstacle avoidance robot car, developed by students in Electronics and Communication Engineering. It details the project's components, including Arduino, ultrasonic sensors, GPS technology, and motor drivers, as well as the methodology for obstacle detection and navigation. The project aims to demonstrate autonomous movement and obstacle avoidance, with potential applications in robotics and automated systems.

Uploaded by

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

A MINOR PROJECT

ON

BLETOOTH CONTROL OBSTACLE AVODIANCE, HIGH LOW


BEAM ROBOT CAR

SUMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS

FOR THE DEGREE OF

BACHELOR OF TECHNOLOGY

IN

ELECTRONICS AND COMMUNICATION ENGINEERING

By

Sristi Rawat (2100145)

Yogesh Bisht (2100153)

Akhil Kothari (2100107)

Under the guidance of

Dr. Ajay Kumar


(Assistant Professor)
DECLARATION

This is to certify that the project entitled “BLUETOOTH CONTROL OBSTACLE


AVOIDANCE HIGH LOW BEAM ROBOT CAR” which is being submitted by Sristi
Rawat(2100145),Yogesh bisht (2100153), Akhil Kothari(2100107) in partial fulfillment of the
requirements for the award of Bachelor of Technology degree in Electronics and Communication
Engineering to the Department of Electronics and Communication Engineering, G.B. Pant Institute
of Engineering and Technology, Pauri Garhwal, Uttarakhand is a bonafide work carried out by
them under my guidance and supervision. To the best of my knowledge, the matter embodied in the
project has not been submitted for the award of any other degree or diploma.

Date: Sristi Rawat (2100145)

Place: GBPIET, Pauri Garhwal Yogesh Bisht(2100153)

Akhil Kothari (2100107)

I
CERTIFICATE

This is to certify that the project entitled “BLUETOOTH CONTROL OBSTACLE AVOID- ANCE
HIGH LOW BEAM ROBOT CAR” which is being submitted by Sristi Rawat(2100145),
Yogesh Bisht (2100153), Akhil Kothari(2100107) in partial fulfillment of the requirements for
the award of Bachelor of Technology degree in Electronics and Communication Engineering to
the Department of Electronics and Communication Engineering, G.B. Pant Institute of
Engineering and Technology, Pauri Garhwal, Uttarakhand is a bonafide work carried out by
them under my guidance and supervision. To the best of my knowledge, the matter embodied in
the project has not been submitted for the award of any other degree or diploma.

Date: Dr. Ajay Kumar

Place: GBPIET, Pauri Assistant Professor

SUPERVISOR

II
ACKNOWLEDGEMENT

It is our proud privilege and duty to acknowledge the kind of help and guidance received from
several people in preparation of this project. It would not have been possible for us without their
valuable help, cooperation and guidance.

First and foremost, we wish to record our sincere gratitude to our mentor Dr. Ajay Kumar and
to the Head of the Department Prof. (Dr.) Rajesh Kumar and our respected Director of our
Institute Prof. (Dr.) V.N Kala for their constant support and encouragement in preparation of
this report and for making available library and laboratory facilities needed to prepare this
report.

Secondly, we would like to thank our parents who patiently helped us as we went through our
work and helped to modify and eliminate some of the irrelevant or unnecessary stuffs. We
would also like to thank our friends who helped us to make our work more organized and well-
stacked till the end.

At last , we would like to thank God for his grace up on us.

Date: Sristi Rawat (2100145)

Place:GBPIET,Pauri Yogesh Bishtt(2100153)

Akhil Kothari (2100107)

I
ABSTRACT

This project is about the development of an Arduino-based autonomous car that employs ultrasonic
sensors, servo motors and GPS technology for avoiding obstacles and navigating in real-time. The car
ensures continuous motion by detecting and responding to obstacles within its environment.

Distance to an obstacle is measured by a front facing ultrasonic sensor. If any obstruction is found within
12 centimeters, the robot ceases activity while the center rotates both ways to measure distances on either
side. A simple algorithm selects the best direction with the longest clear space and the car resumes
moving ahead in that path. Consequently, this process constantly repeats itself thereby allowing dynamic
path finding and obstacle avoidance. Additionally, there are lights on board that change as per how close
or far away from obstacles they are, thus giving visual indications on its status and condition.

When turned on, the ultrasonic sensor oscillates briefly indicating it is alive. Four motors of the robot
make it go forward but stop instantly while slightly reversing upon sensing something 10 centimeters
away from it. Finally, leftward scanning or right scanning of this same detector evaluates which among
two directions should be taken ahead.

The movements as well as precise positioning can be tracked hence facilitating accurate navigation due to
GPS functionality installed in it. This project is a fusion of basic robotics principles with sensory
technology and location tracking that can form the basis for building advanced autonomous car systems.
Some practical applications of this type of car are in automated warehousing, exploration, or service
robotics where self-navigation and obstacle avoidance are critical.

IV
TABLE OF CONTENT

DECLARATION

ACKNOWLEDGEMENT

ABSTRACT

1. INTRODUCTION

1.1 Arduino Uno

1.2 L293D Motor Driver

1.3 Bluetooth Module

1.4 Ultrasonic Sensor

1.5 GPS Module

2. COMPONENTS REQUIRED

2.1 Arduino Uno

2.2 L293D Motor Driver

2.3 Bluetooth Module

2.4 Ultrasonic Sensor

2.5 GPS Module

2.6 Servo Motor

2.7 Gear Motor

2.8 Robot Wheel

2.9 Li-ion Battery

2.10 Jumper Wire

3. CODE
4 . PROTEUS SIMULATION

5. CONCLUSION
INTRODUCTION :

Arduino Uno
Arduino is an open-source electronics platform based on easy-to-use hardware and software.
Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter
message - and turn it into an output - activating a motor, turning on an LED, publishing
something online. You can tell your board what to do by sending a set of instructions to the
microcontroller on the board. To do so you use the Arduino programming language (based on
Wiring), and the Arduino Software (IDE), based on Processing.

Fig:Arduino Uno
Fig. Schematic Diagram of Arduino
Pin Description
Arduino Uno is a microcontroller board based on 8-bit ATmega328P microcontroller. Along
with ATmega328P, it consists other components such as crystal oscillator, serial communication,
voltage regulator, etc. to support the microcontroller. Arduino Uno has 14 digital input/output
pins (out of which 6 can be used as PWM outputs), 6 analog input pins, a USB connection, A
Power barrel jack, an ICSP header and a reset button.
The 14 digital input/output pins can be used as input or output pins by using pinMode(),
digitalRead() and digitalWrite() functions in Arduino programming. Each pin operate at 5V and
can provide or receive a maximum of 40mA current, and has an internal pull-up resistor of 20-50
KOhms which are disconnected by default. Out of these 14 pins, some pins have specific
functions as listed below
• Serial Pins 0 (Rx) and 1 (Tx) ==> Rx and Tx pins are used to receive and transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to TTL serial
chip.
• External Interrupt Pins 2 and 3 ==> These pins can be configured to trigger an interrupt
on a low value, a rising or falling edge, or a change in value.
• PWM Pins 3, 5, 6, 9 and 11 ==> These pins provide an 8-bit PWM output by using
analogWrite() function.
• SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK) ==> These pins are used for SPI
communication.
• In-built LED Pin 13 ==> This pin is connected with an built-in LED, when pin 13 is
HIGH – LED is on and when pin 13 is LOW, its off.
There are 6 analog input pins, each of which provide 10 bits of resolution, i.e. 1024 different
values. They measure from 0 to 5 volts but this limit can be increased by using AREF pin with
analog Reference() function.
• Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire
library.
• AREF ==> Used to provide reference voltage for analog inputs with analogReference()
function.
• Reset Pin ==>Making this pin LOW, resets the microcontroller.
L293D motor driver

The L293D is a dual-channel H-Bridge motor driver capable of driving a pair of DC motors or a
single stepper motor. It is a popular IC used in robotics, automation, and other applications
where precise motor control is required.

Key Features:

 Dual-channel H-Bridge motor driver


 Can drive up to two DC motors or a single stepper motor
 Bidirectional drive currents of up to 600 mA (per channel) at voltages from 4.5 V to 36 V
 Designed to drive inductive loads such as relays, solenoids, DC and bipolar stepping
motors, and other high-current/high-voltage loads
 Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a
pseudo-Darlington source
 Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4
enabled by 3,4EN

Applications:

 Robotics
 Automation
 Industrial control systems
 Motor control systems
 Stepper motor control
 DC motor control

Pinout:

The L293D has 16 pins, with eight pins dedicated to each motor. The pinout is as follows:

 IN1, IN2, IN3, IN4: Input pins for motor control


 OUT1, OUT2, OUT3, OUT4: Output pins for motor control
 EN1, EN2: Enable pins for motor control
 VCC, GND: Power supply pins

Example Usage:

The L293D can be used with Arduino or other microcontrollers to control DC motors or stepper
motors. The IC is connected to the microcontroller using digital pins, and the motor is connected
to the output pins of the IC. The enable pins are used to enable or disable the motor control.
Conclusion:

The L293D is a versatile and widely used motor driver IC that can be used in a variety of
applications where precise motor control is required. Its ability to drive two DC motors or a
single stepper motor makes it a popular choice for robotics and automation projects

Fig : L293D motor driver


Bluetooth Module

The HC-05 is a popular Bluetooth module used for wireless communication in various embedded
systems and microcontroller projects. It is widely used due to its ease of integration,
affordability, and support for both master and slave modes.

Key Features of the HC-05 Bluetooth Module:

Bluetooth Version:
 Supports Bluetooth 2.0 + EDR (Enhanced Data Rate), which ensures good performance
and data transfer speeds.

Operating Modes:

 Master Mode: The module can initiate connections with other Bluetooth devices.
 Slave Mode: The module can only accept connections initiated by other devices.

Communication:

 Uses serial communication (UART) for interfacing with microcontrollers or other


devices.
 Default baud rate is typically 9600 bps, but it can be configured to different rates.

Range:

 Typically offers a range of up to 10 meters (about 33 feet) in open space.

Voltage and Power:

 Operates at a voltage of 3.3V.


 It is usually powered by the 5V supply from the host microcontroller, with an onboard
voltage regulator to bring it down to 3.3V.

Pin Configuration:

 Key/EN: Used to switch between command mode and data mode.


 VCC: Power supply pin.
 GND: Ground.
 TXD: Transmit data.
 RXD: Receive data.
 State: Indicates the connection status.
Modes of Operation:

 Command Mode: Used for configuring the module. Accessed by applying a high
signal to the Key/EN pin before power-up.
 Data Mode: Used for normal data transmission. The module defaults to this mode
when powered on.

Fig : Bluetooth Module (HC-05)


Ultrasonic sensor

An ultrasonic sensor is an instrument that measures the distance to an object using ultrasonic
sound waves. It works by emitting high-frequency sound waves and measuring the time it takes
for the waves to bounce back from the target object. This technology is commonly used in
various applications, including robotics, automation, and industrial control systems.

How Ultrasonic Sensors Work

An ultrasonic sensor uses a transducer to send and receive ultrasonic pulses that relay back
information about an object’s proximity. High-frequency sound waves reflect across boundaries
to produce distinct echo patterns, allowing the sensor to calculate the distance to the object.

Types of Ultrasonic Sensors

Ultrasonic sensors can be categorized into three broad categories:

 Transmitters: Convert electrical signals into ultrasound


 Receivers: Convert ultrasound into electrical signals
 Transceivers: Can both transmit and receive ultrasound

Applications of Ultrasonic Sensors

Ultrasonic sensors have a wide range of applications, including:

 Level monitoring: Measuring the distance to the surface of a liquid or solid


 Object detection: Detecting the presence or absence of an object
 Proximity sensing: Measuring the distance to an object
 Automated manufacturing: Detecting the movement of targets and measuring
distance in automated factories and process plants
 Automotive: Parking sensors, ultrasonic people detection, and autonomous UAV
navigation

Advantages of Ultrasonic Sensors

Ultrasonic sensors offer several advantages, including:

 Non-contact measurement: No physical contact with the object is required


 High accuracy: Can measure distances with high accuracy
 Robustness: Can operate in harsh environments and are resistant to interference
 Low maintenance: Easy to clean and maintain
Common Uses of Ultrasonic Sensors

Some common uses of ultrasonic sensors include:

 Robotics: Used in robots to navigate and detect objects


 Industrial automation: Used in industrial control systems to monitor levels and
detect objects
 Automotive: Used in parking sensors and other automotive applications
 Medical: Used in medical ultrasonography and other medical applications

Fig: Ultrasonic Sensor


What is GPS:
The Global Positioning System (GPS) is a satellite-based navigation system made up of at least
24 satellites. GPS works in any weather conditions, anywhere in the world, 24 hours a day, with
no subscription fees or setup charges.

How GPS works:


GPS satellites circle the Earth twice a day in a precise orbit. Each satellite transmits a unique
signal and orbital parameters that allow GPS devices to decode and compute the precise location
of the satellite. GPS receivers use this information and trilateration to calculate a user's exact
location. Essentially, the GPS receiver measures the distance to each satellite by the amount of
time it takes to receive a transmitted signal. With distance measurements from a few more
satellites, the receiver can determine a user's position and display it.
To calculate your 2-D position (latitude and longitude) and track movement, a GPS receiver
must be locked on to the signal of at least 3 satellites. With 4 or more satellites in view, the
receiver can determine your 3-D position (latitude, longitude and altitude). Generally, a GPS
receiver will track 8 or more satellites, but that depends on the time of day and where you are on
the earth.
Once your position has been determined, the GPS unit can calculate other information.

Fig. Connection of Antenna with Module


COMPONENTS USED:

Neo-6M GPS module is shown in the figure below.It comes with an external
antenna and does not come with header pins

Fig. Neo 6M GPS module


Overview of NEO-6M GPS Module
• NEO-6M GPS Chip
The heart of the module is a NEO-6M GPS chip from u-blox. It can track up to 22 satellites on
50 channels and achieves the industry’s highest level of sensitivity i.e. -161 dB tracking, while
consuming only 45mA supply current. The u-blox 6 positioning engine also boasts a Time-To-
First-Fix (TTFF) of under 1 second. One of the best features the chip provides is Power Save
Mode(PSM). It allows a reduction in system power consumption by selectively switching parts
of the receiver ON and OFF. This dramatically reduces power consumption of the module to just
11mA making it suitable for power sensitive applications like GPS wristwatch. The necessary
data pins of NEO-6M GPS chip are broken out to a "0.1″ pitch headers. This includes pins
required for communication with a microcontroller over UART.
Note:- The module supports baud rate from 4800bps to 230400bps with default baud of 9600.

Position Fix LED Indicator


There is an LED on the NEO-6M GPS Module which indicates the status of Position Fix. It’ll
blink at various rates depending on what state it’s in
• No Blinking ==> means It is searching for satellites
• Blink every 1s – means Position Fix is found

Fig. GPS chip


PINOUT:
1.GND is the Ground Pin and needs to be connected to GND pin on the Arduino.
2.TxD (Transmitter) pin is used for serial communication.
3.RxD (Receiver) pin is used for serial communication.
4.VCC supplies power for the module. You can directly connect it to the 5V pin on the
Arduino.
CODE :

#include <Servo.h>
#include <AFMotor.h>
#include <SoftwareSerial.h>
#include <TinyGPS++.h>

#define Echo A0
#define Trig A1
#define motor 10
#define Speed 170
#define spoint 103

char value;
int distance;
int Left;
int Right;
int L = 0;
int R = 0;
int L1 = 0;
int R1 = 0;

TinyGPSPlus gps;
SoftwareSerial gps_ss(7, 8);
Servo servo;

AF_DCMotor M1(1);
AF_DCMotor M2(2);
AF_DCMotor M3(3);
AF_DCMotor M4(4);

void setup() {
Serial.begin(9600);
pinMode(Trig, OUTPUT);
pinMode(Echo, INPUT);
pinMode(motor,OUTPUT);
servo.attach(motor);
M1.setSpeed(Speed);
M2.setSpeed(Speed);
M3.setSpeed(Speed);
M4.setSpeed(Speed);
gps_ss.begin(9600);
pinMode(12, OUTPUT);
pinMode(4, OUTPUT);
}

void loop() {
distance=ultrasonic();
Bluetoothcontrol();
Obstacle();
if (distance<=60)
{
digitalWrite(4, LOW);
digitalWrite(12,LOW);
}
else
{
digitalWrite(4,HIGH);
digitalWrite(12,HIGH);

}
}

void Bluetoothcontrol() {

if (Serial.available() > 0) {
value = Serial.read();
Serial.println(value);
}
if (value == 'F') {
forward();
}
else if (value == 'B') {
backward();
}
else if (value == 'L') {
left();
}
else if (value == 'R') {
right();
}
else if (value == 'S') {
Stop();
}
else if(value=='V'){
gpsLocation();
value='S';
}
}

void Obstacle() {

if (distance <= 12) {


Stop();
backward();
delay(100);
Stop();
L = leftsee();
servo.write(spoint);
delay(800);
R = rightsee();
servo.write(spoint);
if (L < R) {
right();
delay(500);
Stop();
delay(200);
value='S';
} else if (L > R) {
left();
delay(500);
Stop();
delay(200);
value='S';
}
}
light(distance);
}
void light(int distance){
if (distance<=60)
{

digitalWrite(4, LOW);
digitalWrite(12,LOW);
}
else
{
digitalWrite(4,HIGH);
digitalWrite(12,HIGH);

}
}

int ultrasonic() {
digitalWrite(Trig, LOW);
delayMicroseconds(4);
digitalWrite(Trig, HIGH);
delayMicroseconds(10);
digitalWrite(Trig, LOW);
long t = pulseIn(Echo, HIGH);
long cm = t / 29 / 2;
return cm;
}

void gpsLocation()
{
Serial.println("Attempting to read GPS data...");

gps_ss.listen();
bool receivedData = false;

while (gps_ss.available() > 0)


{
char c = gps_ss.read();
gps.encode(c);
receivedData = true;
}
if (receivedData)
{
Serial.println("\nGPS data received.");
}
else
{
Serial.println("No GPS data available.");
}

if (gps.location.isValid()) {
gps.encode(gps_ss.read());
Serial.print("Latitude= ");
Serial.println(gps.location.lat());
Serial.print("Longitude= ");
Serial.println(gps.location.lng());
}
else
{
Serial.println("Location not valid.");
}
}

void forward() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}

void backward() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(BACKWARD);
M4.run(BACKWARD);
}

void right() {
M1.run(BACKWARD);
M2.run(BACKWARD);
M3.run(FORWARD);
M4.run(FORWARD);
}

void left() {
M1.run(FORWARD);
M2.run(FORWARD);
M3.run(BACKWARD);
M4.run(BACKWARD);
}

void Stop() {
M1.run(RELEASE);
M2.run(RELEASE);
M3.run(RELEASE);
M4.run(RELEASE);
}

int rightsee() {
servo.write(20);
delay(800);
Left = ultrasonic();
return Left;
}

int leftsee() {
servo.write(180);
delay(800);
Right = ultrasonic();
return Right;
}
PROTEUS SIMULATION

Fig : Proteus Simulation


CONCLUSION

You might also like