Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI- 590018

MINI PROJECT REPORT

ON

“OBSTACLE DETECTION AND DRIVING A RELAY USING


ARDUINO UNO”

Submitted in partial fulfilment of the requirements for the award of degree of


Bachelor of engineering in Electronics and Communication Engineering

Submitted by:

B Gayithri USN: 3PG19EC006


Kalpana D USN:3PG19EC009
K Lavanya USN:3PG19EC025
Ambika USN:3PG19EC400

Under the guidance of

Prof. P.V KIRAN


Asst. Professor, Dept. of ECE

Department of Electronics and Communication


Proudhadevaraya Institute of Technology
HOSAPETE-583201
PROUDADEVARAYA INSTITUTE OF TECHNOLOGY
DEPARTMENT OF ELECTRONICS & COMMUNICATION
ENGINEERING, HOSPET-583201

CERTIFICATE

This is to certify that the technical seminar report on the current topic entitled “OBSTACLE
DETECTION AND DRIVING A RELAY USING ARDUINO UNO” has been successfully
carried out by B. Gayithri (3PG19EC006), Kalpana.D (3PG19EC009), K. Lavanya
(3PG19EC025) and Ambika (3PG19EC400) in partial fulfilment for the award of bachelor
of engineering in ECE of the VTU BELAGAVI during the academic year 2022 -2023. The
Mini Project report has been approved ,as it satisfies the academic requirements in respect of
technical seminar on current topic prescribed for B.E Degree

Signature of guide Signature of co-ordinator Signature of H.O.D


(Prof. P.V KIRAN) (Dr. G.C Manjunatha) (DR.ROHITH U.M)
Department of ECE Department of ECE Department of ECE

External Exam:
1. Examiner 1

2. Examiner 2
Institute Vision:
VI1: To become premier institute in imparting technical education by creating competent
engineers having dynamic adaptability with high morals and concern towards environment and
society.
Institute Mission:
MI1: Promote active learning strategies to facilitate student centric earning.
MI2: Provide self learning capabilities to enhance employability and entrepreneurial skills.
MI3: Inculcate human values and ethics to make learners sensitive towards social issues.
Vision of the Department:
VDI: To impart quality education for creating globally competent, socially responsible and
ethically sound Electronic Engineers.
Mission of the Department:
MDI: To impart core engineering skills in Electronics and Communication Engineering through
effective teaching-learning practices.
MD2: To provide academic environment that promotes creative thinking, teamwork and research.
MD3: To enable the graduates to face societal challenges and provide holistic solutions.
Programme Educational Objectives (PEOs):
PEO1: Solve engineering problems by applying the knowledge of mathematics, science and &
communication engineering
PEO2: Analyse, design and create innovation and sustainable solutions to real life problems to
cater the social needs
PEO3: Inculcate the life learning abilities, professional attributes, ethics, effective communication
and managerial skills to work in multidisciplinary environment.
Programme Specific Objectives (PSO):
The graduates of the department will attain
PSO1: Ability to apply the knowledge of Electronics and Communication Engineering to get
employed in information and communication-based industries and to become a successful
entrepreneur.
PSO2: Ability to use hardware and software tools to analyse, design and develop electronic and
communication systems.
DECLARATION

B GAYITHRI, KALPANA D,K LAVANYA and AMBIKA students of B.E in the Department of
ECE engineering PDIT,HOSPET. Hereby declare that the Mini Project titled “Obstacle detection
and driving a relay using Arduino UNO” has been carried out under the supervision of Mr.
KIRAN P V, Dept of ECE, PDIT and submitted in partial fulfilment of the requirement for the
award of degree in bachelor of engineering in ECE of VTU Belagavi during academic year 2021-
2022

B GAYITHRI

KALPANA D
K LAVANYA
AMBIKA
ACKNOWLEDGEMENT

We express a deep sense of gratitude to our guide Prof.KIRAN P.V, Department of


Electronics and Communication Engineering, PDIT, Hosapete, for his valuable guidance and
suggestions imparted at various stages in carrying out this mini project work successfully.

I would like to add a few words to express our thanks to Prof. Rohit U.M., HOD of the
Electronics and Communication Engineering, PDIT, Hosapete for their valuable advice from
time to time.

I am grateful to Dr. S.M. Shashidhar, Principal, PDIT, Hosapete for having provided us with
an excellent academic environment that has nurtured our practical skills and for kindly
obliging the requests and providing timely assistance.

I express my sincere thanks to all the faculty and staff members of the Department of
Electronics and Communication Engineering, PDIT, Hosapete, for their kind and constant
support throughout the Mini Project Work.

I would like to thank the Almighty, who has always guided me to work on the right path in
life. My greatest thanks are to my parents who bestowed the ability and strength i n me to
complete this work.

We are also thankful to the authors who work has been consulted, utilized and cited in this
report. Words are often less to reveal ones true regards. An understanding of work like this is
never the outcome of the efforts of a single person. I take this opportunity to express my
profound sense of gratitude and respect to all those who helped me directly and indirectly
throughout this Mini Project.

Project associates
B Gayatri
Kalpana D
K Lavanya
Ambika
ABSTRACT

This electronic setup auto activated whenever the circuit finds an obstacle it is able to detect and
give signals to a relay to light up the bulb.
The main aim of the mini project is to demonstrate the use of IR sensors and applications.
The schematic for this project is not very complicated, so building and understanding it shouldn’t
be a problem, even for beginners. The circuit consists of an IR LED and an IR receiver. The
Arduino is the component that’ll do most of the work.
A transistor that acts as an amplifier instead of using one of the Arduino’s GPIO pins to directly
drive the bulb. Doing so will also allow you to easily add an external power supply to boost the
LED’s range, which can be useful in some applications.
There are many applications that can be implemented that are useful in range detection
applications.
INDEX

CHAPTER NUMBER CHAPTER NAME PAGE


NUMBER
CHAPTER 1 INTRODUCTION 1
CHAPTER 2 BLOCKDIAGRAM 2
AND COMPONENT
DESCRIPTION
CHAPTER 3 SOFTWARE 9
PROGRAM
DESCRIPTION
CHAPTER 4 ADVANTAGES AND 10
DISADVANTAGES
CHAPTER 5. APPLICATIONS 11

CHAPTER 6. CONCLUSIONS 12
REFERENCES 13
OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 1
INTRODUCTION

The objective of this project is to make a controller-based model to detect obstacle and accordingly
light up the bulb. Here we can use IR sensor for detection of obstacles. In today’s world, there is a
continuous need for automatic appliances. With the increase in standard of living, there is a sense of
urgency for developing circuits that would ease the complexity of life. The microcontroller does the
above job. it receives the signals from the sensors, and this signal is operated under the control of
software which is stored in ROM of the Microcontroller ATMEGA328P that continuously monitor
the infrared receivers.

This Project ―Obstacle detection and relay driving using Arduino uno is a reliable circuit that takes
over the task of controlling the Bulb. The light will be only switched OFF when the obstacle is
cleared.

The applications of this project can be found in robotics, home automation, theft detection etc.

Dept. of ECE, PDIT, HOSPET Page 1


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 2
BLOCKDIAGRAM AND COMPONENTS DESCRIPTION
2.1 BLOCK DIAGRAM

IR Sensor Arduino uno Transistor Relay Bulb


driver

Fig 2.1 Block diagram


The IR sensor senses the obstacle and generates the signal to the input port of the Arduino
board. After sensing the signal at the input, arduino generates an output signal which drives
a transistor driver at its base. When the base of the transistor receives the HIGH signal, the
transistor is turned ON which drives the Relay circuit. The relay is activated and provides a
connection between two ends of the bulb. The circuit diagram for the same is shown in Fig
2.2 which shows all the necessary

Fig 2.2 Circuit diagram

Dept. of ECE, PDIT, HOSPET Page 2


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

2.2 LIST OF COMPONENTS


1. ARDUINO UNO

Fig 2.3 Arduino Uno Board


ARDPower USB
Arduino board can be powered by using the USB cable from your computer. All you need
to do is connect the USB cable to the USB connection
Power (Barrel Jack)
Arduino boards can be powered directly from the AC mains power supply by connecting it
to the Barrel Jack
Voltage Regulator
The function of the voltage regulator is to control the voltage given to the Arduino board
and stabilize the DC voltages used by the processor and other elements.

Crystal Oscillator
The crystal oscillator helps Arduino in dealing with time issues. How does Arduino
calculate time? The answer is, by using the crystal oscillator. The number printed on top of
the Arduino crystal is 16.000H9H. It tells us that the frequency is 16,000,000 Hertz or 16
MHz

Arduino Reset

Dept. of ECE, PDIT, HOSPET Page 3


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

You can reset your Arduino board, i.e., start your program from the beginning. You can
reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET

Pins (3.3, 5, GND, Vin)


 3.3V (6) − Supply 3.3 output volt
 5V (7) − Supply 5 output volt
 Most of the components used with Arduino board works fine with 3.3 volt and 5
volts.
 GND (8) (Ground) − There are several GND pins on the Arduino, any of which can
be used to ground your circuit.
 Vin (9) − This pin also can be used to power the Arduino board from an external
power source, like AC mains power supply.
Analog pins
The Arduino UNO board has six analog input pins A0 through A5. These pins can read the
signal from an analog sensor like the humidity sensor or temperature sensor and convert it
into a digital value that can be read by the microprocessor.

Main microcontroller
Each Arduino board has its own microcontroller (11). You can assume it as the brain of
your board. The main IC (integrated circuit) on the Arduino is slightly different from board
to board. The microcontrollers are usually of the ATMEL Company. You must know what
IC your board has before loading up a new program from the Arduino IDE. This
information is available on the top of the IC. For more details about the IC construction and
functions, you can refer to the data sheet.

ICSP pin
Mostly, ICSP (12) is an AVR, a tiny programming header for the Arduino consisting of
MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred to as an SPI (Serial
Peripheral Interface), which could be considered as an "expansion" of the output. You are
slaving the output device to the master of the SPI bus.

Power LED indicator


This LED should light up when you plug your Arduino into a power source to indicate that
your board is powered up correctly. If this light does not turn on, then there is something
wrong with the connection.
Dept. of ECE, PDIT, HOSPET Page 4
OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

TX and RX LEDs
On your board, you will find two labels: TX (transmit) and RX (receive). They appear in
two places on the Arduino UNO board. First, at the digital pins 0 and 1, to indicate the pins
responsible for serial communication. Second, the TX and RX led (13). The TX led flashes
with different speed while sending the serial data. The speed of flashing depends on the
baud rate used by the board. RX flashes during the receiving process

Digital I/O

The Arduino UNO board has 14 digital I/O pins (15) (of which 6 provide PWM (Pulse
Width Modulation) output. These pins can be configured to work as input digital pins to
read logic values (0 or 1) or as digital output pins to drive different modules like LEDs,
relays, etc. The pins labelled “~” can be used to generate PWM.

AREF

AREF stands for Analog Reference. It is sometimes, used to set an external reference
voltage (between 0 and 5 Volts) as the upper limit for the analog input pins.

2. RELAY
In general, while designing electronics projects the loads are controlled (switched ON or
OFF) using microcontroller block. But, for this purpose the circuit requires relays, acting as
controlled switches (for different circuits different types of relays are used). Depending on
the signals received from the microcontroller or other control circuits the relay controls the
load. The relay consists of continuous power supply and whenever it gets driven or gets
control signal then the relay gets activated and loads can be turned ON or OFF.

3. JUMPER WIRE
To connect all the components that are Arduino Nano, OLED Module and Bluetooth
module jumper wires are used. These wires are use so that the information is successfully
passed and received from each device. There are usually male to male, female to female
and male to female jumper wires.

Dept. of ECE, PDIT, HOSPET Page 5


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

4. 547 TRANSISTORS

Fig 2.4 BC 547 Transistor

BC547 is a NPN transistor hence the collector and emitter will be left open (Reverse
biased) when the base is held at ground aid will be closed (Forward biased) when a signal
is provided to base pin. BC547 has a gain value of 110 to 800, this value determines the
amplification capacity of the transistor. The maximum amount of current that could flow
through the Collector pin is 100mA, hence we cannot connect loads that consume more
than 100mA using this transistor. To bias a transistor, we have to supply current to base
pin, this current (1B) should be limited to 5mA. When this transistor is fully biased then it
can allow a maximum of 100mA to flow across the collector and emitter. This stage is
called Saturation Region and the typical voltage allowed across the Collector-Emitter
(VCE) or Base-Emitter (VBE) could be 200 and 900 mV respectively. When base current
is removed the transistor becomes fully off, this stage is called as the Cut-off Region and
the Base Emitter voltage could be around 660 mV.

5. IR Sensor

An object can be detected with an infrared system consisting of an infrared transmitter


and a receiver. More in detail an IR transmitter, also known as IR LED, sends an
infrared signal with a certain frequency compatible with an IR receiver which has the
Dept. of ECE, PDIT, HOSPET Page 6
OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

task to detect it. There is different kind of IR sensors for different type of application. IR
technology is used, for example, in proximity sensors to detect a near object, in contrast
sensors to find a path or in counting sensors to count objects.

Principle of operation

The IR transmitter sends an infrared signal that, in case of a reflecting surface (e.g. white
colour), bounces off in some directions including that of the IR receiver that captures the
signal detecting the object.

When the surface is absorbent (e.g. black colour) the IR signal isn’t reflected, and the
object cannot be detected by the sensor. This result would occur even if the object is
absent.

IR transmitter and IR receiver

The IR transmitter is a particular LED that emits radiation in the frequency range of
infrared, invisible to the naked eye. An infrared LED just works as a simple LED with a
voltage of 3V DC and a current consumption of about 20mA. The IR receiver, such as a
photodiode or a phototransistor, is capable of detect infrared radiation emitted from the
IR transmitter. Aesthetically it is similar to a LED but the external capsule can be
wrapped by a dark color film.

Fig 2.5 IR Sensor

Dept. of ECE, PDIT, HOSPET Page 7


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

This Sensor module sends Infrared light (which can’t seen through naked eye) through IR
LED and detects bounce back or Reflected Infrared light waves from objects with IR
Receiver (Photo diode). Here Current flow from photodiode differs according to the
Received IR light. IC LM393 comparator gives output with respect to voltage from
Variable Resistor (Detection Distance Adjustment) and IR Receiver diode. On IR sensor
module there is a output LED which indicates the detection of obstacle. If LED ON –
obstacle detected or LED OFF – no obstacle in range. We can use this module as Digital
output sensor or Analog output Sensor with changes in Arduino Wiring and Code.

Dept. of ECE, PDIT, HOSPET Page 8


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 3
SOFTWARE PROGRAM DESCRIPTION
The following flow chart shows the program description that implements the mini project

Initialize Pin 13 as Output

Initialize Pin 8 as input

Constantly monitor input pin. If PIN 8


is LOW, then it is indicates presence of
obstacle. Send HIGH to PIN 13.

Constantly monitor input pin. If PIN 8


is HIGH then it is indicates no presence
of obstacle. Send LOW to PIN 13.

Fig 3.1 Flow Chart for the Project

Dept. of ECE, PDIT, HOSPET Page 9


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 4
ADVANTAGES & DISADVANTAGES

4.1 Advantages
1. Low cost.
2. Easy to use.
3. Lot of Applications can be implemented

4.2 Disadvantages
1. Distance is limited for IR sensors.

Dept. of ECE, PDIT, HOSPET Page 10


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 5
APPLICATIONS
The obstacle sensors can be used in the following applications

1. Smart cars

2. Robots

3. Home Automation systems

4. Theft detection

Dept. of ECE, PDIT, HOSPET Page 11


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

CHAPTER 6

CONCLUSIONS
Home of the future is a space for the digital natives. With the invention of lots of
automation technologies featuring IOT and Al, home automation has become a
reality. One can implement several of their tasks with just a single command of
verbal instructions. These technologies can used to build fully functional home
automation system and control smart home devices including smart lights,
connected thermostats, and appliances.

Dept. of ECE, PDIT, HOSPET Page 12


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

REFERENCES

1. https://docs.arduino.cc/
2. https://www.galco.com/comp/prod/relay.htm
3. https://www.electronicshub.org/what-is-relay-and-how-it-works/
4. https://www.circuitstoday.com/working-of-relays
5. https://robu.in/ir-sensor-working/
6. https://www.elprocus.com/infrared-ir-sensor-circuit-and-working/

Dept. of ECE, PDIT, HOSPET Page 13


OBSTACLE DETECTION AND RELAY DRIVING USING ARDUINO UNO

Dept. of ECE, PDIT, HOSPET Page 14

You might also like