You are on page 1of 53
VISVESVARAYA TECHNOLOGICAL UNIVERSITY Jnana Sangama, BELAGAVI Ca Se “IOT using Raspberry Pi and Python” Project report submitted in partial fulfillment of the requirements for the award of BACHELOR OF ENGINEERING SAI SUPRIVA K IDTISEEO34 Under the Guidance of BHAVANI SHANKARI V CRANES VARSITY, BANGLORE Department of Electrical & Electronies Engineering, DAYANANDA SAGAR ACADEMY OF TECHNOLOGY & MANAGEMENT Udayapura, Kanakapura main Road, Opp: Art of Living, Bang: a2 Scanned with CamScanner Dayananda Sagar Academy of Technology & Management Department of Electrical & Electronics Engineering CERTIFICATE Certified that the Internship Work entitled “IOT USING RASPBERRY PI AND PYTHON? is a bonafide work carried out by Ms. SAI SUPRIVA K_ (1DTISEE034) in partial fulfillment for the award of Bachelor of Engineering in Electrical & Electronics Engineering of the Visvesvaraya Technological University, Belagavi during the year 2018-2022. It is certified that all the corrections/suggestions indicated for intemal assessment have been incorporated in the report deposi ed in the departmental library, The Project Report has been approved as it satisfies the academic requirements in respect of Project Work prescribed for the said degree. Signature of Guide Bhavani Shankari V Name of The Examiners L Signature of HOD Dr. Rupam Bhadurt Signature of Principal Dr. BR Lakshmikantha Signature With Date Scanned with CamScanner Dayananda Sagar Academy of Technology & Management Department of Electrical & Electronics Engineering DECLARATION We, Ms, SAI SUPRIYA K (IDTISEE034), hereby declare that the internship work entitled “OT USING RASPBERRY PI AND PYTHON” has been independently carried out by us under the guidance of BHAVANI SHAKANRI V, Cranes Varsity, Bangalore, in partial fulfillment of the requirements of the degree of Bachelor of Engineering in Electrical & Electronics Engineering of Visvesvaraya Technological University, Belagavi. We further declare that we have not submitted this report either in part or in full to any other university for the reward of any degree, SAISUPRIYA K (1DTISEE034 ) Place: Bangalore Date: Scanned with CamScanner ACKNOWLEDGEMENT Teneeds more than a few words to express ourimmense gratitude and profound thanks to the people who are responsible for the completion of the project. Never the less we wish to express our sincere and heartfelt gratitude for those who have helped us in making it a success, ‘The intemship is the result of valuable advice, assistance and contribution of number of individuals. It gives great pleasure to thank cach af them whole heartedly. We are very much indebted to members of DSATM management and express our sincere gratitude to ourbeloved Principal Dr. B.R Lakshmikantha, DSATM, Bangalore for permi cout this project work. ing us to carry We express our sincere thanks to our beloved H.O.D Dr. Rupam Bhaduri, Department of Electrical and Electronics, DSATM, Bangalore for his invaluable guidance, encouragement, inspiration and cooperation, We express our profound and cordial gratitude for the valuable guidance of our project guide Bhavani Shakanri V, Cranes Varsity, Bangalore, whose inspiration, encouragement, ime ly suggestions, reviews and immense help made this project work a success, We also express our heartfelt thanks to our parents for being there during success and as well during turbule times. As a dedication, we would dedicate this effort to one who is omnipotent and omnipresent for having blessed as generously as ever “The Almighty" Scanned with CamScanner ABSTRACT We're entering a new era of computing technology that many are calling the Intefnet of Things (lo). Machine to machine, machine to infrastructure, machine to environment, the Internet of Everything, the Internet of Intelligent Things, intelligent systems—eall it what you want, but it's happening, and its potential is huge. We see the IoT as billions of smart, connected “things” (a sort of “universal global neural network” in the cloud) that will encompass every aspect of our lives, and its Foundation is the intelligence that embedded processing provides. The [oT is comprised of smart machines interacting and communicating with other machines, objects. environments and infrastructures. As a result, huge volumes of data are being generated, and that data is being processed into useful actions that can “command and control” things to make our lives much easier and safer—and to reduce ou smpaet on the environment. The creativity of this new era is boundless, with amazing potential to improve our lives, The following thesis is an extensive reference to the possibilities, utility, applications and the evolution of the Internet of Things. Scanned with CamScanner ‘ABLE OF CONTENTS Page No CHAPTER 1 + ABOUT COMPANY. CHAPTER 2 «INTERNET OF THINGS. 2.1 INTRODUCTION... + 2.2 ENABLING TECHNOLOGIES OF IOT. Re * 2.2 CHARACTERISTICS, 5 + 2.410T ARCHITECTURE...... 8 + 2.5 10T FUNCTIONAL VIEW. 8 + 2.6 FUTURE TECHNOLOGICAL DEVELOPEMNET FOR IOT.,.9 + 2.7 FUTURE CHALLENGES FOR IOT. 9 28 APPLICATION AREAS... a vO CHAP TER 3 . RASPBERRY PI . 3.1L INTRODUCTION. - 4 * 3.2 HISTORY. 14 3.3 HARDWARE SETUP... iivcwad cvaitesclooiosa ai vraiment . 3.4 INSTALLATION RASPBERRY PI 16 * 3.5 ADVANTAGES AND DISADVANTAGES. 18 . 3.6 RASPBERRY PI PINS DESCRIPTION 20 3.7 APPLICATIONS. 23 CHAPTER 4 * SENSORS + 4.1 DHT(DIGITAL TEMPERATURE AND HUMIDITY SENSOR). a 4.1.1 THE PROPOSED SYSTEM ARCHITECTURE. + 4.1.2 RASPBERRY PI AS SENSOR NODES. * 4.2 ULTRA SONIC SENSOR....... + 4.2.1 INTRPDUCTION TO ULTRASONIC SENSOR. Scanned with CamScanner * 4.2.2 FEATURES OF ULTRASONIC SENSORS 4.2.3 ULTRASONIC SENSOR WORKING PRINCIPLE. nD © 4.2.4 HOW TO CALCULTAE DISTANCE. ..scccectsreneetitensernsrne 30 * 4.2.5 APPLICATION OF ULTRASONIC SENSOR.. . 4.3 PIR MOTION SENSO! . 4.3.1 INTRODUCTION, + 4.3.2 WORKING OF PIR SENSOR.. + 4.4 IR SENSOR. 33 4.4.1 INTRODUCTION., 3 * 4.4.2 TYPES OF IR SENSOR.....cccccces siacecscceeeaim cs + 4.4.3 IR SENSOR WORKING PRINCIPLE. * 6.4.4 APPLICATION OF IR... ccc eecceccecserecenerentnereennsnteen ee BO CHAPTER 5 * PROJECT- RASPBERRY PI LIGHT SENSOR USING SIMPLE LDR 5.1 INTRODUCTION... + §.2 SYSTEM REQUIREMENTS.............. rr SS OBIE C TIVES sco pcscmraseniacinemoariaroneenscnmnsnmecanncenruciencilll + 5.4 BLOCK DIAGRAM. * 5.5 WORKING PRINCIPLES. * 5.6 RASPBERRY PI LDR SENSOR PROGRAMMING.... 42 5.7 RESULTS .eoscssssescsnsse eA * SB APPLICATION... aes) + 5.9 CONCLUSION AND FUTURE SCOPE..........0.-0 wicaricsicsi cel + REFERENCES... peo ry ure urna ro mou Scanned with CamScanner TABLE OF FIGURES Page no FIGURE Lo esestnnnnintnntninnin niin FIGURE 2. FIGURE 3 PURE Arteries FIGURE Ses ssescnserseeree FIGURE 6.. FIGURE 7.. FIGURE 8..... FIGURE 9... FIGURE 10... FIGURE 11... cososesesnee FIGURE 12......ssesseseese FIGURE 13... FIGURE 14., FIGURE 15 ssssssiessassnssen FIGURE 16... FIGURE 17 ....soson FIGURE 18........ FIGURE 19.....cssseece FIGURE 20.. FIGURE 21. Scanned with CamScanner RASPBERRY PI LIGHT SENSOR USING SIMPLE LDR CHAPTER 1. ABOUT COMPANY Cranes Varsity is a pioneer in Technical Training & Education services in EMBEDDED, VLSI & DSP with over 20 years of acclaimed expertise. Having built a reputation as leading training providers, we now extend our training domains to emerging industry trends like Automotive, IOT & Data Science. We are a unique EdTech company which effectively bridges the gap between. graduates’ skills and employers’ expectations. We build upon decades-old Legacy in Technical Training, and Brand-Recognition as a trusted partner with ‘over 5000 reputed Academia, Corporate & Defence Organisations. We leverage being a gateway to the Corporate World for over 50,000 engineers. We offer the Best Technical Curriculums for Job-Oriented Industry skills taught by the Best Subject-Matter Experts via a Balanced Hybrid On-site/On-line Technical Training Platform CHAPTER 2 INTERNET OF THINGS 2.1 INTRODUCTION: The JOT concept was coined by a member of the Radia Frequency Identification (RFID) development community in 1999, and it has recently become more relevant to the practical world largely because of the growth Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner of mobile devices, embedded and ubiquitous communication, cloud computing and data analytics. Imagine a world where billions of objects can sense, communicate and share information, all interconnected over public or private Internet Protocol (IP) networks, These interconnected objects have data regularly collected, analyzed and used to initiate action, providing a wealth of intelligence for planning, management and decision making. This is the world of the Internet of Things (107). Internet of things common definition is defining as: Internet of things (IOT) isa network of physical objects. The internet is not only a network of computers, but it has evolved into a network of device of all type and sizes , vehicles, smart phones, home appliances, toys, cameras, medical instruments and industrial systems, animals, people, buildings, all connected ,all communicating & sharing information based on stipulated protocols in order to achieve smart reorganizations, positioning, tracing, safe & control & even personal real time online monitoring , online upgrade, process contro! & administration. We define IOT into three categories as below: internet of things is an internet of three things: (1). People to people, (2) People to machine /things, (3) Things /machine to things /machine, Interacting through internet. Internet of Things Vision: Internet of Things (IoT) is a concept and a paradigm that considers pervasive presence in the environment of a variety of things/objects that through wireless and wired connections and unique addressing schemes are able to interact with each other and cooperate with other things/abjects to create new applications/services and reach common goals. In this cantext the research and development challenges to create a smart world are enormous. A world where the real, digital and the virtual are converging to create smart environments that make energy, transport, cities and many other areas more intelligent. Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Fig 1. internet of thir Internet of Things is refer to the general idea of things, especially everyday objects, that are readable, recognizable, locatable, addressable through information sensing device and/or controllable via the Internet, irrespective of the communication means (whether via RFID, wireless LAN, wide area networks, or other means). Everyday objects include not only the electronic devices we encounter or the products of higher technological development such as vehicles and equipment but things that we do not ordinarily think of as electronic at all - such as food , clothing ,chair, animal, tree, water etc, Internet of Things is a new revolution of the Internet. Objects make themselves. recognizable and they obtain intelligence by making or enabling context related decisions thanks to the fact that they can communicate information about themselves. They can access information that has been aggregated by other things, or they can be components of complex services. This transformation is concomitant with the emergence of cloud computing capabilities and the transition of the Internet towards IPv6 with an almost unlimited addressing capacity. The goal of the Internet of Things is to enable things to be connected anytime, anyplace, with anything and anyone ideally using any path/network and any service 2.2 ENABLING TECHNOLOGIES OF IOT: Internet of things (loT) is a global infrastructure for the information society, enabling advanced services by interconnecting (physical and virtual) Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner things based on existing and evolving interoperable information and communication technologies. With the Internet of Things the communication is extended via Internet to all the things that surround us. The Internet of Things is much more than machine to machine communication, wireless sensor networks, sensor networks , 26/3G/4G,GSM,GPRS,RFID, WI-FI, GPS, microcontroller, micropracessor etc. These are considered as being the enabling technologies that make “Internet of Things” applications possible. Enabling technologies for the Internet of Things are considered in and can be grouped into three categories: (1) technologies that enable “things” to acquire contextual information, (2) technologies that enable “things” to process contextual information, and (3) technologies to improve security and privacy. The first two categories can be jointly understood as functional building blocks required building “intelligence” into “things”, which are indeed the features that differentiate the loT from the usual Internet, The third category is not a functional but rather a de facto requirement, without which the penetration of the loT would be severely reduced. ‘The Internet of Things is not a single technology, but it is a mixture of different hardware & software technology. The Internet of Things provides solutions based on the integration of information technology, which refers to hardware and software used to store, retrieve, and process data and communications technology which includes electronic systems used for communication between individuals or groups. ‘There is a heterogeneous mix of communication technologies, which need to be adapted in order to address the needs of loT applications such as energy efficiency, speed, security, and reliability. In this context, it is possible that the level of diversity will be scaled to a number a manageable connectivity technologies that address the needs of the loT applications, are adopted by the market, they have already proved to be serviceable, supported by a strong technology alliance, Examples of standards in these categories include wired and wireless technologies like Ethernet, WI-Fl, Bluetooth, ZigBee, GSM, and GPRS. Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner 2.3 CHARACTERSTICS: ‘The fundamental characteristics of the loT areas follows: Interconnectivity: With regard to the loT, anything can be interconnected with the global information and communication infrastructure. Things-related services: The IoT is capable of providing thing-related services within the constraints of things, such as privacy protection and semantic consistency between physical things and their associated virtual things. In order to provide thing-related services within the constraints of things, both the technologies in physical world and information world will change. Heterogeneity: The devices in the loT are heterogeneous as based on different hardware platforms and networks. They can interact with other devices or service platforms through different networks. Dynamic changes: The state of devices change dynamically, e.g., sleeping and waking up, connected and/or disconnected as well as the context of devices including location and speed. Moreover, the number of devices can change dynamically. Enormous scale: The number of devices that need to be managed and that communicate with each other will be at least an order of magnitude larger than the devices connected to the current Internet. Even more critical will be the management of the data generated and their interpretation for application purposes. This relates to semantics of data, as well as efficient data handling. Safety: As we gain benefits from the loT, we must not forget about safety. As both the creators and recipients of the loT, we must design for safety. This includes the safety of our personal data and the safety of our physical well- being. Securing the endpoints, the networks, and the data moving across.all of it means creating a security paradigm that will scale. Connectivity; Connectivity enables network accessibility and compatibility. Accessibility is getting on a network while compatibility provides the common ability to consume and produce data Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner 2.4 LOT ARCHITECTURE IOT architecture consists of different layers of technologies supporting IOT. It serves to illustrate how various technologies relate to each other and to communicate the scalability, modularity and configuration of IOT deployments in different scenarios. Figure 4 shows detailed architecture of IOT. The functionality of each layer is described below: A. smart device / sensor layer: The lowest layer is made up of smart objects integrated with sensors. The sensors enable the interconnection of the physical and digital worlds allowing real-time information to be collected and processed. There are various types of sensors for different purposes. The sensors have the capacity to take measurements such as temperature, air quality, speed, humidity, pressure, flow, movement and electricity etc. in some cases, they may also have a degree of memory, enabling them to record a certain number of measurements. A sensor can measure the physical property and convert it into signal that can be understood by an instrument. Sensors are grouped according to their unique purpose such as environmental sensors, body sensors, home appliance sensors and vehicle telematics sensors, etc. Most sensors require connectivity to the sensor gateways. This can be in the form of a Local Area Network (LAN) such as Ethernet and Wi-Fi connections or Personal Area Network (PAN) such as ZigBee, Bluetooth and Ultra Wideband (UWB). For sensors that do not require connectivity to sensor aggregators, their connectivity to backend servers/applications can be provided using Wide Area Network (WAN) such as GSM, GPRS and LTE. Sensors that use low power and low data rate connectivity, they typically form networks commonly known as wireless sensor networks (WSNs}. WSNs are gaining popularity as they can accommodate far more sensor nodes while retaining adequate battery life and covering large areas. B, Gateways and Netwarks: Massive valume of data will be produced by these tiny sensors and this requires a robust and high performance wired or wireless network infrastructure as a transport medium. Current networks, often tied with very different protocols, have been used to support machine- to-machine (M2M) networks and their applications. With demand needed to serve a wider range of |OT services and applications such as high speed transactional services, context-aware applications, etc, multiple networks with various technologies and access protocols are needed to work with 6 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner each other in a heterogeneous configuration. These networks can be in the form ofa private, public or hybrid models and are built to support the communication requirements for latency, bandwidth or security, Various gateways (microcontroller, micropracessor...) & gateway networks (WI-FI, GSM, GPRS...) C. Management Service Layer: The management service renders the processing of information possible through analytics, security controls, process modeling and management of devices. One of the important features of the management service layer is the business and pracess rule engines. IOT brings connection and interaction of objects and systems together praviding information in the form of events or contextual data such as temperature of goods, current location and traffic data. Some of these events require filtering or routing to post-processing systems such as capturing of periodic sensory data, while others require response ta the immediate situations such as reacting to emergencies on patient’s health conditions. The rule engines support the formulation of decision logics and trigger interactive and automated processes to enable a more responsive OT system. In the area of analytics, various analytics tools are used to extract relevant information from massive amount of raw data and to be processed at a much faster rate. Analytics such as in-memory analytics allows large volumes of data to be cached in randam access memory (RAM) rather than stored in physical disks. in-memory analytics reduces data query time and augments the speed of decision making. Streaming analytics is another farm of analytics where analysis of data, considered as data-in-motion, is required to be carried ‘out in real time so that decisions can be made in a matter of seconds. Data management is the ability to manage data information flow. With data management in the management service layer, information can be accessed, integrated and controlled. Higher layer applications can be shielded from the need to process unnecessary data and reduce the risk of privacy disclosure of the data source. Data filtering techniques such as data anonymisation, data integration and data synchronization, are used to hide the details of the information while providing only essential information that is usable for the relevant applications. With the use of data abstraction, information can be extracted to provide a common business view of data to gain greater agility and reuse across domains. Security must be enforced across the whale dimension of the IOT architecture right from the smart object layer all the way to the application layer. Security of the system prevents system hacking Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner and compromises by unauthorized personnel, thus reducing the possibility of risks. D. Application Layer: The loT application covers “smart” environments/spaces in domains such as: Transportation, Building, City, festyle, Retail, Agriculture, Factory, Supply chain, Emergency, Healthcare, User interaction, Culture and tourism, Environment and Energy. 2.5 IOT FUNCTIONAL VIEW: The Internet of Things concept refers to uniquely identifiable things with their virtual representations in an Internet-like structure and loT solutions comprising a number of components such as (1) Module for interaction with local oT devices. This module is responsible for acquisition of observations and their forwarding to remote servers for analysis and permanent storage. (2) Module for local analysis and processing of observations acquired by loT devices. (3) Module for interaction with remote loT devices, directly over the Internet. This module is responsible for acquisition of observations and their forwarding to remote servers for analysis and permanent storage. (4) Module for application specific data analysis and processing. This module is running on an application server serving all clients. Itis taking requests from mobile and web clients and relevant loT observations as input, executes appropriate data processing algorithms and generates output in terms of knowledge that is later presented to users. (5) User interface (web or mobile): visual representation of measurements in a given context (for example on a map) and interaction with the user, i.2. definition of user queries. Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner 2.6 FUTURE TECHNOLOGICAL DEVELOPMENTS FOR IOT: The development of enabling technologies such as semiconductor electronics, communications, sensors, smart phones, embedded systems, cloud networking, network virtualization and software will be essential to allow physical devices to operate in changing environments & to be connected all the time everywhere kpplication ayes ‘Smart Applications and Management i en Information Processing Service Management Decision Unit | 3G, UMTS, WiFi, Bluetooth, infrared, ZigBee, .etc Rl Barcode, Infrared Sensors Fig 2. Five Layer architecture of IOT 2.7 FUTURE CHALLANGES FOR IOT: There are key challenges and implications today that need to be addressed before mass adoption of 1OT can occur. A, Privacy and Security: As the loT become a key element of the Future Internet and the usage of the Internet of Things far large-scale, partially mission-critical systems creates the need to address trust and security Dept of E€€, DSATM lOT using Raspberry Scanned with CamScanner functions adequately. New challenges identified for privacy, trust and reliability are: * providing trust and quality-of-information in shared information madels to enable re-use across many applications. * Providing secure exchange of data between |oT devices and consumers of their information. * Providing protection mechanisms for vulnerable devices. B. Cost versus: Usability IOT uses technology to connect physical objects to the Internet. For |OT adoption to grow, the cost of components that are needed to support capabilities such as sensing, tracking and control mechanisms need to be relatively inexpensive in the coming years. . Interoperability: In the traditional Internet, interoperability is the most basic core value; the first requirement of Internet connectivity is that “connected” systems be able to “talk the same language” of protocols and encodings. Different industries today use different standards to support their applications. With numerous sources of data and heterogeneous devices, the use of standard interfaces between these diverse entities becomes important. This is especially so for applications that supports cross organizational and various system boundaries. Thus the IOT systems need to handle high degree of interoperability. D, Data Management: Data management isa crucial aspect in the Internet of Things. When considering a world of objects interconnected and constantly exchanging all types of information, the volume af the generated data and the processes involved in the handling of those data become critical. E. Device Level Energy Issues: One of the essential challenges in loT is how to interconnect “things” in an interoperable way while taking into account the energy constraints, knowing that the communication is the most energy consuming task on devices. 2.8 APPLICATION AREAS: Potential applications of the loT are numerous and diverse, permeating into practically all areas of every-day life of individuals, enterprises, and society as a whole, The loT application covers “smart” environments/spaces in domains such as: Transportation, Building, City, 10 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Lifestyle, Retail, Agriculture, Factory, Supply chain, Emergency, Healthcare, User interaction, Culture and tourism, Environment and Energy. Below are some of the IOT applications. A. IOsL (Internet of smart living): Remote Control Appliances: Switching on and off remotely appliances to avoid accidents and save energy, Weather: Displays outdoor weather conditions such as humidity, temperature, pressure, wind speed and rain levels with ability to transmit data over long distances, Smart Home Appliances: Refrigerators with LCD screen telling what's inside, food that’s about to expire, ingredients you need to buy and with all the information available on a Smartphone app. Washing machines allowing you to manitor the laundry remotely, and. Kitchen ranges with interface to a Smartphone app allowing remotely adjustable temperature control and monitoring the oven’s self-cleaning feature, Safety Monitoring: cameras, and home alarm systems making people feel safe in their daily life at home, Intrusion Detection Systems: Detection of window and door openings and violations to prevent intruders, Energy and Water Use: Energy and water supply consumption monitoring to obtain advice on how to save cost and resources, & many mare... B. IOsC ( Internet of smart cities); Structural Health: Monitoring of vibrations and material conditions in buildings, bridges and historical monuments, Lightning: intelligent and weather adaptive lighting in street lights, Safety: Digital video monitoring, fire control management, public announcement systems, Transportation: Smart Roads and Intelligent High- ways with warning messages and diversions according to climate conditions and unexpected events like accidents or traffic jams, Smart Parking: Real- time monitoring of parking spaces availability in the city making residents able to identify and reserve the closest available spaces, Waste Management: Detection of rubbish levels in containers to optimize the trash collection routes. Garbage cans and recycle bins with RFID tags allow the sanitation staff to see when garbage has been put out. C. IOsE (Internet of smart environment): Air Pollution monitoring: Control of CO2 emissions of factories, pollution emitted by cars and toxic gases generated in farms, Forest Fire Detection: Monitoring of combustion gases and preemptive fire conditions to define alert zones, Weather monitoring: weather conditions monitoring such as humidity, temperature, pressure, wind speed and rain, Earthquake Early Detection, Water Quality: Study of 1 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner water suitability in rivers and the sea for eligibility in drinkable use, River Floods: Monitoring of water level variations in rivers, dams and reservoirs during rainy days, Protecting wildlife: Tracking collars utilizing GPS/GSM modules to locate and track wild animals and communicate their coordinates via SMS. D. 10s! (Internet of smart industry): Explosive and Hazardous Gases: Detection of gas levels and leakages in industrial environments, surroundings of chemical factories and inside mines, Monitoring of toxic gas and oxygen levels inside chemical plants to ensure workers and goods safety, Monitoring of water, oil and gas levels in storage tanks and Cisterns, Maintenance and repair; Early predictions on equipment malfunctiens and service maintenance can be automatically scheduled ahead of an actual part failure by installing sensors inside equipment to monitor and send reports. E, IOsH (Internet of smart health): Patients Surveillance: Monitoring of conditions of patients inside hospitals and in old people’s home, Medical Fridges: Cantrol of conditions inside freezers storing vaccines, medicines and organic elements, Fall Detection: Assistance for elderly or disabled people living independent, Dental: Bluetooth connected toothbrush with Smartphone app analyzes the brushing uses and gives information on the brushing habits on the Smartphone for private information or for showing statistics to the dentist, Physical Activity Monitoring: Wireless sensors placed across the mattress sensing small motions, like breathing and heart rate and large motions caused by tossing and turning during sleep, providing data available through an app on the Smartphone. F. IOsE (internet of smart energy): Smart Grid: Energy consumption monitoring and management, Wind Turbines/ Power house: Monitoring and analyzing the flow of energy from wind turbines & power house, and two- way communication with consumers’ smart meters to analyze consumption patterns, Power Supply Controllers: Controller for AC-DC power supplies that determines required energy, and improve energy efficiency with less energy waste for power supplies related to computers, telecommunications, and consumer electronics applications, Photovoltaic Installations: Monitoring and optimization of performance in solar energy plants. G.1OsA {internet of smart agriculture): Green Houses: Control micro-climate conditions to maximize the production of fruits and vegetables and its 2 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner quality, Compost: Control of humidity and temperature levels in alfalfa, hay, straw, etc. to prevent fungus and other microbial contaminants, Animal Farming/Tracking: Location and identification of animals grazing in open pastures or location in big stables, Study of ventilation and air quality in farms and detection of harmful gases from excrements, Offspring Care: Control of growing conditions of the offspring in animal farms to ensure its survival and health, field Monitoring: Reducing spoilage and crop waste with better monitoring, accurate ongoing data obtaining, and management of the agriculture fields, including better control of fertilizing, electricity and watering. Fig. 3. Applications of OT 3 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner CHAPTER 8. RASPBERRY PI 3.1 INTRODUCTION ‘The Raspberry Pi is a small computer, same as the computers with which you're already familiar. It uses. a many different kinds of processors, so can’t install Microsoft Windows on it, But can install several versions of the Linux ‘operating system that appear and feel very much like Windows. Raspberry Pi is also used to surf the internet, to send an email to write a letter using a word processor, but you can too do so much more. Simple to use but powerful, affordable and in addition difficult to break, Raspberry Pi is the perfect device for aspiring computer scientists. This small computer features amazing HD (high-definition) quality, video playback, also sports high quality audio and has the capability to play 3D games. The device use the ARM processor which does nearly all of the hard work in order to run the Raspberry Pi. RASPBIAN, PIDORA, OPENELEC, RASPBMC, RISC OS, and ARCH LINUX these are few software's which are used, All this software's can be downloaded easily and these are free from the official forum under the NOOBS (newout of the box software) category. it supports Python as the main programming language for functioning and coding, It also supports BASIC, C, C+, JAVA, and Perl and Ruby languages. 2 HISTORY: Eben Upton in UK-based Raspberry Pi Foundation at Cambridge University has begun manufacturing a $35, credit-card sized computer, designed to make it affordable, bare-bones, tiny to teach basic computer science in schools “4 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner worldwide. The Linux-based, single-board computer will have a 700-MHz ARM architecture, CPU,256 Mbytes of RAM, two USB ports and a 10/100 Ethernet controller. The foundation later plans to propose a $25 model with 128 Mbytes RAM, one USB port with no Ethernet controller. Both models have RCA and High- Definition Multimedia Interface outputs that enable users to plug the machines into a TV. Mice, keyboards, and other input devices could connect via a USB port. The computers won't include a hard disk or solid-state drive but instead will use an SD memory card to boot up and store data. The 45-gram machines will measure 85.6 x 53.98 x 17 millimeters, not including the SD card and connectors, which will project a bit over the edge. For one computer takes three to four weeks. The foundation expects an initial production runs of 10,000 machines. Raspberry Pi was founded in 2009 with the stated goal of producing an affordable computer that young people could use to learn computer programming. Various schools have reportedly inquired about using the Raspberry Pi machines. Proponents hope corporations will pay for computers that could be used in schools with fewer financial resources. 3.3 HARDWARE SETUP: Since the board has been designed by considering curious school children in mind, it’s easy to use. The Raspberry Pi board encompasses a processor and graphics chip, program memory (RAM) and various interfaces, and connectors for external devices. RPi operates in the same way as a standard PC, demanding a keyboard used for command entry, a display unit, a power supply. RPi use a SD Flash memory card generally used in digital cameras, configured in a same asa hard drive used in PC, RPi will ‘load the Operating System into RAM’(boot)from this card in the same way as a PC ‘boots up’ into Windows from its hard disk. The basic representation is shown in figure 1. : 1s Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Fig:4. Board representation Essential components used in RPi hardware are: SD card having Linux Operating system USB keyboard * TVormonitor having HDMI, DVI, Composite ar SCART input © Power supply * Video cable suited with the TV or monitor used Optional components are: USB mouse Internet connection, Model A or B: USB Wi-Fi adaptor Internet connection, Model 8 only: LAN (Ethernet) cable Powered USB hub © Case 34 INSTALLATION RASPBERRY PI: Following are the steps of connecting RPi given below: 1. Pay attention to the gold connectors on the SD card, These gold connectors must make contact with the gold connectors on the Raspberry Pi. 16 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Fig:5. Making contact of sd card and rpi 2. Plug in your mouse and keyboard into the USB ports. Fig 6. Connecting mouse and keyboard 3. If you want to connect your Raspberry Pi to the internet or a network you will need to plug in the Ethernet cable. Fig 7. Ethernet cable plugging 4. Ifyou have @ HDMI TV or monitor then yau can plug in your HDMI cable into the Raspberry Pi and plug the other end into your TV. if you have a combined video connection on your TV and then goes to step 5. (If your Tv/monitor does not have a HDMII port you will need to use an adapter - this will either be a HDMI to DVI or a HDMI to VGA.) 7 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner hy Fig 8, HDMI cable plugging 5. Insert the merged video connection if you are using a TV that does not support HDMI and plug it inte your television. 6. Insert your power cable into the Raspberry Pi power connector. Fig 9. Power cable plugging. 3.5 ADVANTAGES AND DISADVANTAGES A. Advantages and. Some of the merits are: * Is an inexpensive device with an easily affordable price, anyone from teenagers to computer enthusiasts can grab a piece of Pi for themselves? Where commercial counterparts of certain applications of Raspberry Pi can costs hundreds of dollars, Pi offers a much cheaper alternative at only a fraction of the price. Raspberry Pi has the size of a credit card. As we all know with technology, generally the smaller it is, the better. With a small size, Raspberry Pi can be hidden almost anywhere, behind television sets, inside walls or even in your wallet. Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner * Raspberry Pi with low price and small size do not necessarily indicate low performance. Even though you won't be capable to play the latest hardcore 3D games on your machine, RPi allows for High Definition (HD) video streaming and other basic computer functians like word processing and web browsing. Pi was initially intended as a programming platform for beginners and hence, it is versatile, powerful, an all-rounder B. Disadvantages Although it has merits but it has some demerits also some of them are: « Raspberry Pi does not support X86 operating systems means hardware limitations do not allow for Raspberry Pi to run 32 bit operating systems such as Microsoft Windows, Max OS X or some varieties of Linux. This can be a huge loss for nat-so computer friendly end users .For professional users; this is not much ofa set back as Raspberry Pi supports other popular operating system. * Some applications which necessitate high demands on CPU processing are off-limits. Such as “Model B took 107 ms to complete ‘one calculation of the entirely synthetic prime number test and a mid-range desktop Core 2 Duo E8400 took only 0.85ms.” © Users must not use usual computer standards to judge Raspberry Pi. It can work as a private computer but still cannot replace it. Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner 3.6 Raspberry Pi Pins Description: Miroven MAST, ll oeous ee ELE ce a The pins description is same for all models. The Raspberry Pi 4 can be used in the external embedded system to communicate. It has a total of 40 pins from which 28 are GPIO pins and the rest of them are power pins. GPIO pins don't only perform the simple W/O functions. They could give the UART, SPI, and C communications. These communications are specific to every pin and all their function are discussed below: Power Supply Pins Power In: In Raspberry pi, there is two power in method, one is from the USB-C power port and the second one is from any 5V pin. The 5-volt pin is directly connected to the USB-C adapter port. The input on the SV pin should be stable and according to its specifications. In the case of higher Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner voltage, the device could get bumed. 5V input pins will bypass any fuse and regulator in case of power input, so the power supply from 5V should according to its specification to avoid any kind of harm. The power input pin of the Raspberry Pi 4 is given below: + Pin2-6—> +5V + Piné —> GND Power Out: There are two types of power output pin in the Raspberry pi 4 3V3 and 5V. SV is directly connected to the USB port but 3V3 is connected to through the regulator which gives the stable 3 volts output. All power out pins are given below: + 3V3—Pin1, Pint7 + 5V—Pin2, Pin6 Ground: Raspberry Pi 4 has multiple ground pin which is connected internally and any ground pin can be used by the power supply or external device to make the common ground. The list of the ground pins is given below: + Ping + Pind « Pint4 * Pin20 + Pin2s + Pin3o + Pind4 + Pin39 Digital Input/Output Pins Almost every device needs to input and output pins to communicate. In this device there are 28 GPIO pins are available these pins can be used for any digital input and output operating. The GPIO pins in the controller have some default values. GPIO pins from 0-9 will be at a HIGH state a Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner and from 10 to above the pins will be at a LOW state. All those pins in the Raspberry Pi 4 are given below: GPIOO — Pin27 GPIO1 — Pin28 GPIO2 = Pin3 GPIO3 — PinS GPIO4 — Pin? GPIOS — Pin29 GPIO6 — Pin31 GPIO? — Pin26 GPIO8 — Pin24 GPIOg — Pin21 GPIO10— Pini GPION1 — Pin23 GPIO12 — Pins2 GPIO13 — Pin33 GPIO14 — Pins GPIO15 — Pint0 GPIO16 — Pinsé GPIO17 — Pint GPIO18 = Pini2 GPIO19 — Pin35 GPIO20 — Pin38 GPIO21 — Pin4o GPIO22 — Pints GPIO23 — Pinié6 GPIO24 — Pints GPIO25 — Pin22 GPIO26 — Pin37 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner + GPIQ27 — Pin13 All GPIO pins in Raspberry Pi 4 are not only for input-output function. Each GPIO pin can be used as other functions, which will be specified through programming. Raspberry Pi Serial Communication Modules : Raspberry Pi UART Pins There are multiple kinds of serial communication and UART is one of them. It is quite popular because of its simple communication system and dependence on most of the software. There is multiple UART communication pin in the Raspberry pi 4 and all of them are given below: + TXD1—GPIO14 — Pin8 + RXD1-GPIO15 — Pin10 + TXD2 = GPIOO = Pin27 + RXD2-GPIO1 - Pin2s + TXD3 - GPIOS — Pin29 + RXD3- GPIO4 - Pin7 + TXD4- GPIO8 - Pin24 « RXD4-GPIO9 - Pin21 + TXDS— GPIO12 - Pin32 » RXD5 — GPIO13 — Pin33 3.7 APPLICATIONS: Raspberry Pi is proposed to get people interested in computing, programming or even to solve their general needs. School children, college kids, adolescents, oldies of the technology sphere have all started working on this board. People are inclined to use this board for interfering, for enhancing ever day experiences like using the FAX machine, innovating Home-robots, media players, video camera streamers, Some of applications which include :- Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner * Games application- Due to powerful multimedia and 3D graphics capabilities, Raspberry Pi has potential to be used as a games platform. + Pi in the sky: This board is a GPS receiver, radio transmitter designed for tracking high altitude balloon flights. + R2D2 powered by Rasp Pi: Xiang’s R2D2 tracks faces and motion and is motorized far movement which has the capacity to respand to voice commands. + Electronics devices: Otto is a camera product which captures pictures with a ‘twist. It converts them into animated GIF's, period lapses; it can also add many effects to a picture or to a GIF. bots: Live bots is scheme that allows users to control many robots based on Raspberry Pi over the internet. + Lap pi: The scheme features a laptop assembled from scratch which is based ‘on the Raspberry pi board. 24 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner CHAPTER 4 SENSORS 4.1 DHT: (Digital Temperature and Humidit DHT sensor which is an inexpensive digital temperature and humidity sensor and it uses a capacitive humidity sensor and a thermistor to assess the surrounding air and sends out digital signal to the data pin. It requires minimum of 3V to operate which makes it usable with Raspberry Pi’s GPIO pin with 3.3V output voltage. The DHT draws a maximum of 2.5 mA current. It can measure humidity in the range of 0% to 100% with 2— 5% accuracy and temperature in the range of - 400C to 800C. Sensor) Subsidiary Components A portable power bank (output current rating of 2A and output voltage rating of SV) is used as a power source for the Raspberry Pi and DHT sensor. A monitor, a HDMI cable to connect the monitor with the Raspberry Pi, USB keyboard and mouse are used as subsidiary components during the design of the Smart Home sensor node. Fig 10.DHT sensor 4.1.1 The Proposed System Architecture : 2s Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner In this section, we explain about the experimental scenario of the proposed system architecture of Raspberry pi including the notification system and graphical representation of the real time sensor data. Experimental Scenario : ‘The DHT temperature and humidity sensor is used because in the Smart Home the temperature threshald should be determined if the fan or air conditioner need to turn on or off automatically. The temperature sensor data may also indicate fire in the house and notify the users through SMS and email notification. in addition, Raspberry Pi has 40 GPIO pins which can be used to connect with home appliances and control them based on the sensor data. System Architecture : The proposed architecture is designed, implemented and verified to evaluate quality of service (QoS) parameters, |. e., packet loss and ping latency or round trip time (RTT). the system architecture of the Raspberry Pi as a sensor nade for the Smart Home system. It consists of 3 parts: (i) Raspberry Pi as sensor node, {ii) a notification system using email and Twilio’s free web SMS service, and (iii) Real time graphical representation of DHT sensor data using Pub Nub web application. 4.1.2 Raspberry Pi sensor nodes: Raspberry Pi is connected to the DHT to sense temperature and humidity. Sensor data from the DHT22 is decoded using Adafruit’s DHT Python library and converted to user readable format for both the temperature and humidity, i.e., temperature in OC and humidity in 96. The sensor data is then stored in a MySQL database which is configured in the Raspberry Pi with proper credentials. The value of the sensor data isthen compared with the threshold value that we have specified in the Python program. Two temperature thresholds have been specified one for maximum positive temperature value and another for maximum negative temperature value. If the temperature exceeds these thresholds, then it sends an email and SMS notification by using Raspberry Pi as means to send the alert to the users. This feature can be used to turn on heating system in the Smart Home 26 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner automatically if the room temperature drops below a certain limit or it can also be used to turn on fan or air conditioner if the temperature rises above the set limit. All data processing and sensor data evaluation are done by the Raspberry Pi. Each sensor has been given unique ID to identify a sensor specifically from a group of sensors. So the system can be easily adapted for integration with multiple types of sensors, e.g., gas sensor, pressure sensor, acoustic sensor etc. Here, the Raspberry Pi acts as both the sensor node and gateway. The Raspberry Pi is connected with internet via WiFi and establishes communication between the home network and any external network which is located far away. This facilitates user's home monitoring from anywhere anytime using any internet enabled device, e.g., tablets, smart phones or computers. The Raspberry Pi'is configured as a web server and hence the temperature and humidity values from the database can be fetched and showed in a user dashboard. The Raspberry Pi is configured to allow secure shell (SSH) connection fram LAN and remote network through internet. We have used a computer with Ubuntu 14.04 that gives command to the Raspberry Pi. So users can contral the Raspberry Pi from anywhere in the world and monitor data from different sensors connected with it. 4.2 ULTRASONIC SENSOR In industrial applications, an ultrasonic detection used to detect hidden tracks, discontinuities in metals, composites, plastics, ceramics, and for water level detection. For this purpose, the laws of physics which are indicating the propagation of sound waves through solid materials have been used since ultrasonic sensors using sound instead of light for detection. in this blog, we are going to learn about the ultrasonic sensor working principle and its applications. 1.2.1 Introduction to Ultrasonic Sensors; Ultrasor high for humans to hear. sensors work by emitting sound waves at a frequency which is too 2 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner The below image shows the HC-SR-04 ultrasonic sensor which has transmitter, receiver. The pin configuration is, * VCC - +5 V supply © TRIG — Trigger input of sensor. Microcontroller applies 10 us trigger pulse to the HC-SRO4 © ultrasonic module. * ECHO-Echo output of sensor. Microcontroller reads/monitors this pin to detect the obstacle or to * find the distance. * GND- Ground Soun a mechanical wave traveling through the mediums, which may be a or liquid or gas. Sound waves can travel through the mediums with specific velocity depends on the medium of propagation. The sound waves which are having high frequency reflect from boundaries and praduce distinctive echo patterns. Fig 11, Ultrasonic sensors 1.2.2 Features of an Ultrasonic Sensor: * Supply voltage: SV (DC). 28 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner © Supply current: 15mA. * Modulation frequency: 40H2. * Output: 0- 5V (Output high when obstacle detected in range). * Beam Angle: Max 15 degrees. ance: 2 cm —400 cm. Accuracy: 0.3cm. + Communication: Positive TTL pulse. 4.2.3 Ul sonic Sensor Working Prin Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. ‘These propagate in the air at the velocity of sound. If they strike an abject, then they reflected back as an echo signals to the sensor, which itself computes the distance to the target based on the time-span between emitting the signal and receiving the echo An ultrasonic sensors are excellent at suppressing background interference. Virtually all materials which reflect sound can be detected, regardless of their colour. Even transparent materials or thin foils represent no problem for an ultrasonic sensor Microsonic ultrasonic sensors are suitable for target distances from 20 mm to 10 m and as they measure the time of flight they can ascertain a measurement Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner with pinpoint accuracy. Some of our sensors can even resolve the signal to an accuracy of 0.025 mm. Ultrasonic sensors can see through dust-laden air and ink mists. Even thin deposits on the sensor membrane do not impair its function. 4.2.4 How to calculate Distance? If you need to measure the specific distance from your sensor, this can be calculated based on this formula: We know that, Distance= Speed* Sa, 1e. The speed of sound waves is 343 m/s. Total Distance= (343 * Time of hight(Echo) pulse)/2 Total distance is divided by 2 because signal travels from HC-5RO4 to object and returns to the module HC-SR-04. 1.2.5 Applications of an Ultrasonic Sensor: + It Uses to avoid and detect obstacles with robots like biped robot, obstacle avoider robot, path finding robot etc + It Used to measure the distance within a wide range of 2cm to 400cm. * Used to map the objects surrounding the sensor by rotating it. + Depth of certain places like wells, pits etc can be measured since the waves can penetrate through water. 30 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner 4.3 PIR MOTION SENSORS PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", o "IR motion" sensors. Fig 12. PIR Sensor 4.3.1 Introduction: PIRs are basically made of a pyroelectric sensor (https://adafru.it/akh) (which you can see below as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation, Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. ‘The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner two halves are wired up so that they cancel each other out. If ane half sees more or less IR radiation than the other, the output will swing high or low. Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and capacitors. It seems that most small hobbyist sensors use the BISSO001 ("Micro Power PIR Motion Detector IC") {https://adafru.it/ctR}, undoubtedly a very inexpensive chip. This chip takes the output of the sensor and does some minor processing on it to emit a digital output pulse from the analog sensor. For many basic projects or products that need to detect when a person has left ‘or entered the area, or has approached, PIR sensors are great. They are low power and low cost, pretty rugged, have a wide lens range, and are easy to interface with. Note that PIRs won't tell you how many peaple are around or how close they are to the sensor, the lens is often fixed to a certain sweep and distance (although it can be hacked somewhere) and they are also sometimes: set off by housepets. 4.3.2 Working Of PIR Sensors: PIR sensors are more complicated than many of the other sensors explained in these tutorials (like photocells, FSRs and tilt switches) because there are multiple variables that affect the sensors input and output. To begin explaining how a basic sensor works, we'll use this rather nice diagram The PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots can 'see' out past some distance (basically the sensitivity of the sensor). When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdaors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected. 2 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Pins 1-2 on a horizontal plane Fig 13, 4.4 IR SENSORS: IR detectors are little microchips with a photacell that are tuned to listen to infrared light. They are almost always used for remote control detection - every TV and DVD player has one of these in the front ta listen for the IR signal from the clicker. Inside the remote control is a matching IR LED, which emits IR pulses to tell the TV to turn on, off or change channels. IR light is not visible to the human eye, which means it takes a little more work to test a setup. 441 Introduction: IR detectors are specially filtered for Infrared light, they are not good at detecting visible light. On the other hand, photocells are good at detecting yellow/green visible light, not good at IR light IR detectors have a demodulator inside that looks for madulated IR at 38 KHz. Just shining an IR LED wont be detected, it has to be PWM blinking at 38KHz. Photocells do not have any sort of demodulator and can detect any frequency (including DC) within the response speed of the photocell (which is about 1KHz) IR detectors are digital out - either they detect 38KHz IR signal and output low (OV) or they do not 23 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner detect any and output high (SV). Photocells act like resistors, the resistance changes depending on how much light they are exposed to. 4.4.2 ‘Types of IR Sensor: There are two types of IR sensors are available and they are, + Active Infrared Sensor + Passive Infrared Sensor Active Infrared Sensor Active infrared sensors consist of two elements: infrared source and infrared detector. Infrared sources include the LED or infrared laser diode. infrared detectors include photodiodes or phototransisters, The energy emitted by the infrared source is reflected by an object and falls on the infrared detector. Passive Infrared Sensor Passive infrared sensors are basically Infrared detectors. Passive infrared sensors do not use any infrared source and detector. They are of two types: quantum and thermal. Thermal infrared sensors use infrared energy as the source of heat. Thermocouples, pyroelectric detectors and bolometers are the common types of thermal infrared detectors. Quantum type infrared sensors offer higher detection performance. It is faster than thermal type infrared detectors. The photo sensitivity of quantum type detectors is wavelength dependent. 4.4.3 TR Sensor Working Principle: There are different types of infrared transmitters depending on their wavelengths, output power and response time. An IR sensor consists of an IR LED and an IR Photodiode, together they are called as PhotoCoupler or OptoCoupler. IR Transmitter or IR LED Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations called as IR LED's, Even though an IR LED looks like a normal LED, the radiation emitted by itis invisible to the human eye. 34 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner The picture of an Infrared LED is shown below. Fig 14 IR Receiver or Photodiode Infrared receivers or infrared sensors detect the radiation from an IR transmitter. IR receivers come in the form of photodiodes and phototransistors. Infrared Photodiodes are different from normal photo diodes as they detect only infrared radiation. Below image shaws the picture of an IR receiver or a photodiode, Fig 15 35 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner Different types of IR receivers exist based on the wavelength, voltage, package, etc. When used in an infrared transmitter — receiver combination, the wavelength of the receiver should match with that of the transmitter. ‘The emitter is an IR LED and the detector is an IR photodiode. The IR photodiode is sensitive to the IR light emitted by an IR LED. The photo-diode’s resistance and ‘output voltage change in proportion to the IR light received. This is the underlying working principle of the IR sensor. IR Sensor Reflected IR light Fig 16 When the IR transmitter emits radiation, it reaches the object and some of the radiation reflects back to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of the sensor defines. 444 Applications of Infrared Sensor: IR sensors have found their applications in most of today’s equipment. Following are the list of sensors which are named after its usage. Proximity Sensor ‘These are used in smart phones to find distance of object. They use principle called Reflective Indirect Incidence. Radiation transmitted by transmitter is received by receiver after being reflected from object. Distance is calculated based on the intensity of radiation received. 36 Dept of E€€, DSATM lOT using Raspberry Scanned with CamScanner Item Counter This use direct incidence method to count the items. Constant radiation is maintained in between transmitter and receiver. As soon as object cuts the radiation, item is detected and count is increased. The same count is shown on display system. Burglar Alarm This is one of widely and commonly used sensor application. It is another example for direct incidence method. It works similar to item counter, where transmitter and receiver are kept on both the sides of door frame. Constant radiation is maintained between transmitter and receiver, whenever object, crosses path alarm starts off. 7 Dept of E€€, DSATM Scanned with CamScanner CHAPTER 5 PROJECT- Raspberry Pi Light Sensors Using Simple LDR 5.1 INTRODUCTION Lighting can account for 10-38% of the total energy bill in typical cities worldwide. The main consideration in the present field technologies are Automation, Power consumption and cost effectiveness. Automation is intended to reduce man power with the help of intelligent systems. Power saving is the main consideration forever as the sources of the power are getting diminished due to various reasons. ‘The main aim of this project is to saving system with LDR this is to save the power. We want to save power automatically instead of doing manual. So it's easy to cost effectiveness, This saved power can be used in some other cases. So in villages, towns etc. we can design intelligent systems for the usage of light or we can also use this to reduce the electricity bill of our home. This project can also be used for security of the hauses, banks, etc. 5.2 SYSTEM REQUIR ENTS 1) LED A semiconductor diode that emits light when conducting current and is used in electronic equipment 38 Dept of E€€, DSATM IOT using Raspberry pi and Python Scanned with CamScanner

You might also like