0% found this document useful (0 votes)
130 views95 pages

PROJ Temp & Mask Bhanu

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
130 views95 pages

PROJ Temp & Mask Bhanu

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

A Project Report on

TEMPRATURE AND FACE MASK DETECTION ENTRY SYSTEM


FOR COVID PREVENTATION USING IOT
A project submitted in partial fulfilment of the requirement for the award of the
degree of
MASTER OF TECHNOLOGY IN
INSTRUMENTATION ENGINEERING
Submitted by
NUKANA BHANU PRAKASH
Under the esteemed guidance of
Prof .Y. SRINIVASA RAO, Ph.D.
Professor
Department of Instrument Technology,
A.U. College of Engineering, Visakhapatnam.

DEPARTMENT OF INSTRUMENT TECHNOLOGY


A.U COLLEGE OF ENGINEERING, ANDHRA UNIVERSITY (A)
VISAKHAPATNAM-530003
2020-21.
DEPARTMENT OF INTRUMENT TECHNOLOGY
ANDHRA UNIVERSITY COLLEGE OF ENFINEERING (A)
VISAKHAPATNAM- 530003.

CERTIFICATE
This is to certify that the project work entitled “TEMPRATURE AND FACE MASK
DETECTION ENTRY SYSTEM FOR COVID PREVENTETION USING IOT” is
a bonafide record of work done by

NUKANA BHANU PRAKASH 319206831005

Submitted in partial fulfilment for the award of Degree in Master of Technology (MTech) in
Department of Instrument Technology, during academic year 2020-21.

PROF. Y. SRINIVASA RAO DR. M. RAMESH PATNAK


Project guide, Head of the Department,
Department of Instrument Technology, Department of Instrument Technology,
A.U. College of Engineering (A), A.U. College of Engineering (A),
Visakhapatnam-530003. Visakhapatnam-530003.
ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task would be
incomplete without the mentioning of the people whose constant guidance and encouragement
made it possible. We take pleasure in presenting before you, our project, which is result of studied
blend of both research and knowledge.
I express my deep sense of gratitude to our guide Prof. Y. SRINIVASA RAO Professor for his
stimulated guidance and profuse assistance. I consider myself extremely fortunate for getting the
opportunity to work under his guidance with constant support, suggestion and encouragement
throughout the project.
I express my heartfelt thanks to DR.M. RAMESH PATNAIK, Head of the Department of
Instrument technology, who gave us access to the facilities in the department.
I am also thankful to all the faculty members and staff members of the department of Instrument
Technology, for their kind co-operation throughout the course work and in the completion of the
project work.
Nothing would have been possible without the blessings of god and I heart fully thank my parents
for educating me and bringing me to this stage of what I am right now.
Finally I deem it a pleasure to thank one and all who helped us directly or indirectly in carrying out
this project.

NUKANA BHANU PRAKASH


ABSTRACT
The first step to detect covid is by scanning for fever. Also we need to monitor every person for a
mask. We have temperature checking systems for every entrances for scanning but manual
temperature scanning has a lot of disadvantages.The personnel are not well trained on using
temperature scanner devices.There is human error in reading values.Many a times people are not
barred from entry even after higher temperature readings or no masks.The scanning is skipped by
the personnel if supervisors are not watching.Manual scanning system is not suitable for large
crowds.To solve this problem we here propose a fully automated temperature scanner and entry
provider system. It is a multi purpose system that has a wide range of applications. The system
makes use of a contactless temperature scanner and a mask monitor. The scanner is connected
directly with a human barrier to bar entry if high temperature or no mask is detected.Any person
will not be provided entry without temperature and mask scan. Only person having both conditions
is instantly allowed inside. The system uses temperature sensor and camera connected with a
raspberry pi system to control the entire operation. The camera is used to scan for mask and
temperature sensor for forehead temperature. The raspberry processes the sensor inputs and decides
weather the person is to be allowed. In this case the system operates a motor to open the barrier
allowing the person to enter the premises. If a person is flagged by system for high temperature or
no Mask the system glows the red light and bars the person from entry.

Thus the system provides a 100% automated system to prevent the spread of COVID

.
1. INTRODUCTION

1.1 Introduction of Embedded System:

An Embedded System is a combination of computer hardware and software, and perhaps


additional mechanical or other parts, designed to perform a specific function. A good example is
the microwave oven. Almost every household has one, and tens of millions of them are used every
day, but very few people realize that a processor and software are involved in the preparation of
their lunch or dinner.

This is in direct contrast to the personal computer in the family room. It too is comprised of
computer hardware and software and mechanical components (disk drives, for example). However,
a personal computer is not designed to perform a specific function rather; it is able to do many
different things. Many people use the term general-purpose computer to make this distinction clear.
As shipped, a general-purpose computer is a blank slate; the manufacturer does not know what the
customer will do wish it. One customer may use it for a network file server another may use it
exclusively for playing games, and a third may use it to write the next great American novel.

Frequently, an embedded system is a component within some larger system. For example,
modern cars and trucks contain many embedded systems. One embedded system controls the anti-
lock brakes, other monitors and controls the vehicle's emissions, and a third displays information
on the dashboard. In some cases, these embedded systems are connected by some sort of a
communication network, but that is certainly not a requirement.

At the possible risk of confusing you, it is important to point out that a general-purpose
computer is itself made up of numerous embedded systems. For example, my computer consists of
a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of Which is
an embedded system? Each of these devices contains a processor and software and is designed to
perform a specific function. For example, the modem is designed to send and receive digital data
over analog telephone line. That's it and all of the other devices can be summarized in a single
sentence as well.

If an embedded system is designed well, the existence of the processor and software could
be completely unnoticed by the user of the device. Such is the case for a microwave oven, VCR, or
alarm clock. In some cases, it would even be possible to build an equivalent device that does not
contain the processor and software. This could be done by replacing the combination with a custom
integrated circuit that performs the same functions in hardware. However, a lot of flexibility is lost
when a design is hard-cooled in this way. It is mush easier, and cheaper, to change a few lines of
software than to redesign a piece of custom hardware.

1.2 History and Future:

Given the definition of embedded systems earlier is this chapter; the first such systems
could not possibly have appeared before 1971. That was the year Intel introduced the world's first
microprocessor. This chip, the 4004, was designed for use in a line of business calculators
produced by the Japanese Company Busicom. In 1969, Busicom asked Intel to design a set of
custom integrated circuits-one for each of their new calculator models. The 4004 was Intel's
response rather than design custom hardware for each calculator, Intel proposed a general-purpose
circuit that could be used throughout the entire line of calculators. Intel's idea was that the software
would give each calculator its unique set of features.

The microcontroller was an overnight success, and its use increased steadily over the next
decade. Early embedded applications included unmanned space probes, computerized traffic lights,
and aircraft flight control systems. In the 1980s, embedded systems quietly rode the waves of the
microcomputer age and brought microprocessors into every part of our kitchens (bread machines,
food processors, and microwave ovens), living rooms (televisions, stereos, and remote controls),
and workplaces (fax machines, pagers, laser printers, cash registers, and credit card readers).

It seems inevitable hat the number of embedded systems will continue to increase rapidly.
Already there are promising new embedded devices that have enormous market potential; light
switches and thermostats that can be central computer, intelligent air-bag systems that don't inflate
when children or small adults are present, pal-sized electronic organizers and personal digital
assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly, individuals who
possess the skills and desire to design the next generation of embedded systems will be in demand
for quite some time.

1.3 Real Time Systems:


One subclass of embedded is worthy of an introduction at this point. As commonly defined,
a real-time system is a computer system that has timing constraints. In other words, a real-time
system is partly specified in terms of its ability to make certain calculations or decisions in a timely
manner. These important calculations are said to have deadlines for completion. And, for all
practical purposes, a missed deadline is just as bad as a wrong answer.

The issue of what if a deadline is missed is a crucial one. For example, if the real-time
system is part of an airplane's flight control system, it is possible for the lives of the passengers and
crew to be endangered by a single missed deadline. However, if instead the system is involved in
satellite communication, the damage could be limited to a single corrupt data packet. The more
severe the consequences, the more likely it will be said that the deadline is "hard" and thus, the
system is a hard real-time system. Real-time systems at the other end of this discussion are said to
have "soft" deadlines.

All of the topics and examples presented in this book are applicable to the designers of
real-time system who is more delight in his work. He must guarantee reliable operation of the
software and hardware under all the possible conditions and to the degree that human lives depend
upon three system's proper execution, engineering calculations and descriptive paperwork.

Application Areas: Nearly 99 per cent of the processors manufactured end up in embedded
systems. The embedded system market is one of the highest growth areas as these systems are used
in very market segment- consumer electronics, office automation, industrial automation,
biomedical engineering, wireless communication,Data communication, telecommunications,
transportation, military and so on.

Consumer appliances: At home we use a number of embedded systems which include digital
camera, digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and
air-conditioner, VCO player, video game consoles, video recorders etc. Today’s high-tech car has
about 20 embedded systems for transmission control, engine spark control, air-conditioning,
navigation etc. Even wristwatches are now becoming embedded systems. The palmtops are
powerful embedded systems using which we can carry out many general-purpose tasks such as
playing games and word processing.

Office automation: The office automation products using em embedded systems are copying
machine, fax machine, key telephone, modem, printer, scanner etc.
Industrial automation: Today a lot of industries use embedded systems for process control. These
include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and
transmission. The embedded systems for industrial use are designed to carry out specific tasks such
as monitoring the temperature, pressure, humidity, voltage, current etc., and then take appropriate
action based on the monitored levels to control other devices or to send information to a centralized
monitoring station. In hazardous industrial environment, where human presence has to be avoided,
robots are used, which are programmed to do specific jobs. The robots are now becoming very
powerful and carry out many interesting and complicated tasks such as hardware assembly.

Medical electronics: Almost every medical equipment in the hospital is an embedded system.
These equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices,
X-ray scanners; equipment used in blood analysis, radiation, colonoscopy, endoscopy etc.
Developments in medical electronics have paved way for more accurate diagnosis of diseases.

Computer networking: Computer networking products such as bridges, routers, Integrated


Services Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay
switches are embedded systems which implement the necessary data communication protocols. For
example, a router interconnects two networks. The two networks may be running different protocol
stacks. The router’s function is to obtain the data packets from incoming pores, analyze the packets
and send them towards the destination after doing necessary protocol conversion. Most networking
equipments, other than the end systems (desktop computers) we use to access the networks, are
embedded systems.

Telecommunications: In the field of telecommunications, the embedded systems can be


categorized as subscriber terminals and network equipment. The subscriber terminals such as key
telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The network
equipment includes multiplexers, multiple access systems, Packet Assemblers Dissemblers
(PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded
systems that provide very low-cost voice communication over the Internet.

Wireless technologies: Advances in mobile communications are paving way for many interesting
applications using embedded systems. The mobile phone is one of the marvels of the last decade of
the 20’h century. It is a very powerful embedded system that provides voice communication while
we are on the move. The Personal Digital Assistants and the palmtops can now be used to access
multimedia services over the Internet. Mobile communication infrastructure such as base station
controllers, mobile switching centers are also powerful embedded systems.

Insemination:Testing and measurement are the fundamental requirements in all scientific and
engineering activities. The measuring equipment we use in laboratories to measure parameters such
as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems. Test
equipment such as oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio
communication test set etc. are embedded systems built around powerful processors. Thank to
miniaturization, the test and measuring equipment are now becoming portable facilitating easy
testing and measurement in the field by field-personnel.

Security: Security of persons and information has always been a major issue. We need to protect
our homes and offices; and also the information we transmit and store. Developing embedded
systems for security applications is one of the most lucrative businesses nowadays. Security
devices at homes, offices, airports etc. for authentication and verification are embedded systems.
Encryption devices are nearly 99 per cent of the processors that are manufactured end up in~
embedded systems. Embedded systems find applications in. every industrial segment- consumer
electronics, transportation, avionics, biomedical engineering, manufacturing, process control and
industrial automation, data communication, telecommunication, defense, security etc. Used to
encrypt the data/voice being transmitted on communication links such as telephone lines.Biometric
systems using fingerprint and face recognition are now being extensively used for user
authentication in banking applications as well as for access control in high security buildings.

Finance: Financial dealing through cash and cheques are now slowly paving way for transactions
using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money)
machines. Smart card, of the size of a credit card, has a small micro-controller and memory; and it
interacts with the smart card reader! ATM machine and acts as an electronic wallet. Smart card
technology has the capability of ushering in a cashless society. Well, the list goes on. It is no
exaggeration to say that eyes wherever you go, you can see, or at least feel, the work of an
embedded system.

1.4 Overview of Embedded System Architecture


Every embedded system consists of custom-built hardware built around a Central
Processing Unit (CPU). This hardware also contains memory chips onto which the software is
loaded. The software residing on the memory chip is also called the ‘firmware’. The embedded
system architecture can be represented as a layered architecture as shown in Fig.

The operating system runs above the hardware, and the application software runs above the
operating system. The same architecture is applicable to any computer including a desktop
computer. However, there are significant differences. It is not compulsory to have an operating
system in every embedded system.

For small appliances such as remote control units, air conditioners, toys etc., there is no
need for an operating system and you can write only the software specific to that application. For
applications involving complex processing, it is advisable to have an operating system. In such a
case, you need to integrate the application software with the operating system and then transfer the
entire software on to the memory chip. Once the software is transferred to the memory chip, the
software will continue to run fora long time you don’t need to reload new software.

Now, let us see the details of the various building blocks of the hardware of an embedded
system. As shown in Fig. the building blocks are:

 Central Processing Unit (CPU)


 Memory (Read-only Memory and Random Access Memory)
 Input Devices
 Output devices
 Communication interfaces
 Application-specific circuitry
Fig 1.1 Blocks of hardware embedded system

Central Processing Unit (CPU):

The Central Processing Unit (processor, in short) can be any of the following:
microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-
cost processor. Its main attraction is that on the chip itself, there will be many other components
such as memory, serial communication interface, analog-to digital converter etc. So, for small
applications, a micro-controller is the best choice as the number of external components required
will be very less. On the other hand, microprocessors are more powerful, but you need to use many
external components with them. D5P is used mainly for applications in which signal processing is
involved such as audio and video processing.

Memory:

The memory is categorized as Random Access 11emory (RAM) and Read Only Memory
(ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas
ROM retains the contents even if the power is switched off. So, the firmware is stored in the ROM.
When power is switched on, the processor reads the ROM; the program is program is executed.

Input devices:

Unlike the desktops, the input devices to an embedded system have very limited capability.
There will be no keyboard or a mouse, and hence interacting with the embedded system is no easy
task. Many embedded systems will have a small keypad-you press one key to give a specific
command. A keypad may be used to input only the digits. Many embedded systems used in process
control do not have any input device foruser interaction; they take inputs fromsensors or
transducers 1’fnd produce electrical signals that are in turn fed to other systems.

Output devices:

The output devices of the embedded systems also have very limited capability. Some
embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of
the system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD) may
also be used to display some important parameters.

Communication interfaces:

The embedded systems may need to, interact with other embedded systems at they may
have to transmit data to a desktop. To facilitate this, the embedded systems are provided with one
or a few communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB),
IEEE 1394, Ethernet etc.

IoT (INTERNET OF THINGS) INTRODUCTION


Fig.1 Internet of Things.
Internet of Things is refer to the general idea of things, especially everyday objects, that are
readable, recognisable, 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.

II. Enabling Technologies For Iot


Internet of things (IoT) is a global infrastructure for the information society, enabling advanced
services by interconnecting (physical and virtual) 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, 2G/3G/4G,GSM,GPRS,RFID, WI-FI, GPS, microcontroller,
microprocessor 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.

(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 IoT from the usual
Internet. The third category is not a functional but rather a de facto requirement, without which the
penetration of the IoT 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 IoT 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 IoT 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-FI,
Bluetooth, ZigBee, GSM, and GPRS. [1, 2] The key enabling technologies for the Internet of
Things is presented in Figure 2.

III. CHARACTERISTICS
The fundamental characteristics of the IoT are as follows
Interconnectivity:
With regard to the IoT, 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 IoT 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 IoT, we must not forget about safety. As both the creators and
recipients of the IoT, 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.
Fig 2. Key enabling technologies of IoT.

IV. IOT 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 Networks

Massive volume 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 IOT 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 each other in a heterogeneous configuration. These networks can be in the form of
a private, public or hybrid models and are built to support the communication requirements for
latency, bandwidth or security. Various gateways (microcontroller, microprocessor...) &
gateway networks (WI-FI, GSM, GPRS…) are shown in figure.

C. Management Service Layer

The management service renders the processing of information possible through analytics,
security controls, process modelling and management of devices.

One of the important features of the management service layer is the business and process rule
engines. IOT brings connection and interaction of objects and systems together providing
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 to 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 IOT 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 random 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 form 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 whole 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 and compromises by unauthorized personnel, thus reducing the possibility of risks.

D. Application Layer

The IoT application covers “smart” environments/spaces in domains such as: Transportation,
Building, City, Lifestyle, Retail, Agriculture, Factory, Supply chain, Emergency, Healthcare,
User interaction, Culture and tourism, Environment and Energy.
E. Iot Functional View
The Internet of Things concept refers to uniquely identifiable things with their virtual
representations in an Internet-like structure and IoT solutions comprising a number of
components such as :

(1) Module for interaction with local IoT 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 IoT devices.

(3) Module for interaction with remote IoT 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. It is taking requests from mobile and web clients and
relevant IoT 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.e. definition of user queries.

F. 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.
Fig. IoT Architecture
While IOT is architected into layers, the technologies have been categorized into three groups.
The first group of technologies impacts the devices, microprocessor chips:

 Low power sensors for power and energy sustainability.


 Intelligence of sensors in the field.
 Miniaturization of chipsets.
 Wireless sensor network for sensor connectivity.

The second group comprises technologies that support network sharing and address capacity
and latency issues:
 Network sharing technologies such as Softwre-defined radios and cognitive networks.
 Network technologies that address capacity and latency issues such as LTE and LTE-A.

The third group impacts the management services that support the IOT applications:
 Intelligent decision-making technologies such as context- aware computing service,
predictive analytics, complex event processing and behavioral analytics.
 Speed of data processing technologies such as in-memory and streaming analytics.
LITERATURE SURVEY
“Prevention is better than cure" is one of the effective measures to prevent the spreading of
COVID-19 and to protect mankind. Many researchers and doctors are working on medication and
vaccination for corona.COVID-19 spreads mostly by droplet infection when people cough or if we
touch someone who is ill and then to our face (i.e. rubbing eyes or nose). Ongoing pandemic
shows that it is much more contagious and spreads fast. Depending on the infection spreading, we
have two cases: Fast and Slow spread. Fast pandemic will be terrible and will cost many lives. It
occurs due to a rapid rate of infection because there are no countermeasures to slow it down. This
is because, if the numbers of infected people get too large, healthcare systems become unable to
handle it. We will lack resources such as medical staff or equipment like a ventilator.
To avoid the above situation, we need to do what we can to turn this into a slow pandemic. A
pandemic can be slowed down only by the right responses, mainly in the early phase. In this
phase, everyone who is sick can get treatment and there is no emergency point with flooded
hospitals. In this pandemic, we need to engineer our behaviour as a vaccine. That is, "Not getting
infected" and "Not infecting others". The best thing we can do is to wash our hands with soap or a
hand sanitizer. The next best thing is social distancing. To avoid getting infected or spreading it, It
is essential to wear a face mask while going out from home especially to public places such as
markets or hospitals As Countries around the Globe are Reopening, living with the Novel
Coronavirus is becoming the new way of life. But to Stop the Spread of the Virus we need to
separate people having the Coronavirus from the Rest. According to the CDC, fever is the leading
symptom of the Coronavirus with up to 83% of Symptomatic Patients showing some signs of
fever. Many Countries are making Temperature Check-up’s and Masks mandatory for Schools,
Colleges, Offices, and other Workplaces. Currently, Temperature check-ups are done manually
using Contactless Thermometer.
Manual check-ups can be Inefficient, Impractical (in places with a large footfall), and Risky. To
test the real-time scenario, we deployed it on one of the rooms to test how possibly it could be
used and the results were pretty affirmative. COVID 19 has made a huge impact on the society,
the new restriction has been imposed as in the number of users allowed in a particular room in
offices, shops, etc. To maintain social distancing, along with social distancing regular temperature
check at entrances of malls, the office is mandatory. In this project we stimulate a room where
such necessary precautions are taken, we make use of a laser diode and receiver to detect the
entrance of a person, when the project detect entrance it will check the temperature of the person if
the temperature is less than the set temperature the person is allowed entry otherwise the entry is
denied. only a pre-determined number of people are allowed in the room. Temperature sensor: An
infrared thermometer is a thermometer which inverts temperature from a portion of the thermal
radiation sometimes called black body radiation emitted by the object being measure. Sometimes
called laser thermometer as a laser is used to help aim the thermometer or non-contact or
temperature gun, to describe the device ability to measure temperature from a distance .By
knowing the amount of infrared energy emitted by the object, the permits temperature
measurement from distance without contact with the object to be measure. A non- contact infrared
sensor thermometer is useful for measuring temperature under circumstance where thermocouple
or other probe type sensors cannot be used or do not produce accurate data for a variety of
reasons.
IoT based devices in homes and industries are used for controlling all the electrical or electronic
devices which are present. Additionally, the saved information of the IoT devices can be
controlled from anywhere. The sensor analyzes the graphical representation of the observed data
in every user-defined format wherever in the world. In this work, IoT based Arduino is used.
Temperature monitoring using Arduino is an exciting and secure process. Furthermore, this
flexible system obtains more values in calculating the actuator from the data saved on the internet.
IoT is used for connecting the electronic devices with the internet. The devices may vary from the
temperature measuring equipment and vehicles SOS system to other electronic devices such as
sensors, software’s, and network connectivity facilities, which sanction collecting and exchanging
data. The twenty-first century has witnessed a massive paradigm shift to and focusing on global
attention onto IoT as a burgeoning discipline with multiple possibilities and diverse opportunities
for growth and development
2 . BLOCK DIAGRAM OF PROJECT AND FUNCTIONING

BLOCK DIAGRAM:

POWER SUPPLY:
3. DESCRPTION OF COMPONENTS
3.1 Raspberry Pi Board:

Fig.3.11 Raspberry Pi 3 Board

3.11.2 Bcm2837 Features

A Raspberry Pi 3 board contains BCM2837 controller which supports ARM11 processing


unit. This is the Broadcom chip used in the Raspberry Pi 3, and in later models of the Raspberry Pi
2. The underlying architecture of the BCM2837 is identical to the BCM2836. The only significant
difference is the replacement of the ARMv7 quad core cluster with a quad-core ARM Cortex A53
(ARMv8) cluster.

The ARM cores run at 1.2GHz, making the device about 50% faster than the Raspberry Pi
2. The VideocoreIV runs at 400Mhz.
The Raspberry Pi 3 Model B builds upon the features of its predecessors with a new, faster
processor on board to increase its speed. It also features WiFi and Bluetooth Low Energy
capabilities to enhance the functionality and the ability to power more powerful devices over the
USB ports [20].

 Quad Core 1.2GHz Broadcom BCM2837 64bit CPU


 1GB RAM
 BCM43143 WiFi and Bluetooth Low Energy (BLE) on board
 40-pin Extended GPIO
 4x USB 2 ports
 4 Pole stereo output and composite video port
 Full size HDMI
 CSI camera port for connecting a Raspberry Pi camera
 DSI display port for connecting a Raspberry Pi touchscreen display
 Micro SD port for loading your operating system and storing data

3.11.3 Pin Diagram Of Raspberry Pi


Fig.3.12 pin diagram of raspberry pi

 GPIO Is Your Standard Pins That Simply Be Used To Turn Devices On And Off. For
Example, A LED.
 I2C (Inter-Integrated Circuit) Pins Allow You To Connect And Talk To Hardware Modules
That Support This Protocol (I2C Protocol). This Protocol Will Typically Take Up Two Pins.
 SPI (Serial Peripheral Interface Bus) Pins Can Be Used To Connect And Talk To SPI Devices.
Pretty Much The Same As I2C But Makes Use Of A Different Protocol.
 UART (Universal Asynchronous Receiver/Transmitter) Is The Serial Pins Used To Communicate
With Other Devices.
 DNC Stands For Do Not Connect, This Is Pretty Self-Explanatory.
 The Power Pins Pull Power Directly From The Raspberry Pi.
 GND Are The Pins You Use To Ground Your Devices. It Doesn’t Matter Which Pin You Use
As They Are All Connected To The Same Line

3.11.4 Features Of Raspberry Pi Pin :


 Broadcom BCM2837 64bit ARM Cortex-A53 Quad Core Processor Soc Running @ 1.2ghz
 1 GB RAM
 4 X USB2.0 Ports With Up To 1.2A Output
 Expanded 40-Pin GPIO Header
 Video/Audio Out Via 4-Pole 3.5mm Connector, HDMI, CSI Camera, Or Raw LCD (DSI)
 Storage: Microsd
 10/100 Ethernet (RJ45)
 BCM43143 Wifi On Board 802.11n Wireless LAN
 Bluetooth Low Energy (BLE) On Board (Bluetooth 4.1)
 27 X GPIO
 UART
 I2C Bus
 SPI Bus With Two Chip Selects
 +3.3V
 +5V
 Ground
 Power Requirements: 5V @ 2.4 A Via Microusb Power Source
 Supports Raspbian, Windows 10 Iot Core, Openelec, OSMC, Pidora, Arch Linux, RISC OS
And More.
 Complete Compatibility With Raspberry Pi 1 And 2

3.11.5 Raspberry Pi Basic Hardware Setup


• Extra Hardware You Will Need
• The Raspberry Pi Board Contains A Processor And Graphics Chip, Program Memory
(RAM) And Various Interfaces And Connectors For External Devices. Some Of These
Devices Are Essential, Others Are Optional. It Operates In The Same Way As A Standard
PC, Requiring A Keyboard For Command Entry, A Display Unit And A Power Supply.
• Since Raspberry Pi Board Operates Like PC It Requires ‘Mass-Storage’, But A Hard
Disk Drive Of The Type Found In A Typical PC Is Not Really In Keeping With The
Miniature Size Of Rpi.
• Instead We Will Use An SD Flash Memory Card Normally Used In Digital Cameras,
Configured In Such A Way To ‘Look Like’ A Hard Drive To Rpi’s Processor.
• Rpi Will ‘Boot’ (Load The Operating System Into RAM) From This Card In The Same
Way As A PC ‘Boots Up’ Into Windows From Its Hard Disk.
• The Following Are Essential To Get Started:
• SD Card Containing Linux Operating System
• USB Keyboard
• TV Or Monitor (With HDMI, DVI, Composite Or SCART Input)
• Power Supply (See Section 1.6 Below)
• Video Cable To Suit The TV Or Monitor Used

Operating System In SD Card


• As The Rpi Has No Internal Mass Storage Or Built-In Operating System It Requires An SD
Card Preloaded With A Version Of The Linux Operating System.
• You Can Create Your Own Preloaded Card Using Any Suitable SD Card (4gbytes Or
Above) You Have To Hand. We Suggest You Use A New Blank Card To Avoid
Arguments Over Lost Pictures.

Keyboard & Mouse


• Most Standard USB Keyboards And Mice Will Work With The Rpi. Wireless
Keyboard/Mice Should Also Function, And Only Require A Single USB Port For An RF
Dongle.
Display
• HD Tvs And Many LCD Monitors Can Be Connected Using A Full-Size 'Male' HDMI
Cable, And With An Inexpensive Adaptor If DVI Is Used. HDMI Versions 1.3 And 1.4 Are
Supported And A Version 1.4 Cable Is Recommended. The Rpi Outputs Audio And Video
Via HMDI, But Does Not Support HDMI Input.
Power Supply
• A Standard Modern Phone Charger With A Micro USB Connector Will Do, Providing It
Can Supply At Least 700ma At +5Vdc.
Cables
• You Will Need One Or More Cables To Connect Up Your Rpi System.
• Video Cable Alternatives:
• HDMI-A Cable
• HDMI-A Cable + DVI Adapter
• Composite Video Cable
• Composite Video Cable + SCART Adaptor
• Audio Cable (Not Needed If You Use The HDMI Video Connection To A TV)
• Ethernet/LAN Cable
Internet Connectivity
• This May Be Via An Ethernet/LAN Cable (St-+++---------------------Andard RJ45
Connector) Or A USB Wi-Fi Adaptor.
• The Rpi V2 Model B Ethernet Port Is Auto-Sensing Which Means That It May Be
Connected To A Router Or Directly To Another Computer (Without The Need For A
Crossover Cable).

Devices With Known Issues

1. Interoperability Between The Raspberry Pi And USB3.0 Hubs.


There Is An Issue With USB3.0 Hubs In Conjunction With The Use Of Full- Or Low-Speed
Devices (Most Mice, Most Keyboards) And The Raspberry Pi. A Bug In Most USB3.0 Hub
Hardware Means That The Raspberry Pi Cannot Talk To Full- Or Low-Speed Devices Connected
To A USB3.0 Hub. USB2.0 High-Speed Devices, Including USB2.0 Hubs, Operate Correctly
When Connected Via A USB3.0 Hub. Avoid Connecting Low- Or Full-Speed Devices Into A
USB3.0 Hub. As A Workaround, Plug A USB2.0 Hub Into The Downstream Port Of The USB3.0
Hub And Connect The Low-Speed Device, Or Use A USB2.0 Hub Between The Pi And The
USB3.0 Hub, Then Plug Low-Speed Devices Into The USB2.0 Hub.

2. USB

Old Webcams May Be Full-Speed Devices. Because These Devices Transfer A Lot Of Data
And Incur Additional Software Overhead, Reliable Operation Is Not Guaranteed. As A
Workaround, Try To Use The Camera At A Lower Resolution.

3. Esoteric USB Sound Cards

Expensive "Audiophile" Sound Cards Typically Use Far More Bandwidth Than Is
Necessary To Stream Audio Playback. Reliable Operation With 96khz/192khz Dacs Is Not
Guaranteed.As A Workaround, Forcing The Output Stream To Be CD Quality (44.1khz/48khz 16-
Bit) Will Reduce The Stream Bandwidth To Reliable Levels.

4. Single-TT USB Hubs

USB2.0 And 3.0 Hubs Have A Mechanism For Talking To Full- Or Low-Speed Devices
Connected To Their Downstream Ports Called A Transaction Translator. This Device Buffers
High-Speed Requests From The Host (I.E. The Pi) And Transmits Them At Full- Or Low-Speed
To The Downstream Device. Two Configurations Of Hub Are Allowed By The USB Specification:
Single-TT (One TT For All Ports) And Multi-TT (One TT Per Port).

Because Of The OTG Hardware Limitations, If Too Many Full- Or Low-Speed Devices
Are Plugged Into A Single-TT Hub, Unreliable Operation Of The Devices May Occur. It Is
Recommended To Use A Multi-TT Hub To Interface With Multiple Lower-Speed Devices.
As A Workaround, Spread Lower-Speed Devices Out Between The Pi's Own USB Port And The
Single-TT Hub.

3.2 POWER SUPPLY

The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from
the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output
obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the
output voltage from the rectifier is fed to a filter to remove any a.c components present even after
rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.

Fig 3.5 Block Diagram of Power supply


Fig 3.6 Circuit Diagram of Power supply

3.2.1 Step down Transformer:


Usually, DC voltages are required to operate various electronic equipment and these
voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input
available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is
done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a
required level.

3.2.2 Rectifier:
The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The
rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used
because of its merits like good stability and full wave rectification.
3.2.3 Filter:
Capacitive filter is used in this project. It removes the ripples from the output of rectifier and
smoothens the D.C. Output received from this filter is constant until the mains voltage and load
is maintained constant. However, if either of the two is varied, D.C. voltage received at this point
changes. Therefore a regulator is applied at the output stage.

3.2.4 Voltage Regulator:


As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical
regulator designed to automatically maintain a constant voltage level. In this project, power supply
of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage
regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12
represent the required output voltage levels.
Features:

• Output Current up to 1A.

• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.

• Thermal Overload Protection. • Short Circuit Protection.

• Output Transistor Safe Operating Area Protection.


3.3 How to Setup your Raspberry Pi

Courtesy of All About Circuits - Raspberry Pi is a miniature computer with ports that can be
connected to different peripheral devices. It has an HDMI port to connect a monitor, USB ports for
a keyboard and mouse, and an ethernet port to connect to the internet.
In this tutorial, you’ll learn how to connect your Raspberry Pi to your computer so you can boot up
its operating system.
Hardware and Software
 1 x Raspberry Pi
 1 x Ethernet Cable
 1 x Laptop or Desktop PC
 1 x SD card (needs to be at least 4GB)
 1 x Micro USB cable
Before we move on, you’ll need to download some free software. Here are the programs you’ll
need to download:
Raspbian OS: When you buy Raspberry Pi, you have option (on some stores) to buy it with a pre-
installed OS on your SD card. Otherwise you can download the zip-file form which includes the
image of the Raspbian OS that you’re going to write on your SD card.
SDFormatter: SD card association has nice software that can be used to format your SD Card.
Win32DiskImager: In order to write the Raspbian OS on to your SD card, you will need
Win32DiskImager utility. You can download it from Sourceforge.
Advanced IP Scanner: You’ll need this to find your Raspberry Pi’s IP address when you’ll connect
it to your computer
PuTTy: PuTTy is the SSH client that will be used to connect to Raspberry Pi.
VNC: Last is VNC server.
Once you download the software, unzip and install them.
Installing the OS
1.    Insert your SD card into the SD card reader and see which letter is assigned to the drive.
2.    Open Win32DiskImager, you may need to be logged into the administrator account on your
computer.
3.    Select the image of Raspbian that you extracted.
4.    Select the your SD card’s device letter in the device box. Make sure that you select the correct
drive letter, otherwise it will ruin your hard drive.
5.    Click “Write” and wait for the write to complete.
6.    Exit the imager and eject the SD card, then plug it into your Raspberry Pi.
Note: After you write the OS, you’ll notice that there are only a few MBs leftover in your SD card,
this is because of the partition; the rest of the free space is hidden. You can fix this after we connect
to our Raspberry Pi.
Sharing Internet Over the Ethernet Port
*If you have a Raspberry Pi 3, use this tutorial to configure Wi-Fi and Bluetooth
Now that your SD Card is ready, insert it into your Raspberry Pi. Attach the Micro USB Power
Cable as well. You will also need to attach your Raspberry Pi to you PC or laptop with ethernet
cable.
 You can now share your PC’s WiFi internet with your Raspberry Pi using Connection Bridge.
Follow the steps below:
1. On your computer, go to the “Network and Sharing Center”, then go to “Change adapter
settings” in the left column. You will see multiple connections in this window.

2. What we’re doing here is making a bridge between the WiFi and Ethernet connection. Select
your WiFi, then hold Ctrl, then select your Ethernet
3. Right click on any of them (with both the Wifi and Ethernet selected as mentioned in the previous
step) and select “Bridge Connections”.
4. Wait until Windows bridges the connections.
5. If successful you’ll notice another connection called “Network Bridge” in your adapter settings.
Checking for your Raspberry Pi’s IP Address
This part is simple, make sure that your Raspberry Pi is connected to your PC and the Ethernet cable
is also plugged in. If everything is working fine you’ll see leds blinking on your board.

1. Run “Advanced IP Scanner” and click “Run”


2. It will take some time and you’ll see a list of devices connected to your network.

Advanced IP Scanner:
Advanced IP Scanner is fast and free software for network scanning. It will allow you to quickly
detect all network computers and obtain access to them. With a single click, you can turn a remote
PC on and off, connect to it via Radmin, and much more.

How do I scan with Advanced IP Scanner?


To use the steps in this article, you must download Advanced IP scanner:
1. Open the Advanced IP Scan software:
2. Click the “IP” button to see what networks your computer is on:
3. Verify the Network address range that you are scanning:
4. Click the “Scan” button to begin the scan of the specified network:
How do I install Advanced IP Scanner?

1:28
Connecting to Raspberry Pi through VNC
It’s now time to install VNC on your Raspberry Pi. At this point, you should have already installed
VNC on your computer.
1. Connect to your Raspberry Pi through PuTTy.
2. Write sudo apt-get install tightvncservern in the Raspberry Pi terminal window.
3. Once the VNC is installed, run this command “vncserver :1”. This will start the VNC server.
You’ll be prompted to enter a password, you can enter any 8 digit password. This password will be
used to connect to this VNC server on your PC.
4. Run VNC viewer on your computer.
5. Enter the IP address of your VNC server. This is your Raspberry Pi’s IP address. The port
number is shown at the end of the IP address. Click “Connect”. You will receive a warning
message, but just click “Continue”.

6. Enter your 8-digit password and hit enter.


Now you can use your Raspbian like a normal OS and start coding!
 

3.4 WEB CAMERA


Camera plays a vital role in automation purpose. The camera is used for monitoring of a
room from a remote place. The camera used is a USB camera (life cam vx-800). Whenever the
user clicks on to video button on loaded webpage, the corresponding room video will be
streamed on to webpage. For this purpose, we use a MJPG streamer. The below figure shows the
camera that has been used for monitoring of a room.

FEATURES OF VX800 CAMERA

 Hear more clearly: This microphone produces quality audio.


low-light
See more detail: It contains a VGA video sensor for a clear image. It also adjusts for
condition.
 Universal attachment base: Works on your PC, desktop.
 Easy to use: Set up in minutes with plug and play.

 Resolution: motion vide0(0.31 mega pixel i.e. 640*480 pixel)

 Supported interface:USB

override.
Imaging features: fixed focus and automatic image adjustment with manual

 Field of view: 59 degree diagonal field of view.


 Sensor present in it is CMOS VGA technology.

 The camera also comes with integrated microphone

3.5 BUZZER

GENERAL DESCRIPTION
A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm
devices, timers and confirmation of user input such as a mouse click or key stroke. Buzzer
is an integrated structure of electronic transducers, DC power supply, widely used in
computers, printers, copiers, alarms, electronic toys, automotive electronic equipment,
telephones, timers and other electronic products for sound devices. Active buzzer 5V Rated
power can be directly connected to a continuous sound, this section dedicated sensor
expansion module and the board in combination, can complete a simple circuit design, to
"plug and play."
PRODUCT DESCRIPTION
A buzzer or beeper is an audio signalling device, which may be mechanical,
electromechanical, or piezoelectric. Typical uses of buzzers and beepers include alarm
devices, timers, and confirmation of user input such as a mouse click or keystroke. It
generates consistent single tone sound just by applying D.C voltage. Using a suitably
designed resonant system, this type can be used where large sound volumes are needed. At
Future Electronics we stock many of the most common types categorized by Type, Sound
Level, Frequency, Rated Voltage, Dimension and Packaging Type.

FEATURES
Input supply: 5 VDC
 Current consumption: 9.0 mA max.
 Oscillating frequency: 3.0 ±0.5 KHz
 Sound Pressure Level: 85dB min
APPLICATIONS
Confirmation of user input (ex: mouse click or keystroke)
 Electronic metronomes

3.6 IR SENSOR

Infrared sensors are used to count and monitor the number of people who enter
and leave the room. The IR sensor's operating voltage is 5VDC, and the I/O pins
are 5V and 3.3V compatible. It comes with a variety of options. Fig 3 depicts an
IR Sensor that features a built ambient light sensor and a mounting hole, as well
as an adjustable sensing range of up to 20cm.
IR Transmitter:

TSAL6200 is a high efficiency infrared emitting diode in GaAlAs on GaAs technology, molded in
clear, blue grey tinted plastic packages. In comparison with the standard GaAs on GaAs
technology these emitters achieve more than 100 % radiant power improvement at a similar
wavelength. The forward voltages at low current and at high pulse current roughly correspond to
the low values ofthe standard technology. Therefore these emitters are ideally suitable as high
performance replacements of standard emitters.

Features

• Extra high radiant power and radiant intensity.


• High reliability.

• Low forward voltage.

• Suitable for high pulse current operation.

• Standard T-1¾ (∅ 5 mm) package.

• Angle of half intensity ϕ = ± 17°.

• Peak wavelength λp = 940 nm.

• Good spectral matching to Silicon photodetectors.

Applications

Infrared remote control units with high power requirements

Free air transmission systems

Infrared source for optical counters and card readers

IR source for smoke detectors.

IR Receiver:
The TSOP17.. – series are miniaturized receivers for infrared remote control systems. PIN diode
and preamplifier are assembled on lead frame, the epoxy package is designed as IR filter. The
demodulated output signal can directly be decoded by a microprocessor. TSOP17XX is the
standard IR remote control receiver series, supporting all major transmission codes.
Features

 Photo detector and preamplifier in one package.


 Internal filter for PCM frequency.
 Improved shielding against electrical field disturbance.
 TTL and CMOS compatibility.
 Output active low.
 Low power consumption.
 High immunity against ambient light.
 Continuous data transmission possible (up to 2400 bps).
 Suitable burst length .10 cycles/burst

Block Diagram

Application Circuit
The circuit of the TSOP17. is designed in such a way that unexpected output pulses due to noise
or disturbance signals are avoided. A bandpass filter, an integrator stage and an automatic gain
control are used to suppress such disturbances. The distinguishing mark between data signal and
disturbance signal are carrier frequency, burst length and duty cycle. The data signal should fulfill
the following condition:

 Carrier frequency should be close to centre frequency of the band pass (e.g. 38kHz).
 Burst length should be 10 cycles/burst or longer.
 After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles
is necessary.
 For each burst which is longer than 1.8ms a corresponding gap time is necessary at some
time in the data stream. This gap time should have at least same length as the burst.
 Up to 1400 short bursts per second can be received continuously.
When a disturbance signal is applied to the TSOP17. it can still receive the data signal. However,
the sensitivity is reduced to that level that no unexpected pulses will occur.

The arrangement of this sensors is as shown below.


3.7 DC MOTOR
DEFINITION

Motor is a device that creates motion, not an engine; it usually refers to either an electrical motor
or an internal combustion engine.

BASICS OF DC MOTOR

The speed of a DC motor is directly proportional to the supply voltage, so if we reduce


the supply voltage from 12 Volts to 6 Volts, the motor will run at half the speed. How can this
be achieved when the battery is fixed at 12 Volts? The speed controller works by varying the
average voltage sent to the motor. It could do this by simply adjusting the voltage sent to the
motor, but this is quite inefficient to do. A better way is to switch the motor's supply on and off
very quickly. If the switching is fast enough, the motor doesn't notice it, it only notices the
average effect.

When you watch a film in the cinema, or the television, what you are actually seeing is a
series of fixed pictures, which change rapidly enough that your eyes just see the average effect -
movement. Your brain fills in the gaps to give an average effect.

Now imagine a light bulb with a switch. When you close the switch, the bulb goes on
and is at full brightness, say 100 Watts. When you open the switch it goes off (0 Watts). Now if
you close the switch for a fraction of a second, then open it for the same amount of time, the
filament won't have time to cool down and heat up, and you will just get an average glow of 50
Watts. This is how lamp dimmers work, and the same principle is used by speed controllers to
drive a motor. When the switch is closed, the motor sees 12 Volts, and when it is open it sees 0
Volts. If the switch is open for the same amount of time as it is closed, the motor will see an
average of 6 Volts, and will run more slowly accordingly. The graph below shows the speed of a
motor that is being turned on and off

An electric motor is a machine which converts electrical energy into mechanical energy.

Principle of operation

In any electric motor, operation is based on simple electromagnetism. A current-carrying


conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational
motion.
Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or
winding with a "North" polarization, while green represents a magnet or winding with a "South"
polarization).

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field
magnet(s), and brushes. In most common DC motors (and all that BEAMers will see), the external
magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of
the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces.
The rotor (together with the axle and attached commutator) rotate with respect to the stator. The
rotor consists of windings (generally on a core), the windings being electrically connected to the
commutator. The above diagram shows a common motor layout -- with the rotor inside the stator
(field) magnets.

The geometry of the brushes, commutator contacts, and rotor windings are such that when
power is applied, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As
the rotor reaches alignment, the brushes move to the next commutator contacts, and energize
the next winding. Given our example two-pole motor, the rotation reverses the direction of
current through the rotor winding, leading to a "flip" of the rotor's magnetic field, driving it to
continue rotating.
In real life, though, DC motors will always have more than two poles (three is a very common
number). In particular, this avoids "dead spots" in the commutator. You can imagine how with
our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly
aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor,
there is a moment where the commutator shorts out the power supply (i.e., both brushes
touch both commutator contacts simultaneously). This would be bad for the power supply,
waste energy, and damage motor components as well. Yet another disadvantage of such a
simple motor is that it would exhibit a high amount of torque "ripple" (the amount of torque it
could produce is cyclic with the position of the rotor).

   

Figure 1: Force in DC Motor Figure 2 : Magnetic Field in DC


Motor

Figure 4 : Current Flow in DC


Figure 3 :  Torque in DC Motor
Motor

If an Electric current flows through two copper wires that are between the poles of a magnet,
an upward force will move one wire up and a downward force will move the other wire down.
The loop can be made to spin by fixing a half circle of copper which is known as COMMUTATOR
to each end of the loop. Current is passed into and out of the loop by brushes that press onto
the strips. The BRUSHES do not go round so the wire do not get twisted. This arrangement also
makes sure that the current always passes down on the right and back on the left so that the
rotation continues. This is how a simple Electric motor is made.

It may also refer to:

 Electric motor, a machine that converts electricity into a mechanical motion


o AC motor, an electric motor that is driven by alternating current
 Synchronous motor, an alternating current motor distinguished by a rotor
spinning with coils passing magnets at the same rate as the alternating current and resulting
magnetic field which drives it
 Induction motor, also called a squirrel-cage motor, a type of asynchronous
alternating current motor where power is supplied to the rotating device by means of
electromagnetic induction
o DC motor, an electric motor that runs on direct current electricity
 Brushed DC electric motor, an internally commutated electric motor
designed to be run from a direct current power source
 Brushless DC motor, a synchronous electric motor which is powered by
direct current electricity and has an electronically controlled commutation system, instead of a
mechanical commutation system based on brushes
o Electrostatic motor, a type of electric motor based on the attraction and repulsion of
electric charge
o Servo motor, an electric motor that operates a servo, commonly used in robotics
o Internal fan-cooled electric motor, an electric motor that is self-cooled by a fan,
typically used for motors with a high energy density

In a brushed DC motor, torque control is also simple, since output torque is proportional to
current. If you limit the current, you have just limited the torque which the motor can achieve.
This makes this motor ideal for delicate applications such as textile manufacturing.

3.8 TEMPARATURE SENSOR


We all use temperature sensors in our daily lives, be it in the form of thermometers, domestic water
heaters, microwaves, or refrigerators. Usually, temperature sensors have a wide range of
applications, geotechnical monitoring field, being one of them.

Temperature sensors are a simple instrument that measures the degree of hotness or coolness and
converts it into a readable unit. But, have you ever wondered how the temperature of the soil,
boreholes, huge concrete dams or buildings is measured? Well, this is accomplished through some
of the specialised temperature sensors.

Temperature sensors are designed to keep a regular check on concrete structures, bridges, railway
tracks, soil, etc.
Here we are going to tell you what a temperature sensor is, how does it work, where is it used, and
what are its different types.

What are the temperature sensors?

A temperature sensor is a device, typically, a thermocouple or resistance temperature detector, that


provides temperature measurement in a readable form through an electrical signal.

A thermometer is the most basic form of a temperature meter that is used to measure the degree of
hotness and coolness.

Temperature meters are used in the geotechnical field to monitor concrete, structures, soil, water,
bridges etc. for structural changes in them due to seasonal variations.

A thermocouple (T/C) is made from two dissimilar metals that generate an electrical voltage in
direct proportion with the change in temperature. An RTD (Resistance Temperature Detector) is a
variable resistor that changes its electrical resistance in direct proportion with the change in the
temperature in a precise, repeatable and nearly linear manner.

What do temperature sensors do?

A temperature sensor is a device that is designed to measure the degree of hotness or coolness in an
object. The working of a temperature meter depends upon the voltage across the diode. The
temperature change is directly proportional to the diode’s resistance. The cooler the temperature,
lesser will be the resistance, and vice-versa.

The resistance across the diode is measured and converted into readable units of temperature
(Fahrenheit, Celsius, Centigrade, etc.) and, displayed in numeric form over readout units. In
geotechnical monitoring field, these temperature sensors are used to measure the internal
temperature of structures like bridges, dams, buildings, power plants, etc.

What is a temperature sensor used for? | What are the functions of a temperature sensor?
Well, there are many types of temperature sensors, but, the most common way to categorise them is
based upon the mode of connection which includes, contact and non-contact temperature sensors.

Contact sensors include thermocouples and thermistors because they are in direct contact with the
object they are to measure. Whereas, the non-contact temperature sensors measure the thermal
radiation released by the heat source. Such temperature meters are often used in hazardous
environments like nuclear power plants or thermal power plants.

In geotechnical monitoring, temperature sensors measure the heat of hydration in mass concrete
structures. They can also be used to monitor the migration of groundwater or seepage. One of the
most common areas where they are used is while curing the concrete because it has to be relatively
warm in order to set and cure properly. The seasonal variations cause structural expansion or
contraction thereby, changing its overall volume.

How does temperature sensor work?

The basic principle of working of the temperature sensors is the voltage across the diode terminals.
If the voltage increases, the temperature also rises, followed by a voltage drop between the
transistor terminals of base and emitter in a diode.

Besides this, Encardio-Rite has a vibrating wire temperature sensor that works on the principle of
stress change due to temperature change.

The vibrating wire temperature meter is designed on the principle that dissimilar metals have a
different linear coefficient of expansion with temperature variation.

It primarily consists of a magnetic, high tensile strength stretched wire, the two ends of which are
fixed to any dissimilar metal in a manner that any change in temperature directly affects the tension
in the wire and, thus, its natural frequency of vibration.

The dissimilar metal, in the case of the Encardio-Rite temperature meter, is aluminium (Aluminum
has a larger coefficient of thermal expansion than steel.) As the temperature signal is converted into
frequency, the same read-out unit which is used for other vibrating wire sensors can also be used
for monitoring temperature also.

The change in temperature is sensed by the specially built Encardio-rite vibrating wire sensor and
is converted to an electrical signal which is transmitted as a frequency to the read-out unit.

The frequency, which is proportional to the temperature and in turn to the tension ‘σ’ in the wire,
can be determined as follows:

f = 1/2 [σg/ρ] / 2l Hz

Where:

σ = tension of the wire

g = acceleration due to gravity

ρ = density of the wire

l = length of wire

What are the different types of temperature sensors?

Temperature sensors are available of various types, shapes, and sizes. The two main types of
temperature sensors are:

Contact Type Temperature Sensors: There are a few temperature meters that measure the degree of
hotness or coolness in an object by being in direct contact with it. Such temperature sensors fall
under the category contact-type. They can be used to detect solids, liquids or gases over a wide
range of temperatures.
Non-Contact Type Temperature Sensors: These types of temperature meters are not in direct
contact of the object rather, they measure the degree of hotness or coolness through the radiation
emitted by the heat source.

The contact and non-contact temperature sensors are further divided into:

Thermostats

A thermostat is a contact type temperature sensor consisting of a bi-metallic strip made up of two
dissimilar metals such as aluminium, copper, nickel, or tungsten.

The difference in the coefficient of linear expansion of both the metals causes them to produce a
mechanical bending movement when it’s subjected to heat.

Thermistors
Thermistors or thermally sensitive resistors are the ones that change their physical appearance
when subjected to change in the temperature. The thermistors are made up of ceramic material such
as oxides of nickel, manganese or cobalt coated in glass which allows them to deform easily.

Most of the thermistors have a negative temperature coefficient (NTC) which means their
resistance decreases with an increase in the temperature. But, there are a few thermistors that have
a positive temperature coefficient (PTC) and, their resistance increases with a rise in the
temperature.
4. SOFTWARE

REQUIRED ITEMS
 A Raspberry Pi (Either a Model B or Model B+)

 SD Card

o We recommend an 8GB class 4 SD card.

 Display and connecting cables

o Any HDMI/DVI monitor or TV should work as a display for the Pi.

o For best results, use one with HDMI input, but other connections are available for older
devices.
 Keyboard and mouse

o Any standard USB keyboard and mouse will work with your Raspberry Pi.

 Power supply

o Use a 5V micro USB power supply to power your Raspberry Pi. Be careful that what-
ever power supply you use outputs at least 5V; insufficient power will cause your Pi to
behave unexpectedly.
 Internet connection

o To update or download software, we recommend that you connect your Raspberry Pi to


the internet either via an Ethernet cable or a WiFi adaptor.
 Sound

o Headphones, earphones or speakers with a 3.5mm jack will work with your Raspberry
Pi.
RASPBERRY PI

INSTALLING RASBIAN DEBIAN WHEEZY OPERATING SYSTEM USING


WINDOWS

 http://downloads.raspberrypi.org/raspbian_latest

Dowload the file “RASPBIAN Debian Wheezy.zip” and extract the image file.

 Insert the SD card into your SD card reader(format the sd card) and check which drive letter was
assigned. You can easily see the drive letter (for example G:) by looking in the left column of
Windows Explorer. You can use the SD Card slot (if you have one) or a cheap SD adaptor in a
USB port.
 Download the Win32DiskImager utility from the Sourceforge Project page (it is also a zip
file); you can run this from a USB drive. http://sourceforge.net/projects/win32diskimager/
files/latest/download
 Extract the executable from the zip file and run the Win32DiskImager utility; you may need
to run the utility as administrator. Right-click on the file, and select Run as administrator.
 Select the image file you extracted above.

 Select the drive letter of the SD card in the device box. Be careful to select the correct drive; if
you get the wrong one you can destroy your data on the computer's hard disk! If you are using
an SD card slot in your computer and can't see the drive in the Win32DiskImager window, try
using a cheap SD adaptor in a USB port.
 Click Write and wait for the write to complete.

 Exit the imager and eject the SD card


FORMAT THE SD CARD
Locate your SD card drive, in Windows Explorer, and secondary-click the mouse to bring up the
context-senstive menu. From the menu select Format…. Ensure that the option FAT32 (Default) is
selected and click Start.

Selecting an SD card to format

A few moments later you will see a confirmation that the format has been completed and you SD card is
now ready for the next stage.

Formatting the SD card


USING WIN32DISKIMAGER
Having plugged in your SD card, (re)start Win32Diskimager. Choose the drive you want to copy the
image to (in my case F:).

 choose the drive with your SD card to write the OS image on


Then click on the folder icon and choose the unzipped .img file from earlier that you want to
put on the SD card. Then click Write, to write the Operating system on the card from the .img
file.

 Write OS image from .img file to SD card


You will then be asked to confirm. Check carefully that you are writing to the correct device
and if so, click Yes.
 Check device and confirm
The progress bar will show you how far it’s got.
 Progress indicator
When it’s finished it looks like this.

 Finished
Then you can eject the card reader and remove the SD card. Then you can try it out in your
Raspberry Pi
PLUGGING IN YOUR RASPBERRY PI
1. Begin by slotting your SD card into the SD card slot on the Raspberry Pi, which will only fit
one way.

2. Next, plug in your USB keyboard and mouse into the USB slots on the Raspberry Pi. Make
sure that your monitor or TV is turned on, and that you have selected the right input (e.g.
HDMI 1, DVI, etc.).

3. Then connect your HDMI cable from your Raspberry Pi to your monitor or TV.

4. If you intend to connect your Raspberry Pi to the internet, plug in an Ethernet cable into the
Ethernet port next to the USB ports; if you do not need an internet connection, skip this step.

5. Finally, when you are happy that you have plugged in all the cables and SD card required, plug in
the micro USB power supply. This action will turn on and boot your Raspberry Pi.

6. If this is the first time your Raspberry Pi SD card have been used, then you will have to select an
operating system and configure it.

LOGGING INTO YOUR RASPBERRY PI

1. Once your Raspberry Pi has completed the boot process, a login prompt will appear. The default
login for Raspbian is username pi with the password raspberry. Note you will not see any writing
appear when you type the password. This is a security feature in Linux.

2. After you have successfully logged in, you will see the command line prompt pi@raspberrypi~$.

3. To load the graphical user interface, type startx and press Enter on your keyboard.
DOWNLOAD AND INSTALL WIRING PI

WiringPi is maintained under GIT for ease of change tracking, however there is a Plan B if you’re unable
to use GIT for whatever reasons (usually your firewall will be blocking you, so do check that first!)

ONLINE INSTALL
If you do not have GIT installed, then under any of the Debian releases (e.g. Raspbian), you can install it
with:

sudo apt-get install git-core

If you get any errors here, make sure your Pi is up to date with the latest versions of Raspbian: sudo apt-
get update sudo apt-get upgrade

To obtain WiringPi using GIT:

git clone git://git.drogon.net/wiringPi

If you have already used the clone operation for the first time, then cd wiring Pi git pull origin

Will fetch an updated version then you can re-run the build script below.
To build/install there is a new simplified script: cd wiring Pi. / build

The new build script will compile and install it all for you – it does use the sudo command at one point,
so you may wish to inspect the script before running it.
OFFLINE INSTALL

Click on this URL: (it should open in a new page)

https://git.drogon.net/?p=wiringPi;a=summary

Then look for the link marked snapshot at the right-hand side. You want to click on the top one.

This will download a tar.gz file with a name like wiringPi-98bcb20.tar.gz. Note that the numbers and
letters after wiringPi (98bcb20 in this case) will probably be different – they’re a unique identifier for
each release.

You then need to do this to install:

tar xfz wiringPi-98bcb20.tar.gz cd wiringPi-98bcb20./build

Note that the actual filename will be different – you will have to check the name and adjust according
4. Methodology

4.1. Face mask detection

4.1.1. Convolution Neural Networks (CNN) Algorithm


In this paper, a deep learning algorithm is used to identify face mask recognition and, Convolution
Neural Networks (CNN) classification. A CNN is a form of artificial neural network that is
specifically built to interpret pixel input and is mainly used for image recognition and analysis, in
which each layer applies to a different set of filters. Around 100’s to 1000’s of filters is combined
to give a final result and then the obtained output is sent to the next layer in this neural network.
Evaluation of the proposed framework is done by the face mask detection algorithm using the
TensorFlow software library as shown in Fig 6 . The Mask detector model steps involved in the
algorithm is given below

Fig 6. Face Mask Detection


STEP 1: DATASET COLLECTION

STEP 2: PRE-PROCESSING

STEP 3: SPLITTING

STEP 4: TRAINING

STEP 5: TESTING/EVALUATION

According to the above-mentioned algorithm, all the required dataset and components for building
the network is collected from various categories. Once the initial dataset is ready, the next step is to
train and test the set. This test dataset is used only in evaluating the performance of the network.
Next training should be done, so the neural network learns to identify different categories in the
given labels. Finally, the dataset should be evaluated and compared with the ground-truth labels.
4.1.2. Dataset Collection
The images used for training and testing the model were obtained from the internet. The dataset
used in this project was designed by Prajna Bhandary. This dataset contains 1,376 photos divided
into two classes: 690 images with masks and 686 images without masks as shown in fig. To create
this dataset, they took regular photographs of people's faces and then used a custom-
designed computer vision Python script to apply face masks to the pictures, yielding an artificial
dataset. Facial landmarks allow the users to instantly infer the position of facial components such
as the eyes, nose, eyebrows, mouth, and jawline. Then, using facial landmarks, the dataset of faces
wearing masks can be created. To determine the bounding box region of a face in an image, start
with an image of an individual who's not wearing a face mask and then apply face detection. It can
capture the face Region of Interest (ROI) after determining where the face is now in the picture,
and then utilize facial landmarks to detect the position of mouth, eyes, nose, and other features.
Initially, an image of a mask is required, which will be put to the face automatically utilizing facial
landmarks (particularly, the regions around the mouth and chin) to determine where the mask
should be placed. After that, the mask is scaled and twisted before being fitted to the face, and the
process is repeated for each of the input images, yielding an artificial face mask dataset as shown
in Fig.

Fig. . People with and without mask


The face is captured and the blob is constructed from the image that depicts people with and
without wearing masks [1]. This blob is passed via network to achieve face detection from the
extracted blob and the trust (i.e., probability) is also associated with extracted detection. The weak
detection is filtered to ensure that the confidence (probability) is more than min degree of reliability
so that face ROI (Region of Interest) is extracted and switched to RGB format from BGR format
and it is reformatted to 4 × 224, and then pre-processing is done, Now extracted face is sent via the
mask detection model to detect the face sent is wearing a proper face mask or without a face mask.
So, the bounding box and text are drawn and probability is included in the label. Finally, a white
box which is known as a rectangle bounding box appears with a label as a frame on the output
screen.
4.2. Temperature detection

The temperature sensor is connected to the RPi's GPIO Pin, and appropriate code is written for the
sensor. Output is Celsius, and if the temperature reaches the standard alarm is given as a
warning. Fig depicts the connection of temperature sensor, Pi cam, and IR sensors with Raspberry
Pi.

Fig : Connections

4.3. Number of people passing in and out of the room

Infrared sensors are used to monitor the number of people who enter and leave the room.
The Internet of Things (IoT) technology is used to detect temperature and keep a count of the
number of people, while mask detection is used to identify individuals near the camera are wearing
a mask or not. Fig 9 shows the overall architecture diagram of the system.
Fig. Overall Architecture Diagram

4.4. System Overview

Fig shows the overview of the connection structures that make up the solution. Any person
attempting to enter the building should first pass through infrared sensors, which are used to track
and manage the individual count of people entering the room and later exiting. Body temperature is
tested only when the people's total count inside a room is less than the given limit. The MLX90614
body temperature sensor is used for this purpose. If the person's body temperature is too high, the
door will not open; if the person's temperature is average, the door will open and proceed to the
next level, i.e., mask detection. The Raspberry Pi single-board computer with Raspberry Pi Camera
is used for this function. If an individual wearing a mask is detected, the door will be opened. If the
individual is discovered without a mask, the door will not open. To ensure the guidelines and safety
for indoor workers during this COVID-19, this IoT solution based comes into action.
4.5. Face Mask Detection

To implement the mask detection algorithm depending on the Tensor flow library, it contains two
parts: the Face Detection Caffe model as shown in Figs depicts the various phases of the face mask
detection model.

Fig . Face Mask Detection Caffe Model


Fig . Phases of Face Mask Detection
5.RESULT AND DISCUSSION ANALYSIS

Fig: Hardware Connection .

5.1. System requirement

The training was carried out on a computer running the 62-bit Windows10 operating system and
equipped with an Intel ® CoreTM i5-8265U CPU running at 1.60GHz and 8 GB of RAM. Python
3.7 is being used as the application development language. The model was developed and trained
using Keras as the backend and the Tensor-flow platform. To generate mask detector model input
dataset and fine-tune MobileNetV2 is accepted using the training python script. A training history
plot.png with accuracy/loss curves is also generated, as. Implementation of face mask detection in
Raspberry Pi can be done using the mask detector model.

In this work, a Raspberry Pi 3 Model V is used. It is a low-cost, compact gadget that plugs into a
computer. The Raspberry Pi is connected to the laptop via a LAN cable. The VCC of the first IR
sensor has a connection with the 2nd pin on R pi, the GND pin has a connection with the 34th pin of
the R pi, and the output is connected to the 40th pin of the R pi, which is a general-purpose I/O pin
commonly known as GPIO pin. VCC of the second IR sensor has a connection with the 17th pin,
GND to the 13th pin, and out pin to the R pi's 38th GPIO pin. The servo motor's VCC has a
connection with 5V input which is the 2nd pin, next GND pin is connected to pin number 39 and the
signal pin to pin number 37 which is the GPIO pin on R pi's. The MLX90614 temperature sensor's
VCC pin has a connection with 1st pin on R pi, its GND has a connection to pin number 16 on R pi,
and the HCL and HDL pins of the sensor are connected to the 2nd and the 3rd pins of the R pi. The R
pi camera is attached to the R pi's camera module port.
5.2. Quantitative Analysis with different test case

Optimization techniques are approaches for lowering training losses by changing the properties of
neural networks such as weights and learning rate. As optimization elements were introduced in the
analysis, Fig 13 depicts validity accuracy diagrams in relation to consistency and loss of validity as
contrasted to loss of training. On the one hand, using more hidden layers provides a deeper
analytical model, while on the other hand, each extra layer adds complexity to computing.
In addition, increasing the number of neurons in each layer will increase processing costs. To
enhance the number of data samples, zoom, pre-processing, shear, and other image augmentation
features are frequently used. When these parameters are used, images with these qualities are
generated during deep learning model training. Image samples generated using image
augmentation enhanced the rate of existing data samples by almost 3x to 4x. However, this cannot
be employed because the model will be strongly biased and will fail to generalize properly.

The term epoch refers to the entire set of conceivable inputs. As in the case of calculating model
weights after each epoch, the weights are re-adjusted and tested against the same dataset's
subsequent cycle simulation (called next epoch). When this is run, the entire training data set is
presumed to be in the main memory. Because it is not practical to retain the complete dataset in
main memory at different periods for larger datasets. The epoch (dataset) is partitioned into
batches, and each batch is loaded into the main memory and run in a sequential manner, with the
findings totaled up and finally interpreted as an epoch output.

5.3. Qualitative analysis with different algorithms

The fundamental advantage of CNN over its predecessors would be that it automatically detects
significant features without the need for human interference. As a result, CNN would be an
excellent answer to computer vision and picture categorization challenges. To utilize another
approach, first features from images should be created and then feed those features into a
classification technique such as SVM, KNN, logistic regression, and so on. When compared to
CNN, these algorithms learn less.

5.4. Comparative analysis with existing papers

A review of the literature finds that none of the previously published research attempted to
incorporate all of the aforementioned criteria. Investigated mask detection and social distance
recognition, but this system cannot be implemented on a Raspberry Pi due to the high processing
capacity.  Based on fully convolutional networks, the researchers developed a high-accuracy
technique for detecting facial masks. However, it was not implemented on the Raspberry Pi.
During the training of the CNN model, very satisfactory validation accuracy was obtained through
many experiments and has a recorded accuracy of 99 percent to batch sizes fixed to 32 and 20
iterations for epochs as shown in given below. As indicated in the performance testing results from
visual representation through accuracy and loss.  shows the test results on the performance of the
model in detecting a person wearing a facemask with a rate of 98.55%. The face will be bounded
by the green-colored rectangular box if the mask is detected. displays the test results on the
performance of the model in detecting a person without wearing a facemask with a rate of 100%.
The face will be bounded by red colored rectangular box if the mask is not detected. To check the
temperature measurement system's accuracy and dependability, a mercurial thermometer is used to
measure body temperature which is then compared to the temperature value of the system
measure. shows the results of the experiment. Experiment results show that the absolute
measurement error is less than 0.1 C, which equals the medical body temperature monitor.

Fig. Result for image with mask in green bounding

Fig. Result for image without mask in red bounding box

Equation
Train for 34 steps, validate on 276 samples

Epoch 1/20

Loss: 0.6431 - Accuracy: 0.6676 - Val-loss: 0.3696 – vale-Accuracy: 0.8242

Epoch 2/20

Loss: 0.3507 - Accuracy: 0.8567 - Val-loss: 0.1964 - vale-Accuracy: 0.9375

Epoch 3/20
Loss: 0.2792 - Accuracy: 0.8820 - Val-loss: 0.1383 - vale-Accuracy: 0.9531

Epoch 4/20

Loss: 0.2196 - Accuracy: 0.9148 - Val-loss: 0.1306 - vale-Accuracy: 0.9492

Epoch 5/20

Loss: 0.2006 - Accuracy: 0.9213 - Val-loss: 0.0863 - vale-Accuracy: 0.9688

Epoch 16/20

Loss: 0.0767 - Accuracy: 0.9766 - Val-loss: 0.0291 - vale-Accuracy: 0.9922

Epoch 17/20 loss: 0.1042 - Accuracy: 0.9616 - Val-loss: 0.0243 - vale-Accuracy: 1.0000

Epoch 18/20

Loss: 0.0804 - Accuracy: 0.9672 - Val-loss: 0.0244 - vale-Accuracy: 0.9961

Epoch 19/20

Loss: 0.0836 - Accuracy: 0.9710 - Val-loss: 0.0440 - vale-Accuracy: 0.9883

Epoch 20/20

Loss: 0.0717 - Accuracy: 0.9710 - Val-loss: 0.0270 - vale-Accuracy: 0.9922

Loss/Accuracy
Table. Temperature Measurements compared with mercurial thermometer
Temperature measurement in Experiment temperature in Temperature measurement error
mercurial thermometer (°C) this system (°C) absolute value (°C)

36.8 36.03 0.05

37.2 37.16 0.04

38.0 37.92 0.08

38.5 38..52 0.02

Table. Validation/Accuracy
precision recall f1-score support

With mask 0.99 1.00 0.99 138

Without mask 1.00 0.99 0.99 138

Accuracy 0.99 276

Macro avg 0.99 0.99 0.99 276

Weighted avg 0.99 0.99 0.99 276

Table. Results
IR Count Temperature Check Mask Detection Door Open/Close

Count < 5 Temp < 39.c Mask detected Open

Count > 5 Temp < 39.c Mask detected Close

Count < 5 Temp > 39.c Mask detected Close

Count < 5 Temp < 39.c Mask not detected Close

Count > 5 Temp > 39.c Mask not detected Close


The main purpose of the developed system is to avoid the spread of COVID-19 in public places
such as shopping malls, offices, and so on. The system can monitor an individual's body
temperature and can perform face mask detection. The count of the people inside the room will be
shown when the facemask detector model is loaded. When an individual pass through the IR
sensor, it will proceed to the next level only if the people count inside the room is less than the
defined limit. Then the temperature sensor detects their body temperature, and if it is less than the
set limit, the Pi cam activates and checks if they are wearing a mask. The door automatically opens
if the mask is detected and the count goes up by one; otherwise, the person is not allowed and the
count stays the same. Similarly, if another person passes through the IR sensor, it tests their body
temperature; if they meet all of the requirements, the count increases by one, and they will be
allowed. The count increases until the maximum limit is reached; once the maximum limit is
reached, the door will not open. When some individual moves through the exits, the 2nd IR sensor
senses them, the door opens, and the count is reduced by one. An alert system is integrated into the
system by use of the speak library, a text-to-speech platform that generates a voice notification that
informs a person who is not wearing a facemask if the body temperature is high and if the number
of people exceeds the maximum set limit. 

6. CONCLUSION

Any person will not be provided entry without temperature and mask scan. Only
person having both conditions is instantly allowed inside. The system uses
temperature sensor and camera connected with a raspberry pi system to control
the entire operation.

The camera is used to scan for mask and temperature sensor for forehead and
contacted body temperature. The raspberry processes the sensor inputs and decides
whether the person is to be allowed. In this case the system operates a motor to open
the barrier allowing the person to enter the premises. If a person is flagged by system
for high temperature or no Mask the system glows the red light and bars the person
from entry.
New developments and the availability of smart technologies force to the
creation of new models, which will help meet the needs of developing
countries. In this work, an IoT-enabled smart door is developed to monitor
body temperature and detect face masks that can enhance public safety. This
will help to reduce manpower while also providing an extra layer of
protection against the spread of Covid-19 infection. The model uses a real-
time deep learning system using Raspberry pi to detect face masks, and
temperature detection as well as monitor the count of people present at any
given time. The device performs excellently when it comes to temperature
measurement and mask detection, the trained model was able to achieve a
result of 97 percent. The test results demonstrate a high level of accuracy in
detecting people wearing and not wearing facemasks, as well as it also
generates alarms monitored and recorded. Furthermore, there are numerous
techniques to enhance performance to improve results. Future development
will include improving the accuracy of these steps, using a combination of
various features, and improving performance, as well as producing a mobile
app with a user friendly interface for monitoring. As a result, authorities will
be able to take immediate action following pandemic safety standards.
7. REFERENCE

[1] https://books.google.co.in/books?id=achqDwAAQBAJ book for Neural network and Deep


learning.

[2] https://ietresearch.onlinelibrary.wiley.com/doi/epdf/10.1049/iet-ipr.2020.1119 face mask


detection in covid-19

[3] M. J. Pramila, P. S. Shewta, “Wireless Temperature detector System using ARDUINO and
IOT”, International Journal of Computer Trends and Technology (IJCTT) vol. 67 issue 11, pp. 82-
83, 2019. https://doi.org/10.14445/22312803/IJCTT-V67I11P113

[4] P. Viola, M. Jones, “Rapid Object Detection using a Boosted Cascade of Simple Features”,
2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pp. 511-
518, 2001

[5] https://patents.google.com/patent/US9639740B2/en face detection and recognition.

[6] Coronavirus Update (Live) [online]. Available on:


https://www.worldometers.info/coronavirus/, last accessed: 11/07/2020.

[7] https://www.leewayhertz.com/face-mask-detection-system/ webpage for mask detection.

[8] https://www.okazaki-mfg.com/Tech_info/TemperatureSensorMANUAL2016b.pdf

[9] https://www.farnell.com/datasheets/1682209.pdf datasheet of Arduino Uno.

[10] https://www.mdpi.com/masterthesis.pdf

[11] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7775036/ technical report for face and mask


detection system.

[12] https://www.thermometricscorp.com/rtd-accuracy.html standards in temperature sensors.


A. Rosebrock,"COVID-19: Face Mask Detector with OpenCV, Keras/TensorFlow, and Deep
Learning”, May 4, 2020, https://www.pyimagesearch.com/2020/05/04/covid-19-face-
mask-detector-with-opencv-keras-tensorflow-and-deep-learning/.
A. Hidayat, Subono, V.A. Wardhany, A.S. Nugroho, S. Hakim, M. Jhoswanda, “Designing
IoT-Based Independent Pulse Oximetry Kit as an Early Detection Tool for Covid-19
Symptoms “, 2020 3rd International Conference on Computer and Informatics
Engineering (IC2IE).
Carlo Alberto Boano Matteo Lasagni Kay Romer Tanja Lange. "Accurate Temperature
Measurements for Medical Research using Body Sensor Networks".
Cristina S..........-.C......, B-P BUTUNOI and Calin C......,” IoT Based Intelligent Building
Applications in the Context of COVID-19 Pandemic”
K Baskaran, Baskaran P., N. Kumaratharan, Rajaram V., “IoT Based COVID Preventive
System for Work Environment”, the Fourth International Conference on I-SMAC (IoT in
Social, Mobile, Analytics and Cloud) (I-SMAC) IEEE Xplore.
Lim, M.G., & Chuah, J.H. (2018). Durian Types Recognition Using Deep Learning
Techniques. 2018 9th IEEE Control and System Graduate Research Colloquium (ICSGRC).
ANNEXURE

SOFT WARE CODING

import smtplib,ssl

from time import sleep

import os

import cv2

import time

import argparse

import RPi.GPIO as GPIO

from RPLCD import CharLCD

import numpy as np

from PIL import Image

#from keras.models import model_from_json

from utils.anchor_generator import generate_anchors

from utils.anchor_decode import decode_bbox

from utils.nms import single_class_non_max_suppression

from load_model.tensorflow_loader import load_tf_model, tf_inference

import time

from w1thermsensor import W1ThermSensor

sensor = W1ThermSensor()
sess, graph = load_tf_model('/home/pi/FaceMaskDetection/models/face_mask_detection.pb')

# anchor configuration

feature_map_sizes = [[33, 33], [17, 17], [9, 9], [5, 5], [3, 3]]

anchor_sizes = [[0.04, 0.056], [0.08, 0.11], [0.16, 0.22], [0.32, 0.45], [0.64, 0.72]]

anchor_ratios = [[1, 0.62, 0.42]] * 5

# generate anchors

anchors = generate_anchors(feature_map_sizes, anchor_sizes, anchor_ratios)

# for inference , the batch size is 1, the model output shape is [1, N, 4],

# so we expand dim for anchors to [1, anchor_num, 4]

anchors_exp = np.expand_dims(anchors, axis=0)

id2class = {0: 'Mask', 1: 'NoMask'}

buzzerpin=11

irpin=12

maskstatus="NONE"

detectedperson=0

irpinstatus=0

underprocess=0

gatestatus=1

m11pin=36

m12pin=38

GPIO.setwarnings(False)

GPIO.setmode(GPIO.BOARD)

lcd = CharLCD(cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23],numbering_mode =


GPIO.BOARD)
GPIO.setup(buzzerpin,GPIO.OUT)

GPIO.output(buzzerpin,0)

GPIO.setup(m11pin,GPIO.OUT)

GPIO.setup(m12pin,GPIO.OUT)

GPIO.output(m11pin,0)

GPIO.output(m12pin,0)

GPIO.setup(irpin,GPIO.IN)

lcd.clear()

lcd.cursor_pos = (0, 0)

lcd.write_string(' FACE MASK ')

lcd.cursor_pos = (1, 0)

lcd.write_string('DETECTION SYSTEM')

time.sleep(2)

def inference(image,

conf_thresh=0.5,

iou_thresh=0.4,

target_shape=(160, 160),

draw_result=True,

show_result=True

):

# image = np.copy(image)

output_info = []

height, width, _ = image.shape

image_resized = cv2.resize(image, target_shape)

image_np = image_resized / 255.0


image_exp = np.expand_dims(image_np, axis=0)

y_bboxes_output, y_cls_output = tf_inference(sess, graph, image_exp)

# remove the batch dimension, for batch is always 1 for inference.

y_bboxes = decode_bbox(anchors_exp, y_bboxes_output)[0]

y_cls = y_cls_output[0]

# To speed up, do single class NMS, not multiple classes NMS.

bbox_max_scores = np.max(y_cls, axis=1)

bbox_max_score_classes = np.argmax(y_cls, axis=1)

# keep_idx is the alive bounding box after nms.

keep_idxs = single_class_non_max_suppression(y_bboxes,

bbox_max_scores,

conf_thresh=conf_thresh,

iou_thresh=iou_thresh,

for idx in keep_idxs:

conf = float(bbox_max_scores[idx])

class_id = bbox_max_score_classes[idx]

bbox = y_bboxes[idx]

# clip the coordinate, avoid the value exceed the image boundary.

xmin = max(0, int(bbox[0] * width))

ymin = max(0, int(bbox[1] * height))

xmax = min(int(bbox[2] * width), width)

ymax = min(int(bbox[3] * height), height)

if draw_result:

if class_id == 0:
color = (0, 255, 0)

else:

color = (255, 0, 0)

cv2.rectangle(image, (xmin, ymin), (xmax, ymax), color, 2)

cv2.putText(image, "%s: %.2f" % (id2class[class_id], conf), (xmin + 2, ymin - 2),

cv2.FONT_HERSHEY_SIMPLEX, 0.8, color)

output_info.append([class_id, conf, xmin, ymin, xmax, ymax])

#print(class_id)

global masksendemail

global waittime

global maskstatus

global detectedperson

if class_id==1:

print("------- NO MASK -------")

#lcd.clear()

#lcd.cursor_pos = (0, 0)

#lcd.write_string(' -- NO MASK --')

maskstatus="NO"

detectedperson=1

#GPIO.output(buzzerpin,1)

else:

print("------ MASK DETECTED ----")

#lcd.clear()

#lcd.cursor_pos = (0, 0)

#lcd.write_string('MASK DETECTED')

maskstatus="YES"
detectedperson=1

#GPIO.output(buzzerpin,0)

temperature = sensor.get_temperature()

inttemp = int(temperature)

stringtemp = str(inttemp)

print("The temperature is %s celsius" % inttemp)

if detectedperson==1:

detectedperson=0

lcd.clear()

lcd.cursor_pos = (0, 0)

lcd.write_string('MASK : ')

lcd.write_string(maskstatus)

lcd.cursor_pos = (1, 0)

lcd.write_string('Temp:')

lcd.write_string(stringtemp)

else :

maskstatus="NONE"

lcd.clear()

lcd.cursor_pos = (0, 0)

lcd.write_string('MASK : ')

lcd.write_string(maskstatus)

lcd.cursor_pos = (1, 0)

lcd.write_string('Temp:')

lcd.write_string(stringtemp)

GPIO.output(buzzerpin,0)

irpinstat = GPIO.input(irpin)
print("-- IR STATUS--",irpinstat)

global underprocess

if irpinstat==0:

if underprocess==0:

underprocess=1

print("============= IR DETECTED ==================")

print (" MASK STATUS :", maskstatus)

print (" TEMEPERATURE :", inttemp)

if inttemp > 38 or maskstatus=="NO":

#print("****** ALERT : SENDING IMAGE TO DROP BOX ********")

GPIO.output(buzzerpin,1)

#cv2.imwrite('/home/pi/FaceMaskDetection/nomask.jpeg',cv2.cvtColor(image,cv2.COLOR_RGB2BGR))

#os.system("sudo python3 /home/pi/FaceMaskDetection/dropboxupload.py")

time.sleep(1)

GPIO.output(buzzerpin,0)

else:

if not maskstatus=="NONE":

print(" ++++++++ OPERATING GATE ++++++")

GPIO.output(m11pin,1)

GPIO.output(m12pin,0)

time.sleep(2)

GPIO.output(m11pin,0)

GPIO.output(m12pin,0)

time.sleep(3)

GPIO.output(m11pin,0)

GPIO.output(m12pin,1)

time.sleep(2)
GPIO.output(m11pin,0)

GPIO.output(m12pin,0)

# os.system("python /home/pi/FaceMaskDetection/gopen.py")

# time.sleep(3)

# os.system("python /home/pi/FaceMaskDetection/gclose.py")

print("============================================")

else :

if underprocess==1:

underprocess=0

if show_result:

Image.fromarray(image).show()

return output_info

def run_on_video(video_path, output_video_name, conf_thresh):

cap = cv2.VideoCapture(video_path)

height = cap.get(cv2.CAP_PROP_FRAME_HEIGHT)

width = cap.get(cv2.CAP_PROP_FRAME_WIDTH)

fps = cap.get(cv2.CAP_PROP_FPS)

fourcc = cv2.VideoWriter_fourcc(*'XVID')

# writer = cv2.VideoWriter(output_video_name, fourcc, int(fps), (int(width), int(height)))

total_frames = cap.get(cv2.CAP_PROP_FRAME_COUNT)

if not cap.isOpened():

raise ValueError("Video open failed.")


return

status = True

idx = 0

while status:

start_stamp = time.time()

status, img_raw = cap.read()

img_raw = cv2.cvtColor(img_raw, cv2.COLOR_BGR2RGB)

read_frame_stamp = time.time()

if (status):

inference(img_raw,

conf_thresh,

iou_thresh=0.5,

target_shape=(260, 260),

draw_result=True,

show_result=False)

cv2.imshow('image', img_raw[:, :, ::-1])

cv2.waitKey(1)

inference_stamp = time.time()

# writer.write(img_raw)

write_frame_stamp = time.time()

idx += 1

#print("%d of %d" % (idx, total_frames))

#print("read_frame:%f, infer time:%f, write time:%f" % (read_frame_stamp -


start_stamp,inference_stamp - read_frame_stamp,write_frame_stamp - inference_stamp))

# writer.release()

if __name__ == "__main__":

parser = argparse.ArgumentParser(description="Face Mask Detection")

parser.add_argument('--img-mode', type=int, default=1, help='set 1 to run on image, 0 to run on video.')


parser.add_argument('--img-path', type=str, help='path to your image.')

parser.add_argument('--video-path', type=str, default='0', help='path to your video, `0` means to use


camera.')

# parser.add_argument('--hdf5', type=str, help='keras hdf5 file')

args = parser.parse_args()

if args.img_mode:

imgPath = args.img_path

img = cv2.imread(imgPath)

img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

inference(img, show_result=True, target_shape=(260, 260))

else:

video_path = args.video_path

if args.video_path == '0':

video_path = 0

run_on_video(video_path, '', conf_thresh=0.5)

You might also like