Security And Car Parking System Project Work Final PDF
Document Details
Uploaded by Deleted User
The University of Calcutta
Eram Tanwir Prakash Kumar Jaiswal
Tags
Summary
This document is a project report on security and car parking system. It details the use of sensors and automation technology for a car parking system. The project was submitted by Eram Tanwir and Prakash Kumar Jaiswal for an MSc in Electronic Science at the University of Calcutta.
Full Transcript
A PROJECT STAGE-2 REPORT on SECURITY AND CAR PARKING SYSTEM Submitted in Partial Fulfilment of the Requirements for the M.Sc. Degree in ELECTRONIC SCIENCE Of...
A PROJECT STAGE-2 REPORT on SECURITY AND CAR PARKING SYSTEM Submitted in Partial Fulfilment of the Requirements for the M.Sc. Degree in ELECTRONIC SCIENCE Of THE UNIVERSITY OF CALCUTTA By Eram Tanwir Prakash Kumar Jaiswal Roll No.: C91/ELC/221009 C91/ELC/221015 Reg. No.: 115-1211-1840-18 111-1121-0778-16 Under the Guidance of Dr. Jayee Sinha 0 ACKNOWLEDGEMENT It is a pleasure for me to take this project we feel highly motivated in doing the project stage-2 report entitled “SECURITY AND CAR PARKING SYSTEM”. I express my deep sense of gratitude to our supervisor Dr. Jayee Sinha whose able guidance and unfailing encouragement at every step has helped us to give the present shape of this project work. This project would not have completed without her help and worthy experience. Whenever I was in need, she was there for help. Although this report has been prepared with utmost care and deep-rooted interest even then I accept respondent and imperfections. Department of Electronic Science Eram Tanwir: Prakash Kumar Jaiswal: 1 UNIVERSITY OF CALCUTTA DEPARTMENT OF ELECTRONIC SCIENCE 92, Acharya Prafulla Chandra Road, Kolkata – 700 009 Date: Certificate of Approval This is to certify that the M. Sc. (4 semester) dissertation entitled "Arduino based mini- Weather station" submitted by Abhirup Pal [Roll No.-C91/ELC/221002] in partial fulfilment of the requirements for the degree of Master of Science in Electronic Science of The University of Calcutta is absolutely based upon their own work under my supervision. Neither the dissertation nor any part of the dissertation has been submitted for any degree, diploma or any other academic award anywhere before. ……………………… (Dr. Jayee Sinha) 2 CONTENT SL. NO. TOPIC PAGE NO. 1 ABSTRACT 4 2 INTRODUCTION 4 3 COMPONENTS 4-5 4 IR wave generator led (transmitter) and IR wave 5-8 detector photodiode (receiver) 5 LDR 8-10 6 LCD I2C Display 10 7 Arduino uno 10 8 Set up an automatic door and display for a 10-14 public garage 9 Appendix 15-25 10 Reference 26-27 3 ABSTRACT One of the first things we learn about electricity after learning its name is that it always looks for the path of least resistance. We humans are also like that. That’s what drives us to keep looking and inventing new ways to make our lives easier. From how the control fire to how to travel faster than sound we have made life easier on so many fronts in so many ways, but still we haven’t stopped. And the new face of this centuries-long search is automation. According to IBM, “Automation is the application of technology, programs, robotics or processes to achieve outcomes with minimal human input.” But it raises the question that we humans work by being aware of our surroundings with various kinds of senses. We see, smell, hear, and feel the touch and taste. How does a machine see? That’s where sensors come to the rescue. Sensors work similarly to the sensory organs of humans. As our sensory organs generate pulses that travel via neurons to the brain, sensors generate electrical output which varies when the surroundings change in a particular way, which travels via wire to the processor. In this paper, we are going to automate some such tasks using sensors. INTRODUCTION IR sensor or Infrared sensor is a semiconductor device, more specifically a photodiode that responds to the Infrared energy. As we know when an energy wave travels it bounces back from obstacles it encounters in its way. Same way infrared waves, when hit an obstacle, bounce back. And in the process of travelling, it constantly loses intensity. If we know how much intensity it had at the source and how much energy is reaching the sensor then we can calculate the distance it has traveled. That is the basic concept of the IR sensor. Using this we can detect when an object is nearby and using the output from the ir sensor can do task of our choosing. COMPONENTS IR wave generator led (transmitter) and IR wave detector photodiode (receiver) 4 Arduino board Servo motors LDR Power supply Resistance Potentiometer Comparator IC (LM358) Breadboard Normal led LASER Connecting wire Buzzer LCD I2C Display IR wave generator led (transmitter) and IR wave detector photodiode (receiver) An electronic device designed to detect and measure IR radiation emitted by the object. That means any and every object according to its temperature realizes IR wave. Now as it is energy, when it falls on a semiconductor it excites the carriers. When introduced to a diode it generates a flow of carriers thus creating current, which in turn reacts with the resistance of the diode and creates a potential difference. 5 But the IR wave that gets realized from the human body or our daily surroundings is very low energy. Thus, it generates a very low amount of output which is hard to detect. So, to use IR to detect or measure the distance of an object we use an IR LED that generates a strong IR signal that can travel further and have more energy at the destination So we use this IR LED to generate an IR signal. It travels in a straight path and if it comes in contact with any object it bounces back from the object. This bounced-back signal is then received by the receiver or photodiode and generates potential difference which we measure. As the wave gets reflected from an object some of it gets absorbed which depending on the type of object or color of the object varies. So, to understand the relation between distance and voltage generated by an IR sensor and also to observe how it changes with different colours we conduct a simple experiment 6 Here we have created a simple system to measure the potential difference created by the reflected IR signal. 2.22 2.2 Voltage vs Distance for IR For off- 2.18 white colour 2.16 2.14 2.12 2.1 2.08 2.06 0 5 10 15 20 25 30 35 40 45 50 Distance A graphical representation of the output of IR for different shades of white 4.5 distance vs voltage for IR voltage 4 voltage data taken from two different pointmeasurement taken directly 3.5 from the reciver diode 3 voltage 2.5 2 1.5 1 0.5 0 0 5 10 15 20 25 30 35 40 45 50 distance 7 A graphical representation of output of IR at different point of the circuit 4.5 Distance vs voltage for IR 4 distance vs voltage for 3.5 skyblue paper distance vs voltage for g 3 light yellow paper 2.5 2 0 10 20 30 40 50 distance in cm A graphical representation of output of IR for different color objects As we can see different color objects can change the output of an IR sensor. Thus this is not a very reliable way to accurately measure distance. But as they all gets detected we can use the output to do some task for that we need to change the output signal from analog to a digital signal. For this we use what is known as a comparator circuit. We take the output of the sensor and take a predetermined voltage as reference. By comparing this two we can detect when an object is within a certain distance although to knowing the exact distance 8 when we set a reference voltage using the potentiometer the comparator starts to compare the two-input voltage (voltage from the pot and voltage from the sensor). When an object is detected by the sensor it gives out a voltage that increases as the object comes closer. When the output voltage from the sensor gets bigger than the set voltage the comparator gives out output HIGH or 1 This way a digital output signal can be generated when an object comes within a set range of the IR sensor. LDR When the surface is exposed to light there will be a change in resistance between them. Then mechanism behind the photo-resistor or LDR is photo-conductivity 14 12 10 8 6 for blue led 4 2 0 0 1 2 3 4 5 6 VOLTAGE LDR is also a type of photodetector that works within the range of visible light sources. LDR stands for Light Dependent Resistance. The width of the depletion region of the diode changes when light falls upon it, in turn changing its resistance. As different colour light has a different wavelength and thus different energy, the LDR responds accordingly. here we have studied a comparative response graph of the LDR with color. 9 As we can see in the above graph the resistance of the LDR changes with the wavelength of light and their intensity. So, to detect an object there needs to be a difference of light and dark on the surface of the LDR. But not all object emits light. Also, most of the time there is always some residual light or reflected light reaching the surface of the LDR, which makes it harder to accurately operate. To solve this issue we have introduced laser light as the light emitting source. Laser has high intensity and very unidirectional light, which omits the problem of reflected or residual light and the problem of low intensity altogether LCD I2C Display I2C or I2C, pronounced I-square-C, is a multi-master, multi-slave, single-ended, serial computer bus. The liquid crystal display function displays slot count. The I2C bus components are used a bi-directional two-wire. First is SDA (serial data) and second is SCL (serial clock). I2C bus supports any IC fabrication process i.e. it may be NMOS CMOS or bipolar. Each device is recognized by a unique 7 or 10-bit address. It can operate as either a transmitter or receiver, depending on the function of the device. Arduino UNO Arduino Uno is an open-source microcontroller board based on the Atmega328. It has 14 digital input/output pins (6 can be used as PWM outputs) and 6 analog inputs. It contains everything needed to support the microcontroller, and it can be connected to a computer with a universal serial Bus (USB) cable to get started. 10 The Arduino Uno can be programmed with the Arduino Integrated Development (IDE). The C-based simple program code for the Arduino is called a sketch. The collection of sketches for specific functionalities is referred to as libraries. Fig.1:Arduino UNO board After we get an output from the sensor, that is it can detect an object within preset proximity, we can use that output to operate any kind of machine. As an example, we will use this to – SET UP AN AUTOMATIC DOOR AND DISPLAY FOR A PUBLIC GARAGE Often time in an under-ground public garage we can’t tell if there is parking space available or not before entering the garage. It is always a gamble. And from time to time, it can get pretty frustrating to enter parking when you are in a rush, only to find out that there is no space available. So, we here are trying to solve this predicament. The circuit diagram for the gate – 11 Here we are using two IR sensors that are placed on either side of the gate which is controlled by a servo motor. Let's name them IRout and IRin. IRout is situated outside of the gate toward the road. IRin is situated inside the gate towards the garage. When one IR sensor detects a car, it opens the gate and it stays open until the IR sensor on the other side detects the object passing by. In this way, we can open the gate from both sides and the gate doesn’t close on the car. We have used the Arduino to keep track of which IR is responsible for opening the gate, to calculate how many cars have entered the garage and thus how many spaces are left in the garage. If the IRout opens the gate that is considered as a car entering and the available slot number is decreased by one in the display. If the IRin opens the gate that is interpreted as a car entering the garage and thus 1 is added to the number of available slots on the screen. An LCD (16x2) has been used to show this information to make it efficient for the driver. Setting up a security alarm system for proximity detection using an IR sensor- 12 If simplified, this device detects an object coming in or going out of a predefined range, at which point it triggers an alarm to let the user know about the change. We can use this in a vast range of situations. Here we have set it up as a detector for a door being opened. Which can be used for security purposes. Circuit diagram- In this device as long as the IR sensor is detecting an object the alarm doesn’t sound. When it doesn’t detect any object (in this case door), the alarm goes off. Now if we set this up on the wall by the door where it swings by, or in a chest just below the lead then if the door or the lead opens the alarm will ring letting us know of this change. 13 Setting up and object detection for the indication of empty car parking 14 In a large parking area, it is a bothersome task to see and understand where an 8’ spot is available between two cars. More so when you are in the driving seat with limited visibility and even more restricted maneuverability. So, we have taken measure here to make it easier for the driver to point out the empty spaces for better use of there time. We have set up an LASER and LDR obstacle detection system and have hooked it up with an indicator light. When there is no car in a spot the laser can easily reach the LDR in which case it considers the space in between them as empty. The indicator light is turned on in that case. When a car arrives it breaks the line between the LASER and the LDR, thus telling the microprocessor that an object has arrived in the parking space and it turns off the indicator light. This way when a car enters the garage or parking lot it, the driver don’t have to check for an open spot while driving which is not safe. 15 APPENDIX DATA LISTS FOR THE GRAPHS Table for off white and complete white colour paper distance (cm) voltage (v) voltage (v)2 0 2.17 2.17 1 2.19 2.2 2 2.18 2.19 3 2.18 2.19 4 2.17 2.18 5 2.17 2.18 6 2.16 2.17 7 2.16 2.16 8 2.15 2.16 9 2.14 2.15 10 2.14 2.14 11 2.13 2.14 12 2.13 2.13 13 2.12 2.13 14 2.12 2.13 15 2.11 2.12 16 2.11 2.12 17 2.11 2.12 18 2.11 2.11 19 2.1 2.11 20 2.1 2.11 21 2.1 2.11 22 2.1 2.11 23 2.1 2.11 24 2.1 2.1 25 2.09 2.1 26 2.09 2.1 27 2.09 2.1 28 2.08 2.1 29 2.08 2.1 30 2.08 2.1 31 2.08 2.09 32 2.08 2.09 16 33 2.08 2.09 34 2.08 2.09 35 2.08 2.09 36 2.08 2.09 37 2.08 2.09 38 2.08 2.09 39 2.08 2.08 40 2.08 2.08 41 2.08 2.08 42 2.08 2.08 43 2.07 2.08 44 2.07 2.08 45 2.07 2.08 Table for complete white colour paper where voltages are taken from resistance+resiver and only resiver distance (cm) voltage (v)2 voltage (v)3 0 2.17 3.68 1 2.2 4.25 2 2.19 3.6 3 2.19 3.6 4 2.18 3.55 5 2.18 3.44 6 2.17 3.38 7 2.16 3.25 8 2.16 3.08 9 2.15 2.99 10 2.14 2.92 11 2.14 2.83 12 2.13 2.76 13 2.13 2.73 14 2.13 2.68 15 2.12 2.64 16 2.12 2.62 17 2.12 2.57 18 2.11 2.55 19 2.11 2.52 20 2.11 2.5 21 2.11 2.46 22 2.11 2.46 23 2.11 2.45 24 2.1 2.44 25 2.1 2.43 17 26 2.1 2.42 27 2.1 2.4 28 2.1 2.39 29 2.1 2.38 30 2.1 2.37 31 2.09 2.37 32 2.09 2.36 33 2.09 2.36 34 2.09 2.35 35 2.09 2.34 36 2.09 2.34 37 2.09 2.34 38 2.09 2.34 39 2.08 2.33 40 2.08 2.32 41 2.08 2.32 42 2.08 2.32 43 2.08 2.31 44 2.08 2.31 45 2.08 2.31 Data table of ir response in distance vs voltage for different color objects distance (cm) voltage voltage (light voltage voltage (black voltage (skyblue yellolw paper) (brown paper) (white paper) paper) paper) 0 3.15 3.2 2.75 2.08 3.68 1 3.42 4.01 3.62 2.18 4.25 2 3.63 3.44 3.1 2.19 3.6 3 3.44 3.29 3.04 2.2 3.6 4 3.37 3.19 2.96 2.2 3.55 5 3.28 3.08 2.85 2.2 3.44 6 3.07 2.9 2.76 2.19 3.38 7 2.92 2.82 2.64 2.17 3.25 8 2.77 2.72 2.55 2.16 3.08 9 2.66 2.59 2.47 2.14 2.99 10 2.58 2.54 2.42 2.14 2.92 11 2.5 2.5 2.38 2.13 2.83 12 2.45 2.46 2.35 2.13 2.76 13 2.43 2.42 2.32 2.13 2.73 14 2.4 2.41 2.3 2.13 2.68 15 2.4 2.39 2.28 2.13 2.64 16 2.39 2.37 2.27 2.14 2.62 18 17 2.38 2.37 2.26 2.14 2.57 18 2.36 2.36 2.25 2.15 2.55 19 2.35 2.34 2.25 2.15 2.52 20 2.34 2.33 2.24 2.16 2.5 21 2.33 2.32 2.23 2.17 2.46 22 2.32 2.31 2.23 2.18 2.46 23 2.31 2.3 2.23 2.19 2.45 24 2.3 2.3 2.23 2.19 2.44 25 2.3 2.29 2.23 2.2 2.43 26 2.28 2.29 2.23 2.2 2.42 27 2.28 2.28 2.23 2.21 2.4 28 2.27 2.28 2.24 2.22 2.39 29 2.27 2.28 2.24 2.22 2.38 30 2.27 2.28 2.25 2.22 2.37 31 2.26 2.28 2.25 2.22 2.37 32 2.26 2.28 2.25 2.22 2.36 33 2.25 2.28 2.26 2.22 2.36 34 2.25 2.28 2.26 2.22 2.35 35 2.25 2.28 2.26 2.22 2.34 36 2.25 2.28 2.26 2.22 2.34 37 2.25 2.28 2.27 2.22 2.34 38 2.25 2.27 2.27 2.22 2.34 39 2.25 2.27 2.27 2.22 2.33 40 2.25 2.27 2.27 2.22 2.32 41 2.25 2.27 2.28 2.22 2.32 42 2.25 2.27 2.28 2.22 2.32 43 2.25 2.27 2.28 2.22 2.31 44 2.25 2.27 2.28 2.22 2.31 45 2.25 2.27 2.28 2.22 2.31 46 2.25 2.27 2.28 2.22 2.31 47 2.24 2.27 2.28 2.22 2.31 48 2.24 2.27 2.28 2.22 2.31 49 2.24 2.27 2.28 2.23 2.31 50 2.24 2.27 2.28 2.23 2.31 Table for voltage vs resistance for LDR VOLTAGE RESISTANCE (red RESISTANCE RESISTANCE RESISTANCE LED) (blue LED) (yellow LED) (green LED) 0.98 6.023333333 12.40333333 7.16 10.74 1.18 5.403333333 10.66333333 6.633333333 9.256666667 1.37 4.943333333 9.276666667 6.19 8.073333333 1.57 4.56 8.136666667 5.803333333 7.096666667 19 1.76 4.24 7.2 5.473333333 6.293333333 1.96 3.953333333 6.366666667 5.196666667 5.573333333 2.16 3.703333333 5.66 4.976666667 4.963333333 2.35 3.5 5.04 4.79 4.43 2.55 3.333333333 4.49 4.643333333 3.95 2.75 3.196666667 4 4.513333333 3.526666667 2.94 3.093333333 3.566666667 4.41 3.146666667 3.14 2.993333333 3.18 4.346666667 2.806666667 3.33 2.94 2.826666667 4.316666667 2.503333333 3.53 2.903333333 2.516666667 4.293333333 2.23 3.73 2.873333333 2.233333333 4.306666667 1.993333333 3.92 2.903333333 2.006666667 4.323333333 1.796666667 4.12 2.933333333 1.79 4.036666667 1.61 4.31 3.32 1.613333333 4.45 1.45 4.51 3.12 1.456666667 4.547666667 1.323333333 4.71 3.26 1.34 4.673333333 1.22 4.9 3.426666667 1.253333333 4.793333333 1.146666667 Code for car parking system with the help of IR sensor //CAR PARKING SYSTEM WITH HELP OF IR SENSOR #include #include LiquidCrystal_I2C lcd(0x27,16,2); #include Servo myservo; int IR1 = 6; int IR2 = 3; int Slot = 5; //Total number of parking Slots 20 int flag1 = 0; int flag2 = 0; void setup() { Serial.begin(9600); lcd.init(); //initialize the lcd lcd.backlight(); //open the backlight pinMode(IR1, INPUT); pinMode(IR2, INPUT); myservo.attach(9); myservo.write(100); lcd.setCursor (0,0); lcd.print(" CAR PARKING "); lcd.setCursor (0,1); lcd.print(" SYSTEM "); delay (3000); lcd.clear(); } void loop(){ if(digitalRead (IR1) == LOW && flag1==0){ if(Slot>0){ flag1=1; if(flag2==0){ 21 myservo.write(0); Slot = Slot-1; } } else{ lcd.setCursor (0,0); lcd.print(" SORRY :( "); lcd.setCursor (0,1); lcd.print(" Parking Full "); delay (3000); lcd.clear(); } } if(digitalRead (IR2) == LOW && flag2==0){ if(Slot