PROJ Temp & Mask Bhanu
PROJ Temp & Mask Bhanu
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
Submitted in partial fulfilment for the award of Degree in Master of Technology (MTech) in
Department of Instrument Technology, during academic year 2020-21.
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.
Thus the system provides a 100% automated system to prevent the spread of COVID
.
1. INTRODUCTION
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.
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.
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.
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.
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:
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.
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.
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:
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.
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.
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.
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.
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:
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].
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
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.
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.
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.
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.
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.
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.
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.
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”.
Supported interface:USB
override.
Imaging features: fixed focus and automatic image adjustment with manual
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
Applications
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
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.
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
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
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).
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.
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.
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.
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.
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.
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:
l = length of wire
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 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 Headphones, earphones or speakers with a 3.5mm jack will work with your Raspberry
Pi.
RASPBERRY PI
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.
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.
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.
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:
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
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
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.
Note that the actual filename will be different – you will have to check the name and adjust according
4. Methodology
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.
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
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.
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.
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.
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.
Equation
Train for 34 steps, validate on 276 samples
Epoch 1/20
Epoch 2/20
Epoch 3/20
Loss: 0.2792 - Accuracy: 0.8820 - Val-loss: 0.1383 - vale-Accuracy: 0.9531
Epoch 4/20
Epoch 5/20
Epoch 16/20
Epoch 17/20 loss: 0.1042 - Accuracy: 0.9616 - Val-loss: 0.0243 - vale-Accuracy: 1.0000
Epoch 18/20
Epoch 19/20
Epoch 20/20
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)
Table. Validation/Accuracy
precision recall f1-score support
Table. Results
IR Count Temperature Check Mask Detection Door Open/Close
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
[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
[8] https://www.okazaki-mfg.com/Tech_info/TemperatureSensorMANUAL2016b.pdf
[10] https://www.mdpi.com/masterthesis.pdf
import smtplib,ssl
import os
import cv2
import time
import argparse
import numpy as np
import time
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]]
# generate anchors
# for inference , the batch size is 1, the model output shape is [1, N, 4],
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)
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.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 = []
y_cls = y_cls_output[0]
keep_idxs = single_class_non_max_suppression(y_bboxes,
bbox_max_scores,
conf_thresh=conf_thresh,
iou_thresh=iou_thresh,
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.
if draw_result:
if class_id == 0:
color = (0, 255, 0)
else:
color = (255, 0, 0)
#print(class_id)
global masksendemail
global waittime
global maskstatus
global detectedperson
if class_id==1:
#lcd.clear()
#lcd.cursor_pos = (0, 0)
maskstatus="NO"
detectedperson=1
#GPIO.output(buzzerpin,1)
else:
#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)
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
GPIO.output(buzzerpin,1)
#cv2.imwrite('/home/pi/FaceMaskDetection/nomask.jpeg',cv2.cvtColor(image,cv2.COLOR_RGB2BGR))
time.sleep(1)
GPIO.output(buzzerpin,0)
else:
if not maskstatus=="NONE":
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
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')
total_frames = cap.get(cv2.CAP_PROP_FRAME_COUNT)
if not cap.isOpened():
status = True
idx = 0
while status:
start_stamp = time.time()
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.waitKey(1)
inference_stamp = time.time()
# writer.write(img_raw)
write_frame_stamp = time.time()
idx += 1
# writer.release()
if __name__ == "__main__":
args = parser.parse_args()
if args.img_mode:
imgPath = args.img_path
img = cv2.imread(imgPath)
else:
video_path = args.video_path
if args.video_path == '0':
video_path = 0