VISVESVARAYA TECHNOLOGICAL UNIVERSITY
BELGAUM.
2018-19
A Mini Project Report On
“SMART DOOR USING SERVO MOTOR”
Submitted by
Shreyas.M.O 1JB17EC086
Semester:03(Batch: 2018-19)
Under the guidance of
“Mrs.NITHYA.S”
“Assistant professor,Dept of ECE, SJBIT”
“DEPARTMENT OF ELECTRONICS AND COMMUNICATION”
SJB INSTITUTE OF TECHNOLOGY
BGS HEALTH AND EDUCATION CITY
KENGERI, BANGALORE-560060
SJB INSTITUTE OF TECHNOLOGY
“DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING”
BGS HEALTH AND EDUCATION CITY
KENGERI,BANGALORE-560060,KARNATAKA,INDIA.
CERTIFICATE
Certified that the mini project work entitle“Smart Door Using Servo Motor” is a
bonafide work carried out by Shreyas.M.O (1JB17EC086) in the department of
“ELECTRONICS AND COMMUNICATION ENGINEERING” of the
Visvesvaraya Technological University, Belgaum, during the year 2018-19. The
report has been approved as it satisfies the requirements in respect of mini project
prescribed by the institution.
Mrs. Nithya.S Dr.K.V.Mahendra Prashanth
Asst.Proffesor, Dept of ECE Professor & HOD, ECE
Dr. Puttaraju
Principal, SJBIT
TABLE OF CONTENTS
CHAPTER PARTICULARS PAGE
NO.
1 Introduction 1
2 Circuit and its Description 2-8
3 Design and Development 9-10
4 Implementation Details 10-12
5 Conclusion and Future Study 13
6 References 15
ACKNOWLEDGEMENT
I would like to express my profound grateful to his holiness Padmabhushan Sri Sri Sri
Late. Dr. Balagangadharanatha Mahaswamiji and His Holiness Jagadguru Sri Sri Sri
Nirmalanandanatha Maha Swamiji for providing me an opportunity to pursue my studies in
this esteemed institution.
I would also like to express my profound thanks to his holiness Reverend Sri Sri Prakashnath
Swamiji, Managing Director, SJB Institute of Technology, for his continuous support in
providing amenities to carry out this project in this admired institution.
I express my gratitude to Dr. Puttaraju, Principal, SJB Institute of Technology, for providing
me an excellent facilities and academic ambience; which have helped me in satisfactory
completion of project work.
I extend my sincere thanks to Dr.K.V.Mahendra Prashanth,Head of the Department,
Electronics & Communication Engineering; for providing me an invaluable support
throughout the period of my project work.
I wish to express my heartfelt gratitude to my guide, Mrs.Nithya.S, for her valuable guidance,
suggestions and cheerful encouragement during the entire period of my project work.
I express my truthful thanks to Mrs.Nithya.S, Project Coordinator, Dept of Electronics &
Communication Engineering for her valuable support.
Finally, I take this opportunity to extend my earnest gratitude and respect to my parents,
Teaching & Non teaching staffs of the department, the library staff and all my friends, who
have directly or indirectly supported me during the period of my project work.
Shreyas.M.O
(1JB17ECO86)
ABSTRACT
Now a days everyone depends on the electronics which helps to human work done easy. In this work,
opening the door is also a job for humans if they want to enter inside or going outside. So opening door and
closing it can be done by the electronics which does this job using the motor and sensor with a controller to
control the open and close of door.
Here the sensor is used to sense the human so that it sends the signal to controller that indicates “some one
ready to enter in”. After receiving the signal as ‘1’ from sensor to controller, controller runs the motor to
open the door so that human can enter in. Here only 3 basic components is enough to build a simple smart
door opener it also consumes low power for its operation.
When the sensor senses the presence of human then it sends the signal to the servo motor through the
controller.It requires mainly three components namely Arduino board, PIR sensor and Servo motor.
CHAPTER 1
INTODUCTION:
The automatic door opening systems are used in commercial buildings, shopping malls, theatres, etc. These
systems are used to open the door when a person comes near to the entrance of the door and close it after he
moves away from the door or after entered into the door. There are various kinds of sensors are available in
the market to make such types of systems such as Radar sensors, PIR sensors,Infrared sensors and Laser
sensors, etc. This project uses a PIR sensor to open or close the door automatically which senses the infrared
energy produced by the human body.When someone approaches the door, the IR energy sensed by the PIR
sensor changes and activates the sensor to open and close the door automatically. Further, the signal sent to
microcontroller to control the door.
Opening and closing of doors have been always a boring job, especially in places where a person is always
required to open the door for visitors such as hotels, shopping malls and theatres. Here is a solution to open
and close the door i.e, movement sensed automatic door opening and closing system. This project is used to
sense any body movement nearby the door. This is achieved with the help of a passive infrared sensor.
Generally, a human body emits infrared energy which is detected by the PIR sensor from a particular
distance. This signal which is detected by the sensor is fed to a controller to function a door motor through
motor driver IC. When a body reaches the operating range of the PIR sensor, it sends a signal to the
microcontroller to open or to close the door.
1
CHAPTER 2
CIRCUIT AND ITS DESCRIPTIONS:
Fig:Smart door circuit using Arduino.servo motor and PIR sensor.
2
Fig:Circuit connection of PIRsensor with the Arduino board.
Fig:Circuit connection of servo motor with Arduino board.
3
2.1 COMPONENTS:
=> Arduino Uno Controller
=> Servo Motor
=> PIR Sensor
=> Bread Board
=> Jumper Wires
2.2 COMPONENTS DESCRIPTION:
Arduino Uno controller:
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.
Over the years Arduino has been the brain of thousands of projects, from everyday objects to complex
scientific instruments. A worldwide community of makers - students, hobbyists, artists, programmers, and
4
professionals - has gathered around this open-source platform, their contributions have added up to an
incredible amount of accessible knowledge that can be of great help to novices and experts alike.
Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast
prototyping, aimed at students without a background in electronics and programming. As soon as it reached a
wider community, the Arduino board started changing to adapt to new needs and challenges, differentiating
its offer from simple 8-bit boards to products for IoT applications, wearable, 3D printing, and embedded
environments. All Arduino boards are completely open-source, empowering users to build them independently
and eventually adapt them to their particular needs. The software, too, is open-source, and it is growing
through the contributions of users worldwide.
Servo Motor:
Servo motors use feedback to determine the position of the shaft, you can control that
position very precisely. As a result, servo motors are used to control the position of objects, rotate objects,
move legs, arms or hands of robots, move sensors etc. with high precision. Servo motors are small in size, and
because they have built-in circuitry to control their movement, they can be connected directly to an Arduino.
Most Servo motors have the following three connections:
• Black/Brown ground wire.
• Red power wire (around 5V).
• Yellow or White PWM wire.
In this experiment, we will connect the power and ground pins directly to the Arduino 5V
and GND pins. The PWM input will be connected to one of the Arduino's digital output pins.
5
PIR Sensor:
PIR sensors allow you to sense motion. They are used to detect whether a human has
moved in or out of the sensor’s range. They are commonly found in appliances and gadgets used at home or
for businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors.
Following are the advantages of PIR Sensors –
. Small in size
• Wide lens range
• Easy to interface
• Inexpensive
• Low-power
• Easy to use
• Do not wear out
PIRs have adjustable settings and have a header installed in the 3-pin
ground/out/power pads.
For many basic projects or products that need to detect when a person has left or
entered the area, PIR sensors are great. Note that PIRs do not tell you the number of people around or their
closeness to the sensor. The lens is often fixed to a certain sweep at a distance and they are sometimes set off
by the pets in the house.
PIR sensor has three terminals - Vcc, OUT and GND. Connect the sensor as follows −
• Connect the +Vcc to +5v on Arduino board.
• Connect OUT to digital pin 2 on Arduino board.
• Connect GND with GND on Arduino.
You can adjust the sensor sensitivity and delay time via two variable resistors located at the bottom of
the sensor board.
6
Once the sensor detects any motion, Arduino will send a message via the serial port to say that a motion is
detected. The PIR sense motion will delay for certain time to check if there is a new motion. If there is no
motion detected, Arduino will send a new message saying that the motion has ended.
Bread Board:
A breadboard is a construction base for prototyping of electronics. Originally it was literally a bread board,
a polished piece of wood used for slicing bread. In the 1970s the solderless breadboard (a.k.a. plugboard, a
terminal array board) became available and nowadays the term "breadboard" is commonly used to refer to
these.
Because the solderless breadboard does not require soldering, it is reusable. This makes it easy to use for
creating temporary prototypes and experimenting with circuit design. For this reason, solderless breadboards
are also popular with students and in technological education. Older breadboard types did not have this
property. A stripboard (Veroboard) and similar prototyping printed circuit boards, which are used to build
semi-permanent soldered prototypes or one-offs, cannot easily be reused. A variety of electronic systems may
be prototyped by using breadboards, from small analog and digital circuits to complete central processing
units (CPUs).
Breadboards have evolved over time, with the term now being used for all kinds of prototype electronic
devices. For example, US Patent 3,145,483, was filed in 1961 and describes a wooden plate breadboard with
mounted springs and other facilities. US Patent 3,496,419, was filed in 1967 and refers to a particular printed
circuit board layout as a Printed Circuit Breadboard. Both examples refer to and describe other types of
breadboards as prior art.
The breadboard most commonly used today is usually made of white plastic and is a pluggable (solderless)
breadboard. It was designed by Ronald J. Portugal in 1971.
7
Jumper Wires:
A jumper wire (also known as jumper wire, or jumper) 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.
Individual jump wires are fitted by inserting their "end connectors" into the slots provided in a breadboard,
the header connector of a circuit board, or a piece of test equipment.
There are different types of jumper wires. Some have the same type of electrical connector at both ends, while
others have different connectors. Some common connectors are:
Solid tips – are used to connect on/with a breadboard or female header connector. The arrangement of
the elements and ease of insertion on a breadboard allows increasing the mounting density of both
components and jump wires without fear of short-circuits. The jump wires vary in size and colour to
distinguish the different working signals.
Crocodile clips – are used, among other applications, to temporarily bridge sensors, buttons and other
elements of prototypes with components or equipment that have arbitrary connectors, wires, screw
terminals, etc.
Banana connectors – are commonly used on test equipment for DC and low-frequency AC signals.
Registered jack (RJnn) – are commonly used in telephone (RJ11) and computer networking (RJ45).
RCA connectors – are often used for audio, low-resolution composite video signals, or other low-
frequency applications requiring a shielded cable.
RF connectors – are used to carry radio frequency signals between circuits, test equipment, and
antennas.
8
CHAPTER 3
DESIGN AND DEVELOPMENT:
We already know the components required for this project. The connections are made as follows;
Passive Infrared Sensor (PIR) , a sensor that measures infrared light radiating from objects in field. The sensor
work upon the temperature changes in the field of its radiation. For example, if a human passes by its field the
temperature changes from room temperature to the body temperature this change in temperature is sent as a
signal to the Arduino board.
Connections of the PIR sensor to the Arduino board is as follows :-
• VCC to the positive railings of the Bread board.
• OUT pin to the Digital pin 12 of the Arduino board.
• GND pin to the Negative railings of the Bread board.
Servo motors, A specially designed motor to control the angular positions.It has three wires coming out of its
case i.e Signal wire(Orange wire), VCC wire(Usually red) and ground wire (Usually black or even maroon ).
The Servo are connected to the Arduino as follows:
• Signal wire (Orange wire) is connected to the digital pin 4.
• VCC wire (red wire) is connected to the positive railings of Breadboard.
• GND wire is connected to the Negative railings of the breadboard.
First, the Data OUT of the PIR Sensor is connected to Digital Pin 8 of Arduino. The other two pins of PIR
Sensor i.e. Vs and GND are connected to +5V and GND respectively.
9
Coming to the Motor Driver, we have used the second channel of the L298N Motor Driver Module. Hence,
the IN3 and IN4 of the L298N Motor Driver are connected to Digital Pins 2 and 3 of Arduino.
The Enable Pin of the Second Motor on the L298N Module us connected to +5V. Usually, all the L298N
Modules consists of a jumper to directly connected the Enable pins to +5V. You can use this option.
Since the motor used in the project is a 5V Motor, I’ve connected a 5V Supply to the Motor Driver Module.
CHAPTER 4
IMPLEMENTATION DETAILS:
Here in this project the instuctions are given to
the Arduino controller by using a simple program (code).
CODE:
#include <Servo.h>
Servo servo1;
int i = 0;
int LED = 13; inputPin = 2;
int PIR_STATE = LOW;
int VALUE = 0;
10
void setup() {
pinMode(LED, OUTPUT);
Serial.begin(9600);
servo1.attach(3);
void loop(){
VALUE = digitalRead(inputPin);
if (VALUE == HIGH) {
while(VALUE == HIGH){
digitalWrite(LED, HIGH);
if (PIR_STATE == LOW) {
Serial.println("Motion has been detected!");
PIR_STATE = HIGH;
for (i = 0; i < 180; i++) {
servo1.write(i);
delay(30);
if (PIR_STATE == HIGH){
Serial.println("Motion has been stopped!");
11
PIR_STATE = LOW;
for (i = 180; i > 5; i--) {
servo1.write(i);
delay(30);
else {
digitalWrite(LED, LOW);
if (PIR_STATE == HIGH){
Serial.println("Motion has been stopped!");
PIR_STATE = LOW;
for (i = 180; i > 5; i--) {
servo1.write(i);
delay(10);
12
CHAPTER 5
CONCLUSION AND FUTURE STUDY:
CONCLUSION:
From this project we can reduce the human work of opening door and closing it this even cost low. We can
implement this idea anywhere like office, home, companies, malls, hospital and college etc….
We can future implement LCD display and improve the accuracy of PIR sensor so that can detect the
humans faster then before. Improving the coding as that micro controller gets faster then before. We can also
implement GMS for home security purpose so that if someone enters home while there is no one in home it
automatically sends the message.
SCOPE FOR FUTURE STUDY:
The next phase for the Home automation market will occur based on a few key improvements in the
technology available in Automation, such as improvement in Wireless Automation solutions as well as
lowering of price points as the market begins to accept Home automation usage in larger volumes.
13
CHAPTER 6
REFERENCES:
https://www.arduino.cc/en/Guide/HomePage
https://www.allaboutcircuits.com/projects/servo-motor-control-with-anarduino/
https://www.tutorialspoint.com/arduino/arduino_pir_sensor.htm
14