Final Prediction
Final Prediction
Final Prediction
A project report submitted in partial fulfillment of the requirements for the award of the degree of
Submitted by
(122022501056)
Dr. M.Srivenkatesh
Associate Professor
This is to certify that the project report titled ”AUTOMATIC TEMPERATURE DETECTOR
GATE” is bonafide record of the project work done by Tapan Kumar Kadraka,
Reg.No:122022501056 from January 2022 to June 2022 in partial fulfillment of the requirements for
the award of the degree of Master of Computer Applications in the department of Computer Science,
GITAM School of Science, GITAM (Deemed to be University), Visakhapatnam.
I, TAPAN KUMAR KADRAKA here by declare that the results embodied in this
dissertation entitled “AUTOMATIC TEMPERATURE DETECTOR GATE” is an original
work done by me in the partial fulfillment of the requirements for the award of the degree of
Master of Computer Applications in GITAM School of Science, GITAM (Deemed to be
University). I assure you that this work has not been submitted towards any other degree of
diploma in any other colleges or universities
We would like to thank Head of the Department Dr. T Uma Devi Associate Professor,
for having provided the freedom to use all the facilities available in the department at any time.
We sincerely thank all the staff of the Department, for their timely suggestions, healthy
criticism and motivation during the course of our study. With great respect and affection, thank
our parents who were the backbone behind our deeds.
Finally, we express our immense gratitude with pleasure to one and all who have either
directly or indirectly contributed to our need at right time for the development and execution of
project work.
ABSTRCT
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. The allowed temperature, the number of
people allowed in the room as well as the number of people actively present in the room can be
set/viewed using a Bluetooth App.
iiii imk
INDEX
1 INTRODUCTION 1
1.1 INTRODUCTION TO EMBEDDED 2
SYSTEM
1.2 HISTORY 4
1.3 PROPOSE SYSTEM
1.4 EMBEDDED SYSTEM CLASSIFICATION 5
1.5 APPLICATIONS 6
1.6 CHARACTERISTICS 8
2 LITERATURE SURVEY 10
3 SYSTEM DESIGN DOCUMENT 13
3.1 ARDUINO UNO 13
3.2 POWER SUPPLY ADAPTOR 24
3.3 LCD 24
3.4 SERVO MOTER 28
3.5 IR SENSOR 36
3.6 MLX90614 NON-CONTACT IR 44
TEMPERATURE SENSOR
5.2 RESULT 55
7 CODE 58
8 BIBLIOGRAPHY 65
List of Figures Page No.
Fig 3.23:MLX90614 45
x
xi
[Type here]
MCA 1 GITAM
[Type here]
1. INTRODUCTION
At present, the entire world is being cautious of the Covid-19. In order to prevent it's
spreading most of the people and the government have been striving hard to design a system so as
to take care of themselves from spreading. Whenever the person arrives at the office or any other
place, initially the detection of presence of human can be done by the use of PIR sensor. The main
working principle of PIR sensor is based on infrared radiation emitted from the body. The output
of the PIR sensor indicates the presence of a human. And the high disease pace of infections, for
example, the new COVID-19 can be best managed by accomplishing most significant level of
avoidance conceivable. We likewise make use of a basic arrangement depending on infrared
temperature sensor named (MLX90614) which would avoid risk of spread of infection near jam-
packed region like places of business. The ability of a body to radiate energy defined to be the
proportion between radiant energy produced by it and the amount of radiation emitted from a
black body precisely the equivalent temperature. Clinical practice believes dry skinned human as
an ideal black body, having most extreme outflow frequency rounded to 9.3µm. The amount of
energy transmitted from the black body is characterized by the Planck's law and the Stefan
Boltzmann law portrays the unearthly radiant emittance of a specific frequency. Dry skinned
human were found to have an emissivity around 0.98. It introduces an infrared temperature
estimation arrangement adequately modest to be utilized for a huge scope, yet with an exactness
that would empower early location of conceivably tainted individuals.
The aim of the proposed method is to make use of an infrared temperature measurement
solution which is of low cost and can be used by many people which would ensure an accuracy of
probably detecting the infected people in prior. At the public places and at the entrances, people
were allowed to enter after scanning their body temperature. It would be difficult to check
temperature for all the individuals without missing anyone and there might be a chance of being
nearer to the person, which is harmful. Hence, the proposed system could detect the body
temperature and open the doors for those temperature is within a threshold limit there by reducing
human intervention and if it indicates the temperature greater than the threshold there would be a
buzzer/led glow as a sign.
MCA 1 GITAM
[Type here]
An embedded system is a computer system with a dedicated function within a larger, often
with, real-time mechanical or electrical system constraints. It is incorporated as part of a complete
device that often includes hardware and mechanical parts. Integrated systems today control many
commonly used devices. 92% of all microprocessors are produced as embedded system
components.
Modern embedded systems often incorporate microcontrollers (i.e. CPUs with memory or
peripheral interfaces) but common microprocessors are also commonly used (using external
[Type here]
[Type here]
memory chips and peripheral circuitry interfaces), especially in more complex systems. In any
case, the processor or processors can be used typed ranging from general-purpose specialized in
some kind of calculations, or even designed for the application. A common standard of dedicated
processors is the digital signal processor (DSP).
Since the integrated system is dedicated to specific tasks, designers can optimize in order
to reduce the size and cost of the product and increase reliability and performance. Some
embedded systems are serially produced, benefiting from economies of scale.
Integrated systems range from portable devices, such as digital clocks and MP3 players, to
large stationary systems such as traffic lights, factory controllers and large complex systems such
as hybrid vehicles, magnetic resonances, and avionics. The complexity varies from low to high,
with a single microcontroller chip, with the highest number of units, peripherals, and networks
mounted within a large frame or enclosure.
One of the very first recognizably modern embedded systems was the Apollo Guidance
[Type here]
[Type here]
1.2 HISTORY:
Since these early applications in the 1960s, embedded systems have come down in price
and there has been a dramatic rise in processing power and functionality. An
early microprocessor for example, the Intel 4004, was designed for calculators and other small
systems but still required external memory and support chips. In 1978 National Engineering
Manufacturers Association released a "standard" for programmable microcontrollers, including
almost any computer-based controllers, such as single board computers, numerical, and event-
based controllers.
[Type here]
[Type here]
Embedded systems are primarily classified into different types based on complexity of
hardware & software and microcontroller (8 or 16 or 32-bit). Thus, based on the performance of
the microcontroller, embedded systems are classified into three types such as:
Further, based on performance and functional requirements of the system embedded system
classified into four types such as:
[Type here]
[Type here]
1.4 APPLICATIONS:
Consumer electronics include MP3 players, mobile phones, videogame consoles, digital
cameras, GPS receivers, and printers. Household appliances, such as microwave ovens, washing
machines and dishwashers, include embedded systems to provide flexibility, efficiency and
features. Advanced HVAC systems use networked thermostats to more accurately and efficiently
control temperature that can change by time of day and season. Home automation uses wired- and
wireless-networking that can be used to control lights, climate, security, audio/visual, surveillance,
etc., all of which use embedded devices for sensing and controlling.
[Type here]
[Type here]
Medical equipment uses embedded systems for vital signs monitoring, electronic
stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT, and MRI)
for non-invasive internal inspections. Embedded systems within medical equipment are often
powered by industrial computers.
Embedded systems are used in transportation, fire safety, safety and security, medical
applications and life critical systems, as these systems can be isolated from hacking and thus, be
more reliable. For fire safety, the systems can be designed to have greater ability to handle higher
temperatures and continue to operate. In dealing with security, the embedded systems can be self-
sufficient and be able to deal with cut electrical and communication systems.
A new class of miniature wireless devices called motes is networked wireless sensors.
Wireless sensor networking, WSN, makes use of miniaturization made possible by advanced IC
design to couple full wireless subsystems to sophisticated sensors, enabling people and companies
to measure a myriad of things in the physical world and act on this information through IT
monitoring and control systems. These motes are completely self-contained, and will typically run
off a battery source for years before the batteries need to be changed or charged.
Embedded Wi-Fi modules provide a simple means of wirelessly enabling any device
which communicates via a serial port.
[Type here]
[Type here]
1.5 CHARACTERISTICS:
Embedded systems are designed to do some specific task, rather than be a general-purpose
computer for multiple tasks. Some also have real-time performance constraints that must be met,
for reasons such as safety and usability; others may have low or no performance
requirements, allowing the system hardware to be simplified to reduce costs.
Embedded systems are not always standalone devices. Many embedded systems consist of
small parts within a larger device that serves a more general purpose. For example, the Gibson
Robot Guitar features an embedded system for tuning the strings, but the overall purpose of the
Robot Guitar is, of course, to play music. Similarly, an embedded system in
an automobile provides a specific function as a subsystem of the car itself.
The program instructions written for embedded systems are referred to as firmware, and
are stored in read-only memory or flash memory chips. They run with limited computer hardware
resources: little memory, small or non-existent keyboard or screen.
User interface:
Embedded systems range from no user interface at all, in systems dedicated only to one
task, to complex graphical user interfaces that resemble modern computer desktop operating
systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (HD44780
LCD for example) with a simple menu system.
More sophisticated devices which use a graphical screen with touch sensing or screen-edge
buttons provide flexibility while minimizing space used: the meaning of the buttons can change
with the screen, and selection involves the natural behavior of pointing at what is
desired. Handheld systems often have a screen with a "joystick button" for a pointing device.
Some systems provide user interface remotely with the help of a serial (e.g. RS-
232, USB, I²C, etc.) or network (e.g. Ethernet) connection. This approach gives several
advantages: extends the capabilities of embedded system, avoids the cost of a display,
simplifies BSP and allows one to build a rich user interface on the PC. A good example of this is
the combination of an embedded web server running on an embedded device (such as an IP
[Type here]
[Type here]
camera) or a network router. The user interface is displayed in a web browser on a PC connected
to the device, therefore needing no software to be installed.
Embedded processors can be broken into two broad categories. Ordinary microprocessors
(μP) use separate integrated circuits for memory and peripherals. Microcontrollers (μC) have on-
chip peripherals, thus reducing power consumption, size and cost. In contrast to the personal
computer market, many different basic CPU architectures are used, since software is custom-
developed for an application and is not a commodity product installed by the end user. Both Von
Neumann as well as various degrees of Harvard architectures are used. RISC as well as non-RISC
processors are found. Word lengths vary from 4-bit to 64-bits and beyond, although the most
typical remain 8/16-bit. Most architecture comes in a large number of different variants and
shapes, many of which are also manufactured by several different companies.
Numerous microcontrollers have been developed for embedded systems use. General-
purpose microprocessors are also used in embedded systems, but generally require more support
circuitry than microcontrollers.
Peripherals:
Embedded systems talk with the outside world via peripherals, such as:
[Type here]
[Type here]
2. LITERATURE SURVEY
1. Dicky Dwi Putra, Muhammad Miqdad Nadra, Achmad Munir, Wervyan Shalannanda, Elsa
Possibly for COVID-19 Early Prevention at Public Area”, IEEE Xplore 2020.
2. Andrei Vulpe, Ciprian Lupu, Cosmin Mihai, “Research on infrared body temperature
close-systema0cbcf?ref=tag &ref_id=door&offset=0
5. https://learn.adafruit.com/pir-passiveinfrared- proximity-motion-sensor
6. https://www.rfwirelessworld.com/Terminology/ Advantages-and-Disadvantages-ofPIR-
sensor.html
7. https://components101.com/sensors/melexis- mlx90614-contact-less-irtemperature-sensor
8. https://components101.com
"Conversion of Sound Energy into Electrical Energy in Highly Populated Areas," 2021 6th
International Conference on Communication and Electronics Systems (ICCES), 2021, pp. 32-36,
doi:
10.1109/ICCES51350.2021.9489219.
11.T. K. Gannavaram V and R. Bejgam, "Brief Study and Review on the Next Revolutionary
[Type here]
[Type here]
doi:10.1109/ICACITE51222.2021.9404763.
Automobile Safety Technology Development using Vehicular Safety Device (VSD)," 2021 6th
doi: 10.1109/ICICT50816.2021.9358670
Block Diagram:
[Type here]
[Type here]
Hardware Requirements:
Arduino Uno.
Software Requirements:
[Type here]
[Type here]
3. SYSTEM DESIGN
Arduino is a tool for making computers that can sense and control more of the physical
world than your desktop computer. It's an open-source physical computing platform based on a
simple microcontroller board, and a development environment for writing software for the board.
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects
can be stand-alone, or they can be communicating with software running on your computer. The
boards can be assembled by hand or purchased preassembled; the open-source IDE can be
downloaded for free. The Arduino programming language is an implementation of Wiring, a
similar physical computing platform, which is based on the Processing multimedia programming
environment.
Communication:
Microcontrollers depend on a host computer for developing and compiling programs. The
software used on the host computer is known as an integrated development environment, or IDE.
For the Arduino, the development environment is based on the open source Processing platform
(www.processing.org) which is described by its creators as a “programming language and
environment for people who want to program images, animation, and interactions.
The Arduino programming language leverages an open source project known as Wiring
(wiring.org.co). The Arduino language is based on good old- fashioned C. If you are unfamiliar
with this language, on’t worry; it’s not hard to learn, and the Arduino IDE provides some feedback
when you make mistakes in your programs.
[Type here]
[Type here]
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to software
on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver
is needed. However, on Windows, a info file is required. The Arduino software includes a serial
monitor which allows simple textual data to be sent to and from the Arduino board. The RX and
TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and
USB connection to the computer (but not for serial communication on pins 0 and 1).
A Software Serial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
As you go through the list of programming statements available in the Arduino IDE
(choose Help->Reference), you might think there isn’t much power for doing things like running
servos, operating stepper motors, reading potentiometers, or displaying text on an LCD. Like most
any language based on C, the Arduino supports the notion of “libraries” code repositories that
extend core programming functionality. Libraries let you re-use code without having to physically
copy and paste it into all your programs.
[Type here]
[Type here]
Concept of Arduino:
The root of Arduino goes deep down to the development of Processing Language by MIT
researchers. Processing language is an open source language designed to introduce the software
development environment for the artistic people without the need of deep knowledge of
programming of algorithms. Processing is based on java.
In early year of 21st century, designing an electronics gadget was nearly impossible for a
common man. The requirement of specific skill set and hefty prices of software and hardware
created a full stop in the path of their creativity.
[Type here]
[Type here]
The basic difference between the Processing and the Wiring is that the Processing is use to write
the program which can be used on other computers while Wiring program is used on
microcontrollers.
Summary:
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
[Type here]
[Type here]
ATMEL ATMEGA328P:
The ATmega328P chip is used in this project as the microcontroller. The significance of
the first two digits is to stipulate that the AVR core consists of variety of instruction set with 32
general purpose working registers which are connected directly to the Arithmetic Logical Unit
(ALU), tolerating two independent registers to be retrieved in one single instruction executed in
one clock cycle. The subsequent architecture is more programmable efficient while attaining data
transfer rates up to ten times quicker than other CISC microcontrollers. The last digit is to indicate
the 8 bit bi-directional port. It is certainly the head of the system which is controlling the various
modules. The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller
which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to
use on-chip flash memory for program storage, as opposed to one-time programmable ROM,
EPROM, or EEPROM used by other microcontrollers at the time.
The high-performance Atmel pico Power 8-bit AVR RISC-based microcontroller
combines 32KB ISP flash memory with read-while-write capabilities, 1024B EEPROM, 2KB
[Type here]
[Type here]
SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible
timer/counters with compare modes, internal and external interrupts, serial programmable
USART, a byte-oriented 2-wire serial interface, SPI serial port, a 6-channel 10-bit A/D converter
(8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal
oscillator, and five software selectable power saving modes. The device operates between 1.8-5.5
volts. By executing powerful instructions in a single clock cycle, the device achieves throughputs
approaching 1 MIPS per MHz, balancing power consumption and processing speed (Atmel
Corporation).
ARDUINO UNO:
To program the ATmega328P Microcontroller a Serial communicator is required. Serial
communication is most widespread interface between microcontroller and computer. UART is one
of the serial interfaces which are widely used. A Universal Asynchronous Receiver/Transmitter
(UART) is a piece of computer hardware that translates data between parallel and serial forms.
Classically, most serial interface from microcontroller to computer is done through serial port
(DB9). However, since computer serial port used RS232 protocol and microcontroller used TTL
UART, a level shifter is needed between these interfaces. There are several level shifters available
in the market, some of which supports USB plug and play.
But in most of the times the level shifter are unstable to use due to its design and more than
one software is required to convert the programming on C to hex or machine language and maybe
another software to interface between the Microcontroller and computer.
Arduino UNO is an alternative to this solution, the internal board of Arduino consists of all
the necessary ICs for communication. It is also build compact into a PCB which has connectors
for fast and easy prototyping.
[Type here]
[Type here]
PIN CONFIGURATION:
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or
battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the
board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of
the POWER connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If
using more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
[Type here]
[Type here]
VIN: The input voltage to the Arduino board when it's using an external power source (as
Opposed to 5 volts from the USB connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the power jack, access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
GND: Ground pins.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and
select the appropriate power source or enable voltage translators on the outputs for
working with the 5V or 3.3V.
Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of
SRAM and 1 KB of EEPROM.
Each of the 14 digital pins on the Uno can be used as an input or output, using pinMode(),
digital Write( ), and digital Read( ) functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-
50 kohms. In addition, some pins have specialized functions:
Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data.
[Type here]
[Type here]
These pins are connected to the corresponding pins of the ATmega8U2 USB-to- TTL
Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a
low value, a rising or falling edge, or a change in value. See the attach Interrupt () function
for details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write () function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
using the SPI library.
LED: 13. There is a built- in LED connected to digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of
resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it
possible to change the upper end of their range using the AREF pin and the analog Reference()
function. Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analogReference().
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
[Type here]
[Type here]
PIN DISCRIPTION
[Type here]
[Type here]
LCD stands for liquid crystal display. Character and graphical LCD’s are most common
among hobbyist and DIY electronic circuit/project makers. Since their interface serial/parallel pins
are defined so it’s easy to interface them with many microcontrollers. Many products we see in
our daily life have LCD’s with them. They are used to show status of the product or provide
interface for inputting or selecting some process. Washing machine, microwave, air conditioners
and mat cleaners are few examples of products that have character or graphical LCD’s installed in
[Type here]
[Type here]
them. In this tutorial i am going to discuss about the character LCD’s. How they work? Their pin
out and initialization commands etc.
Character LCD’s come in many sizes 8x1, 8x2, 10x2, 16x1, 16x2, 16x4, 20x2, 20x4, 24x2,
30x2, 32x2, 40x2 etc. Many multinational companies like Philips, Hitachi, and Panasonic make
their own custom type of character LCD’s to be used in their products. All character LCD’s
performs the same functions (display characters numbers special characters, asci characters
etc.).Their programming is also same and they all have same 14 pins (0-13) or 16 pins (0 to 15).
In an mxn LCD. M denotes number of coulombs and n represents number of rows. Like if
the LCD is denoted by 16x2 it means it has 16 coulombs and 2 rows. Few examples are given
below. 16x2, 8x1 and 8x2 LCD are shown in the picture below. Note the difference in the rows
and coulombs.
[Type here]
[Type here]
[Type here]
[Type here]
Rs(Register select)
Register select selects the HD44780 controller registers. It switches between Command and data
register.
Command Register
When we send commands to LCD these commands go to Command register and are
processed there. Commands with their full description are given in the picture below. When Rs=0
command register is selected.
Data Register
When we send Data to LCD it goes to data register and is processed there. When Rs=1
data register is selected.
Rw(Read - Write)
Rw pin is used to read and write data to HD44780 data and command registers. When
Rw=1 we can read data from LCD. When Rw=0 we can write to LCD.
En(Enable signal)
[Type here]
[Type here]
When we select the register Rs(Command and Data) and set Rw(read - write) and placed
the raw value on 8-data lines, now it’s time to execute the instruction. By instruction i mean the 8-
bit data or 8-bit command present on Data lines of LCD. For sending the final data/command
present on the data lines we use this enable pin. Usually it remains en=0 and when we want to
execute the instruction we make it high en=1 for some mills seconds. After this we again make it
ground en=0.
[Type here]
[Type here]
Servo motors are rated in kg/cm (kilogram per centimeter) most hobby servo motors are
rated at 3kg/cm or 6kg/cm or 12kg/cm. This kg/cm tells you how much weight your servo motor
can lift at a particular distance. For example: A 6kg/cm Servo motor should be able to lift 6kg if
the load is suspended 1cm away from the motors shaft, the greater the distance the lesser the
weight carrying capacity.
The position of a servo motor is decided by electrical pulse and its circuitry is
placed beside the motor.
Servo Mechanism:
1. Controlled device
2. Output sensor
3. Feedback system
It is a closed loop system where it uses positive feedback system to control motion and
final position of the shaft. Here the device is controlled by a feedback signal generated by
comparing output signal and reference input signal.
Here reference input signal is compared to reference output signal and the third signal is
produces by feedback system. And this third signal acts as input signal to control device. This
signal is present as long as feedback signal is generated or there is difference between reference
[Type here]
[Type here]
input signal and reference output signal. So the main task of servomechanism is to maintain
output of a system at desired value at presence of noises.
Servo motors are classified into different types based on their application, such as AC
servo motor, DC servo motor, brushless DC servo motor, positional rotation, continuous rotation
and linear servo motor etc. Typical servo motors comprise of three wires namely, power control
and ground. The shape and size of these motors depend on their applications. RC servo motor is
the most common type of servo motor used in hobby applications, robotics due to their simplicity,
affordability and reliability of control by microprocessors.
DC Servo Motor:
The motor which is used as a DC servo motor generally have a separate DC source in the
field of winding & armature winding. The control can be archived either by controlling the
armature current or field current. Field control includes some particular advantages over armature
control. In the same way armature control includes some advantages over field control. Based on
the applications the control should be applied to the DC servo motor. DC servo motor provides
very accurate and also fast respond to start or stop command signals due to the low armature
inductive reactance. DC servo motors are used in similar equipment’s and computerized
numerically controlled machines.
[Type here]
[Type here]
AC Servo Motor:
AC servo motor is an AC motor that includes encoder is used with controllers for giving
closed loop control and feedback. This motor can be placed to high accuracy and also controlled
precisely as compulsory for the applications. Frequently these motors have higher designs of
tolerance or better bearings and some simple designs also use higher voltages in order to
accomplish greater torque. motor mainly involve in automation, robotics, CNC machinery, and
other applications a high level of precision and needful versatility.
Positional rotation servo motor is a most common type of servo motor. The shaft’s o/p
rotates in about 180o. It includes physical stops located in the gear mechanism to stop turning
outside these limits to guard the rotation sensor. These common servos involve in radio controlled
water, radio controlled cars, aircraft, robots, toys and many other applications.
Continuous rotation servo motor is quite related to the common positional rotation servo
motor, but it can go in any direction indefinitely. The control signal, rather than set the static
position of the servo, is understood as the speed and direction of rotation. The range of potential
commands sources the servo to rotate clockwise or anticlockwise as preferred, at changing speed,
depending on the command signal. This type of motor is used in a radar dish if you are riding one
on a robot or you can use one as a drive motor on a mobile robot.
[Type here]
[Type here]
Linear servo motor is also similar the positional rotation servo motor is discussed above,
but with an extra gears to alter the o/p from circular to back-and-forth. These servo motors are not
simple to find, but sometimes you can find them at hobby stores where they are used as actuators
in higher model airplanes.
A servo consists of a Motor (DC or AC), a potentiometer, gear assembly and a controlling
circuit. First of all we use gear assembly to reduce RPM and to increase torque of motor. Say at
initial position of servo motor shaft, the position of the potentiometer knob is such that there is no
electrical signal generated at the output port of the potentiometer. Now an electrical signal is
given to another input terminal of the error detector amplifier. Now difference between these two
signals, one comes from potentiometer and another comes from other source, will be processed in
feedback mechanism and output will be provided in term of error signal. This error signal acts as
[Type here]
[Type here]
the input for motor and motor starts rotating. Now motor shaft is connected with potentiometer
and as motor rotates so the potentiometer and it will generate a signal. So as the potentiometer’s
angular position changes, its output feedback signal changes. After sometime the position of
potentiometer reaches at a position that the output of potentiometer is same as external signal
provided. At this condition, there will be no output signal from the amplifier to the motor input as
there is no difference between external applied signal and the signal generated at potentiometer,
and in this situation motor stops rotating.
Servo motor is controlled by PWM (Pulse with Modulation) which is provided by the
control wires. There is a minimum pulse, a maximum pulse and a repetition rate. Servo motor can
turn 90 degree from either direction form its neutral position. The servo motor expects to see a
pulse every 20 milliseconds (ms) and the length of the pulse will determine how far the motor
turns. For example, a 1.5ms pulse will make the motor turn to the 90° position, such as if pulse is
shorter than 1.5ms shaft moves to 0° and if it is longer than 1.5ms than it will turn the servo to
180°.
Servo motor works on PWM (Pulse width modulation) principle, means its angle of
rotation is controlled by the duration of applied pulse to its Control PIN. Basically servo motor is
made up of DC motor which is controlled by a variable resistor (potentiometer) and some
gears. High speed force of DC motor is converted into torque by Gears. We know that WORK=
FORCE X DISTANCE, in DC motor Force is less and distance (speed) is high and in Servo, force
is High and distance is less. Potentiometer is connected to the output shaft of the Servo, to
calculate the angle and stop the DC motor on required angle.
[Type here]
[Type here]
All servo motors work directly with your +5V supply rails but we have to be careful on
the amount of current the motor would consume, if you are planning to use more than two servo
motors a proper servo shield should be designed.
The servo motor is small and efficient, but serious to use in some applications like precise
position control.This motor is controlled by a pulse width modulator signal. The applications of
servo motors mainly involve in computers, robotics, toys, CD/DVD players, etc. These motors are
extensively used in those applications where a particular task is to be done frequently in an exact
manner.
[Type here]
[Type here]
The servo motor is used in robotics to activate movements, giving the arm to its
precise angle.
The Servo motor is used to start, move and stop conveyor belts carrying the
product along with many stages. For instance, product labeling, bottling and
packaging.
The servo motor is built into the camera to correct a lens of the camera to
improve out of focus images.
The servo motor is used in robotic vehicle to control the robot wheels, producing
plenty torque to move, start and stop the vehicle and control its speed.
The servo motor is used in solar tracking system to correct the angle of the panel
so that each solar panel stays to face the sun.
The Servo motor is used in metal forming and cutting machines to provide
specific motion control for milling machines.
The Servo motor is used in Textiles to control spinning and weaving machines,
knitting machines and looms.
The Servo motor is used in automatic door openers to control the door in public
places like supermarkets, hospitals and theatres
[Type here]
[Type here]
3.5 IR Sensor
What is an IR Sensor?
IR sensor is an electronic device that emits the light in order to sense some object of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.
Usually, in the infrared spectrum, all the objects radiate some form of thermal radiation. These
types of radiations are invisible to our eyes, but infrared sensor can detect these radiations.
The emitter is simply an IR LED (Light Emitting Diode) and the detector is simply an IR
photodiode . Photodiode is sensitive to IR light of the same wavelength which is emitted by the IR
LED. When IR light falls on the photodiode, the resistances and the output voltages will change in
proportion to the magnitude of the IR light received.
There are five basic elements used in a typical infrared detection system: an infrared
source, a transmission medium, optical component, infrared detectors or receivers and signal
processing. Infrared lasers and Infrared LED’s of specific wavelength used as infrared sources.
The three main types of media used for infrared transmission are vacuum, atmosphere and
optical fibers. Optical components are used to focus the infrared radiation or to limit the spectral
response.
Types of IR Sensor:
There are two types of IR sensors are available and they are,
[Type here]
[Type here]
Active Infrared Sensor
[Type here]
[Type here]
Passive Infrared Sensor
Active infrared sensors consist of two elements: infrared source and infrared detector.
Infrared sources include the LED or infrared laser diode. Infrared detectors include photodiodes
or phototransistors. The energy emitted by the infrared source is reflected by an object and falls on
the infrared detector.
Passive infrared sensors are basically Infrared detectors. Passive infrared sensors do not use
any infrared source and detector. They are of two types: quantum and thermal. Thermal infrared
sensors use infrared energy as the source of heat. Thermocouples, pyroelectric detectors and
bolometers are the common types of thermal infrared detectors. Quantum type infrared sensors
offer higher detection performance. It is faster than thermal type infrared detectors. The photo
sensitivity of quantum type detectors is wavelength dependent.
There are different types of infrared transmitters depending on their wavelengths, output
power and response time. An IR sensor consists of an IR LED and an IR Photodiode, together they
are called as PhotoCoupler or OptoCoupler.
IR Transmitter or IR LED:
Infrared Transmitter is a light emitting diode (LED) which emits infrared radiations called
as IR LED’s. Even though an IR LED looks like a normal LED, the radiation emitted by it is
invisible to the human eye.
[Type here]
[Type here]
Fig3.14: IR Transmitter
IR Receiver or Photodiode:
Fig:3.15: IR Receiver
Different types of IR receivers exist based on the wavelength, voltage, package, etc. When
used in an infrared transmitter – receiver combination, the wavelength of the receiver should
match with that of the transmitter.
[Type here]
Fig3.16: IR Sensor
When the IR transmitter emits radiation, it reaches the object and some of the radiation reflects
back to the IR receiver. Based on the intensity of the reception by the IR receiver, the output of
the sensor defines.
38
It consists of an IR LED, a photodiode, a potentiometer, an IC Operational amplifier and
an LED. IR LED emits infrared light. The Photodiode detects the infrared light. An IC Op – Amp
is used as a voltage comparator. The potentiometer is used to calibrate the output of the sensor
according to the requirement.
When the light emitted by the IR LED is incident on the photodiode after hitting an object,
the resistance of the photodiode falls down from a huge value. One of the input of the op – amp is
at threshold value set by the potentiometer. The other input to the op-amp is from the photodiode’s
series resistor. When the incident radiation is more on the photodiode, the voltage drop across the
series resistor will be high. In the IC, both the threshold voltage and the voltage across the series
resistor are compared. If the voltage across the resistor series to photodiode is greater than that of
the threshold voltage, the output of the IC Op – Amp is high. As the output of the IC is connected
to an LED, it lightens up. The threshold voltage can be adjusted by adjusting the potentiometer
depending on the environmental conditions.
The positioning of the IR LED and the IR Receiver is an important factor. When the IR
LED is held directly in front of the IR receiver, this setup is called Direct Incidence. In this case,
almost the entire radiation from the IR LED will fall on the IR receiver. Hence there is a line of
sight communication between the infrared transmitter and the receiver. If an object falls in this
line, it obstructs the radiation from reaching the receiver either by reflecting the radiation or
absorbing the radiation
It is universal that black color absorbs the entire radiation incident on it and white color
reflects the entire radiation incident on it. Based on this principle, the second positioning of the
sensor couple can be made. The IR LED and the photodiode are placed side by side. When the IR
transmitter emits infrared radiation, since there is no direct line of contact between the transmitter
and receiver, the emitted radiation must reflect back to the photodiode after hitting any object. The
surface of the object can be divided into two types: reflective surface and non-reflective surface. If
the surface of the object is reflective in nature i.e. it is white or other light color, most of the
39
radiation incident on it will get reflected back and reaches the photodiode. Depending on the
intensity of the radiation reflected back, current flows in the photodiode.
If the surface of the object is non-reflective in nature i.e. it is black or other dark color, it
absorbs almost all the radiation incident on it. As there is no reflected radiation, there is no
radiation incident on the photodiode and the resistance of the photodiode remains higher allowing
no current to flow. This situation is similar to there being no object at all.
The positioning and enclosing of the IR transmitter and Receiver is very important. Both
the transmitter and the receiver must be placed at a certain angle, so that the detection of an object
happens properly. This angle is the directivity of the sensor which is +/- 45 degrees.
40
The directivity is shown below.
In order to avoid reflections from surrounding objects other than the object, both the IR
transmitter and the IR receiver must be enclosed properly. Generally the enclosure is made of
plastic and is painted with black color.
Applications of IR Sensor
IR sensors use in various projects and also in various electronic devices. They all are as
follow,
41
An Infrared technology implemented in night vision equipment if there is not enough
visible light available to see unaided. Night vision devices convert ambient photons of light into
electrons and then amplify them using a chemical and electrical process before finally converting
them back into visible light.
Radiation Thermometers:
IR sensor uses in radiation thermometers to measure the temperature depend upon the
temperature and the material of the object and these thermometers have some of the following
features
Infrared Tracking:
An Infrared tracking or Infrared homing is a missile guidance system which operates using
the infrared electromagnetic radiation emitted from a target to track it.
65
IR Imaging Devices:
IR image device is one of the major applications of IR waves, primarily by virtue of its
property that is not visible. It uses for thermal imagers, night vision devices etc.
Climatology
Meteorology
Photobiomodulation
Flame Monitors
Gas detectors
Water analysis
Moisture Analyzers
Anesthesiology testing
Petroleum exploration
Rail safety
Gas Analyzers
65
3.6 MLX90614 NON-CONTACT IR TEMPERATURE SENSOR:
without even touching the object. This exceptional sensor introduced by Melexis uses IR
technology that uses the IR radiations to measure temperature and provides a digital output signal
through I2C port. Contactless temperature sensors played a major contribution during COVID-19
days to check temperature. In this tutorial, we will discuss pinout details, pin configurations,
sensor.
MLX90614 is IR based contactless temperature sensor that can measure the temperature of
a particular object between -70°C – 382.2°C and an ambient temperature of -40°C – 125°C
without even making physical contact with an object under observation. It is embedded with
an I2C port to communicate temperature reading to microcontrollers over an I2C bus. On top of
The tiny device is highly accurate and precise due to its powerful ADC. A 17-bit ADC is
embedded in the module to output the values with 0.14 ˚C of resolution. Melexis has introduced
different versions of this sensor based on input voltage requirements i.e., 3 Volts or 5volts and
resolving power for different project requirements. But MLX90614 is a sensitive temperature
MLX90614 Pinout:
This temperature sensor module comes with a 3.3 voltage regulator, I2C Bus with internal
pullup resistors to define a default state and a capacitor for noise filtering. The pinout of the non-
65
Fig 3.23 MLX90614
Pin Configuration:
MLX90614 has two versions and is available in the TO-39 package. The pin configuration
details are listed in a table below:
65
ADC Resolution: 17 bits
IR sensor is integrated with an optical filter, a DSP, and a low noise amplifier
for fine output digital signals.
Adaptable for 8-16 Volts applications and can be integrated easily.
Supports power-saving mode and is available in single and dual versions
It is a power-efficient and highly sensitive sensor.
Take a look at the datasheet to see further technical of different versions of this IR sensor.
MLX90614 is a contactless IR temperature sensor that works on the Stefan Boltzmann principle. It
states that everybody radiates IR radiation proportional to its temperature. This radiation is then
measured through the sensor converted to a digital signal and is communicated through the I2C
bus to the microcontroller.
The IR sensor module consists of an IR thermopile detector and a signal ASSP processing unit.
Thermopile serves the function of collecting the radiation in its field view which varies from
version to version. The processing units convert these analog signals to filtered amplified signals.
65
3.7 REFERANCE:
Bartik, A.W.; Bertrand, M.; Cullen, Z.; Glaeser, E.L.; Luca, M.; Stanton, C. The Impact
of COVID-19 on small business outcomes and expectations. Proc. Natl. Acad. Sci. USA
2020, 117, 17656–17666, doi:10.1073/pnas.2006991117.
[1]. A Hefty Price Tag for Small Businesses Complying with NSW Health COVID-19
Restrictions. ABC News: Mridula Amin, 17 August 2020.
[2]. Pang, Z. Technologies and architectures of the Internet-of-Things (IoT) for health and
well-being. Ph.D. Thesis, KTH Royal Institute of Technology, Stockholm, Sweden,
January 2013.
[3]. Kumar, K.; Kumar, N.; Shah, R. Role of IoT to avoid spreading of COVID-19. Int. J.
Intell. Netw. 2020, 1, 32–35, doi:10.1016/j.ijin.2020.05.002.
[4]. Safework Australia. Available online:
https://www.safeworkaustralia.gov.au/sites/default/files/2020-06/COVID-19_Workplace-
Checklist_12June2020.pdf (accessed on 16 October 2020).
[6]. Otoom, M.; Otoum, N.; Alzubaidi, M.A.; Etoom, Y.; Banihani, R. An IoT-for early
identification and monitoring of COVID-19 cases. Biomed. Signal Process. Control 2020, 62,
102149, doi:10.1016/j.bspc.2020.102149.
65
4. OBJECT DESIGN DOCUMENT
Arduino is a tool for making computers that can sense and control more of the physical
world than your desktop computer. It's an open-source physical computing platform based on a
simple microcontroller board, and a development environment for writing software for the board.
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects
can be stand-alone, or they can be communicating with software running on your computer. The
boards can be assembled by hand or purchased preassembled; the open-source IDE can be
downloaded for free. The Arduino programming language is an implementation of Wiring, a
similar physical computing platform, which is based on the Processing multimedia programming
environment.
Arduino is an open source electronics platform accompanied with a hardware and software
to design, develop and test complex electronics prototypes and products. The hardware consists of
65
a microcontroller with other electronic components which can be programmed using the software
to do almost any task. The simplicity of the Arduino language makes it very easy for almost
everyone who has an interest in electronics to write programs without the understanding of
complex algorithms or codes.
Arduino is intended for an artist, tinker, designer or anyone, interested in playing with
electronics without the knowhow of complex electronics and programming skills. Arduino is an
excellent designed open source platform. It has specially designed boards which can be
programmed using the Arduino Programming Language (APL).
65
Procedure
As shown in the circuit diagram place the components in the respective place and IR
sensors carefully.
As IR sensors is done make sure the circuit board are not shorted
Anywhere.
4.3 PRECAUTIONS:
Locations subject to dust or corrosive gases (in particular, sulfide gas and ammonia
gas)
2. Use and store the Temperature Controller within the rated temperature or humidity range
specified for each model. When two or more Temperature Controllers are mounted
horizontally close to each other or vertically next to one another, the internal temperature
will increase due to the heat they radiate and the service life of the products will decrease.
65
In such cases, forced cooling by fans or other means of air ventilation will be required to
cool down the Temperature Controllers.
3. Allow enough space around the Temperature Controller to ensure proper heat dissipation.
Do no block the ventilating holes.
5. After wiring is completed, do not pull on or bend a terminal block lead wire with a force of
30 N or higher.
65
5 .TESTING AND DEBUGING
The source code for the IDE isreleased under the GNU General Public License, version
2. The Arduino IDE supports the languages C and C++ using special rules of codestructuring. The
Arduino IDE supplies a software library from the Wiring project,which provides many common
input and output procedures. User-written code onlyrequires two basic functions, for starting the
sketch and the main program loop, that arecompiled and linked with a program. The Arduino IDE
employs the program toconvertthe executable code into a text file in hexadecimal encoding that is
loaded intothe Arduino board by a loader program in the board's firmware.
65
The Arduino integrated development environment (IDE) is a cross-platform application written in
Java, and is derived from the IDE for the Processing programming language and the Wiring
projects. It includes a code editor which is capable of compiling and uploading programs to the
board with a single click. A program or code written for Arduino is called a "sketch”.
Arduino programs are written in C or C++. The Arduino IDE comes with a software library called
"Wiring" from the original Wiring project, which makes many common input/output operations
much efficient. Users only need define two functions to make a runnable cyclic executive
program:
setup(): a function run once at the start of a program that can initialize settings
65
2. Select the COM Port from tools
65
4. Write the sketch in Arduino IDE
65
5.2 RESULT
65
6. CONCLUSION
65
BIBLIOGRAPHY
Bartik, A.W.; Bertrand, M.; Cullen, Z.; Glaeser, E.L.; Luca, M.; Stanton, C. The Impact of
COVID-19 on small business outcomes and expectations. Proc. Natl. Acad. Sci. USA 2020, 117,
17656–17666, doi:10.1073/pnas.2006991117.
[1]. A Hefty Price Tag for Small Businesses Complying with NSW Health COVID-19
Restrictions. ABC News: Mridula Amin, 17 August 2020.
[2]. Pang, Z. Technologies and architectures of the Internet-of-Things (IoT) for health and
well-being. Ph.D. Thesis, KTH Royal Institute of Technology, Stockholm, Sweden,
January 2013.
[3]. Kumar, K.; Kumar, N.; Shah, R. Role of IoT to avoid spreading of COVID-19. Int. J.
Intell. Netw. 2020, 1, 32–35, doi:10.1016/j.ijin.2020.05.002.
[4]. Safework Australia. Available online:
https://www.safeworkaustralia.gov.au/sites/default/files/2020-06/COVID-19_Workplace-
Checklist_12June2020.pdf (accessed on 16 October 2020).
[6]. Otoom, M.; Otoum, N.; Alzubaidi, M.A.; Etoom, Y.; Banihani, R. An IoT-for early
identification and monitoring of COVID-19 cases. Biomed. Signal Process. Control 2020, 62,
102149, doi:10.1016/j.bspc.2020.102149.
65
CODE
PROGRAM:
#include <Wire.h>
#include <Adafruit_MLX90614.h>
#include <LiquidCrystal_I2C.h>
#include <Servo.h>
Servo myservo1;
int i = 0, j = 0, tot;
int count = 0;
MCA 58 GITAM
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.clear();
myservo1.attach(10);
myservo1.write(pos1);
pinMode(ir1, INPUT_PULLUP);
pinMode(ir2, INPUT_PULLUP);
mlx.begin();
lcd.print("AUTO TEMPERATURE");
lcd.setCursor(0, 1);
delay(1000);
lcd.clear();
lcd.print("ARDUINO INFRARED");
lcd.setCursor(0, 1);
delay(1000);
lcd.clear();
59
lcd.print("BY ECE");
lcd.setCursor(6, 1);
lcd.print(" STUDENTS");
delay(1500);
void loop() {
count++;
lcd.clear();
lcd.print("Reading");
lcd.setCursor(0, 1);
lcd.print("Please wait...");
delay(2000);
lcd.clear();
lcd.print("BODY TEMPERATURE");
lcd.setCursor(0, 1);
lcd.print(mlx.readObjectTempF());
60
lcd.print("");
lcd.write(0xDF);
lcd.print("F");
delay(1000);
lcd.clear();
lcd.print("BODY DETECTED");
lcd.setCursor(0, 1);
lcd.print("HIGH TEMPERATURE");
myservo1.write(90);
delay(1000);
else
lcd.clear();
lcd.print("BODY TEMPERATURE");
lcd.print(count);
lcd.setCursor(0, 1);
61
delay(1000);
myservo1.write(90);
delay(2000);
myservo1.write(180);
delay(1000);
i = i + 1;
j = j + 1;
myservo1.write(90);
delay(2000);
myservo1.write(180);
delay(1000);
if (j > i)
62
j = j - 1;
tot = i - j;
delay(500);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("Strength: ");
lcd.print(tot);
delay(1000);
else
lcd.clear();
lcd.print("Present Strength");
lcd.setCursor(0, 1);
63
lcd.print(tot);
delay(500);
64