TCP/IP Based Cruise Control in Traffic Situation Using Raspberry Pi” Submitted in the Partial Fulfillment of the Requirement for the Award of the Degree Of
Total Page:16
File Type:pdf, Size:1020Kb
Visvesvaraya Technological University Belagavi-590018, Karnataka A Project Dissertation on “TCP/IP Based Cruise Control in Traffic Situation Using Raspberry pi” Submitted in the partial fulfillment of the requirement for the award of the degree of BACHELOR OF ENGINEERING in ELECTRONICS AND COMMUNICATION ENGINEERING Submitted by SURAJ KUMAR USN 1NH13EC757 ANJIT SOMANI USN 1NH13EC707 MOHAMMED SADIQ USN 1NH13EC733 Under the guidance of Ms. Divya Sharma Senior Assistant Professor Department of Electronics & Communication Engineering NHCE, Bangalore-560103 Department of Electronics & Communication Engineering, NHCE, Bangalore-560103 2016-17 NEW HORIZON COLLEGE OF ENGINEERING, BANGALORE Autonomous College affiliated to VTU, approved by AICTE & UGC Accredited by NAAC with ‘A’ Grade Outer Ring Road, Marathalli, Bangalore-560103 DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING Certificate Certified that the project work entitled TCP/IP Based Cruise Control in Traffic Situation Using Raspberry pi carried out by SURAJ KUMAR (USN 1NH13EC757), ANJIT SOMANI (1NH13EC707 ) and MOHAMMED SADIQ ( 1NH13EC733 ) , bonafide students of 8th semester in partial fulfillment for the award of degree of Bachelor of Engineering in Electronics and communications Engineering of Visvesvaraya Technological University, Belgaum during the year 2016-17. It is certified that all corrections/suggestions indicated for internal assessment have been incorporated in the report deposited in the departmental library. The project report has been approved as it satisfies the academic requirements in respect to Project work prescribed for the said Degree. (SIGNATURE OF THE GUIDE) (SIGNATURE OF THE HOD) (SIGNATURE OF THE PRINCIPAL) Ms. Divya Sharma Dr. Sanjay Jain Dr. Manjunatha Senior Assistant Professor Head of Department Principal Department of Department of NHCE, Bangalore Electronics & Communication Engineering Electronics & Communication Engineering NHCE, Bangalore NHCE, Bangalore External Viva Name of the Examiners Signature with Date 1._____________________ _____________________ 2. _____________________ _____________________ ABSTRACT This paper deals with the design of new cruise control systems that can help in safe maneuver in traffic condition. It consists of two Raspberry Pi’s, one act as slave and other controller as a master. Slave consists of different sensor network accelerometer, ultrasonic sensor and humidity sensor. It consists IR sensor to gauge the recurrence of revolution of vehicle's wheel Using TCP/IP protocol slave module transmit the data i.e. from accelerometer, ultrasonic sensor, ir sensor, humidity sensor to the master module on the other end. The values of the sensors should be less than the threshold value, if it raise above the threshold then it give alert to driver to reduce speed of DC motor of the vehicle. The values of the sensors are displayed on the LCD. ACKNOWLEDGMENT The satisfaction that accompanies the successful completion of any task would be incomplete without due reverence given to those who made it possible, whose constant guidance and encouragement crowned our efforts with success. Firstly, we would like to express thanks to our college which has given us this opportunity to work on this project. We convey our sincere gratitude to Dr. Manjunatha, Principal, NHCE, Bangalore for facilities provided in college and for the support in numerous ways. We remain indebted to Dr. Sanjay Jain, HOD, Department of E&C, NHCE for permitting us to take up the project work. We would like to express our profound gratitude to our internal guide Ms. Divya Sharma, Senior Assistant Professor, Department of E&C, NHCE. We would like to express our deepest sense of gratitude to our parents and friends who have been a great source of moral support, courage, for giving us a helping hand and making us go smiles with their lovable presence during our tough times and relieving us from stress throughout our project endeavor. We also thank our teaching and non-teaching staff members of Department of E&C, NHCE TABLE OF CONTENTS Chapter 1 INTRODUCTION………………………………………………………..…...1 1.1 Problem and Motivation………………………………………………………………….1 1.2 Cruise Control System……………………………………………………………………..1 Chapter 2 LITERATURE SURVEY……….………………………………………...2-3 2.1 Literature Survey…………………..……………………………………………..………….2 2.2 Objective……………………………….…………………………………………………….….2 2.3 History of cruise control (cc)….………………………………………………………..3 Chapter 3 BLOCK DIAGRAM…………….……….…………………………………4-5 3.1 Block Diagram………………………………….………………………………………………4 3.2 Working …………………………………………….……………………………………………4 3.3 Components Requirements………….………………………………………………… 5 Chapter 4 HARDWARE SPECIFICATIONS I..………………….…………....6-27 4.1 TCP/IP Module (DSL modem)…….…………………………………………………….6 4.1.1 TCP/IP Layer…………………………………………………………………………...7 4.2 Raspberry Pi…………………………………………………………………………………….8 4.2.1 General Specifications…………………..…………………………………………8 4.2.2 Overview…………………………………………..…………………………………….9 4.2.3 Hardware……………………………………………..…………………….…………10 4.2.4 Processor……………………………………………………………………………… 11 4.2.5 RAM…………………………………………………………..………………………….12 4.2.6 Networking…………………………………………………..……………………….12 4.2.7 Peripherals…………………………………………………………………………….13 4.2.8 Video……………………………………………………………….…………………….13 4.2.9 Real-time Clock…………..………………….……………………………………..13 4.3 Generation of Raspberry Pi…………………….………………………………....….15 4.4 General Purpose Input-Output (GPIO) Connector…….……………………18 4.5 Software…………………………………………………………………….…...…………….19 4.5.1 Operating System…………….……………………………………….….………19 4.5.2 Driver APIs…………………………….………………………………….….………22 4.5.3 Firmware………………………………..…..…………………………….….……..23 4.5.4 Third Party Application Software……….……….………………………..23 4.5.5 Software Development Tools Firmware…………….…………...…...24 4.5.6 Reception and Use……………..…………………………………..……………25 Chapter 5 HARDWARE SPECIFICATION II………………..…………...…27-47 5.1 Humidity Sensor…………………………………………………………….……………....27 5.1.1 Relevant Moisture Terms…………………………………………..…………..28 5.1.2 Humidity Sensing - Classification & Principles.…..……................29 5.1.3 Pros and Cons………..………………………………………….…..………………31 5.1.4 Other Humidity Sensing Mechanisms.……..…………………………….32 5.1.5 Humidity Sensors Characteristics……………..…….…………………..…32 5.1.6 Selecting a Humidity Sensors………………..…………...….………..…...34 5.2 Ultrasonic Sensor…………………………………………………………….……...........35 5.2.1 Working of Ultrasonic Sensor….…………….…….………….…………....38 5.3 LCD………………………………………………………………………….………….………..…39 5.3.1 Registers……………………………………….………………….……………………39 5.3.2 Pin Description…………………..…………………………….………..............40 5.3.3 Commands on LCD………………………………..………………….……………42 5.4 IR Sensor………………………………………………………………..………….………...…43 5.4.1 Types of IR Sensor………………………………………………..…….………….43 5.5 DC Motor……………………………………………………………………………..….….....45 5.6 Piezo Buzzer……………………………………………………………………….……………46 5.7 IC MCP3008…………………………………………………………………..…………….….47 Chapter 6 SOFTWARE SPECIFICATION………………………….………48-52 6.1 Python……………………………………………………………………………………………48 6.1.1 About Python…………………………………………………………………………49 6.2 IDLE………………………………………………………………………..…………..…………50 6.2.1 Features……………………………………………………….…………………….…51 6.3 NOOBS………………………………………………………………………..……………...…51 Chapter 7 WORK FLOW……………………………………………….…………..52-54 7.1 Working of Proposed System…………………………………...……………...52 Chapter 8 GETTING CONNECTED…………………………………………….55-57 Chapter 9 CONCLUSION………………………………………………………………..58 Chapter 10 REFRENCES………………………………………………………………..59 APPENDIX……………………………………………………………………………….60-64 TCP/IP Based Cruise Control in Traffic Situation Using Raspberry Pi 2016-17 CHAPTER 1 INTRODUCTION 1.1 Problem and Motivation Recent studies demonstrate that 33% of the road accidents are connected with unreasonable or wrong speed, and changes in the roadway (like the presence of street work or sudden hindrances).To reduce the number of accidents and their consequences are the great concern for the traffic authorities.There are several control systems available for vehicle today that provide high safety and comfort and one such is the driver assistance system in cruise control, which as capability of maintaining a safe distance from the vehicle ahead. Cruise Control (CC) is the control system that automatically controls the speed of the vehicle and maintain a distance from an obstacle and vehicles on the road. If the sensors on the cruise control detects any obstacle then it will alert driver to controls the speed of the vehicle in order to avoid the collisions and save loss of life. 1.2 Cruise Control System Cruise Control System (CCS) may use various sensors like (range finder, humidity sensor, RADAR, etc.) to detect the obstacle ahead and the sensor send the information to the controller and the data is processed to control the vehicle’s motor speed. DEPARTMENT OF ELECTRONICS AND COMMUNICATION, NHCE 1 | Page TCP/IP Based Cruise Control in Traffic Situation Using Raspberry Pi 2016-17 CHAPTER 2 LITERATURE SURVEY 2.1 Literature Survey Nowadays mishaps are happening as often, loss of life by making a small mistake while driving (school zone, slopes region, highways etc). So, with a specific end goal to stay away from such sort of mischance and to caution the drivers and to control their vehicle speed in such sort of spots the roadway authorities have put the signboard. Once in a while it might to conceivable to view that sort of signboards and there is a chance for accidents. So, to alert the driver about the road condition and the speed restrain consequently, is done by utilizing RF technology. Cruise Control is an expansion of existing control frameworks,