Вы находитесь на странице: 1из 38

B.

Tech, VIth semester,


Electrical Engineering Department,
Delhi Technological University.

Arduino based Thermal Flashlight


using IR sensor

By:
MD Perwez Alam, 2K12/EE/079
Mohit Jain, 2K12/EE/084
Nitish Kumar, 2K12/EE/095

ABSTRACT

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Ever since the invention of thermometer, various techniques have been developed and used to
measure temperature of solid, liquid and gaseous matters. But none of these techniques could
measure the temperature accurately from a remote place, which sometimes becomes a necessity
particularly when the object under testis in a dangerous or inaccessible area. Also, the
conventional methods of measuring temperature like a mercury thermometer are not only
dangerous to use, but also are hazardous to the environment. So an alternate means using modern
electronics technology of measuring and sensing the temperature variations is desired. Presented
here is a remote sensing infrared thermometer to measure the temperature without contact and
display it on a LCD screen.
The temperature of the object under test is sensed by an infrared temperature sensor
(MLX90614) designed for non-contact temperature sensing, which sends the
temperature value over to the microcontroller (Arduino UNO) which is then
displayed in degrees Celsius at the LCD display. The sensor detects the total
energy in the infrared radiation from object over a wide angle, and this
energy gives the temperature of the object.
The IR sensor, which is a digital sensor with its own microcontroller on board, provides two
temperature readings: A) the sensors own (body) temperature and B) the object-in-sight
temperature, measured using infra-red. It can measure from -70C to 380of the object
temperature. In a properly calibrated system, one can measure temperatures of the surroundings
or an object up to high accuracy of 0.5 degrees. Also, a combination of RGB leds indicate the
temperature ranges of the surroundings.

Page | 1

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task would be
incomplete without the mentioning of the people whose constant guidance and encouragement
made it possible. We take pleasure in presenting before you, our project, which is result of
studied blend of both research and knowledge. We express our earnest gratitude to our internal
guide and mentor, Assistant Professor Dr. M. M Tripathi Department of EE for his constant
support, encouragement and guidance. We are grateful for his cooperation and his valuable
suggestions. Also, we are thankful to those physicists and engineers who envisioned, designed
and developed these tools for us to use and apply. Lastly we are thankful to the almighty god and
our parents for their constant support, blessings and wishes.

MD Perwez Alam, 2K12/EE/079


Mohit Jain, 2K12/EE/084
Nitish Kumar, 2K12/EE/095

CERTIFICATE
Page | 2

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

This is to certify that the Project titled REMOTE SENSING THERMOMETER submitted
by MD Perwez Alam, Mohit Jain & Nitish Kumar in partial fulfillment of the course work
requirement for B.Tech. Program in the Department of ELECTRICAL & ELECTRONICS
Engineering, DELHI TECHNOLOGICAL UNIVERSITY, has been completed by them
under my guidance and supervision. This Project Report has been found quite satisfactory.

Project Mentor
Dr. M.M Tripathi
Asst. Professor
Department of EE
Delhi Technological University

CONTENTS:
1. Introduction
1.1
Page | 3

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

1.2 Literature survey


1.2.1

Analysis and synthesis of Remote Sensing of Environment Temperature

1.2.2
1.2.3

Analysis and synthesis of Remote Sensing Device


Infrared Thermometers

2. Components
2.1 Arduino Microcontroller
2.2 Lcd display with potentiometer
2.3 MLX90614 IR sensor
2.4 Resistor, Capacitor
2.5 Leds
3. Project Description
3.1 Introduction to the system
3.2 Components used
3.3 Circuit Diagram
4. Results and discussion
5. Conclusion.
6. References
7. Appendix

1.1 About the Project

Thermal flashlight is a speculative object, which enables the user to read the surface
temperature of an object by pointing flashlight at it. Using this one can easily recognize
the target temperature by looking at the LCDs.
Page | 4

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

It expands our daily perceptions and experiences in an intuitive way.

It comprises of super bright tri color LEDs, an ARDUINO, IR thermometer.

This uses state of the art ARM cortex M4 processor for simple interfacing of RGB leds
and concepts like display LCD, and programming the arduino.

Fig 1.1 Arduino based Thermal Flashlight

1.2 LITERATURE SURVEY


1.2.1 Literature survey 1.
Analysis and synthesis of Remote Sensing of Environment Temperature
Department of Geography, University of Western Ontario, London, ON, Canada N6A 5C2

Page | 5

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Date of Conference: 15 Aug 2003


Author(s): J.A Voogt and T.R Oke
Volume: 86, Issue 3
Page(s):370-384
Product Type: Conference Publications
Abstract

[1]

Thermal remote sensing has been used over urban areas to assess the urban heat island, to
perform land cover classifications and as input for models of urban surface atmosphere
exchange. Here, we review the use of thermal remote sensing in the study of urban climates,
focusing primarily on the urban heat island effect and progress made towards answering the
methodological questions posed by Roth et al. [International Journal of Remote Sensing 10
(1989) 1699]. The review demonstrates that while some progress has been made, the thermal
remote sensing of urban areas has been slow to advance beyond qualitative description of
thermal patterns and simple correlations. Advances in the application of thermal remote sensing
to natural and agricultural surfaces suggest insight into possible methods to advance techniques
and capabilities over urban areas. Improvements in the spatial and spectral resolution of current
and next-generation satellite-based sensors, in more detailed surface representations of urban
surfaces and in the availability of low cost, high resolution portable thermal scanners are
expected to allow progress in the application of urban thermal remote sensing to the study of the
climate of urban areas.

1.2.2 Literature survey 2.


Analysis and synthesis of Remote Sensing Device
California Air Resources Board, Haagen-Smit Laboratory 9528 Telstar Avenue
El Monte, CA 91734
Date of Conference: 26 Aug 2004
Author(s): Tom Austin, Sierra Research,
Page | 6

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Andrew D. Burnette, Eastern Research Group, Inc.


Rob Klausmeier de la Torre Consulting, Inc.
ERG No: 187.00.002.001
Product Type: Conference Publications
Abstract

[2]

This report is intended to fulfil one objective of the Pilot Remote Sensing Study, specifically, to
provide an organized synthesis and critical assessment of previous and current studies on
relevant remote sensing programs. The information obtained from this task would be used to
define research gaps, establish the need for further studies, and resolve controversies, if any. If
possible, research gaps, controversies, etc. would be resolved by performing the rest of the Pilot
Remote Sensing Study.
Remote sensing measurements can be used to identify some of the vehicles with excessive
tailpipe emissions that should receive a Smog Check in the near future. Since whether a vehicle
can be classified as a high emitter or not depends upon the standards it was designed to meet, a
high emitter manufactured recently may actually emit much less than an older high emitter.
Below certain emission levels, RSDs ability to distinguish between a normal emitter and a
high emitter is greatly diminished, so newer vehicles may be difficult for RSD to identify as
being high emitters.

1.2.3 Literature survey 3


Infrared Thermometers
HEALTH TECHNOLOGY ASSESSMENT SECTION, MEDICAL DEVELOPMENT
DIVISION, MINISTRY OF HEALTH MALAYSIA
012/2012
Prepared by
Page | 7

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Madam Sin Lian Thye


Dr. Junainah Sabirin

Abstract:

[3]

Evaluation of body temperature is one of the oldest known diagnostic methods and is still an
important sign of health and disease, both in everyday life and in medical care. Accurate
Temperature measurement is critically important, particularly in neonates and immune
compromised children whom suspicion of infection could result in investigations, treatment and
even hospitalization. Consequently, inaccurate temperature measurement may result in
Patients remain undiagnosed and untreated, or receiving unnecessary or inappropriate
intervention. In health centres and hospitals, nurses are responsible for measuring body
temperature accurately and it is important to take into account the kind of thermometer and the
sites of the body used for taking the measurement Mercury in glass thermometer was the
traditional type of thermometer used to measure body temperature. However, mercury
thermometers are gradually being phased out. This is because of concerns regarding the
Toxic environmental effect of mercury, namely toxicity from the absorption due to breakage and
risk of infection. In recent years, infrared thermometers have been more frequently used. This
type of thermometer determines the temperature of infrared emission from a source rather than
absorbing heat from the tissue and reaching thermal equilibrium with it. Temperatures can
typically be obtained in less than five seconds. Most thermometers of this type measure
temperature at the ear drum (infrared tympanic thermometers)

Chapter 2. COMPONENTS

2.1 ARDUINO UNO


The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
Page | 8

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a
USB-to-serial converter.
Arduino is a family of single-board microcontrollers, intended to make it easier to build
interactive objects or environments. The hardware consists of an open-source hardware board
designed around an 8-bit Atmel AVR microcontroller or a 32-bit Atmel ARM. Current models
feature a USB interface together with six analog input pins and 14 digital I/O pins that can
accommodate various extension boards.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest
in a series of USB Arduino boards, and the reference model for the Arduino platform; for a
comparison with previous versions, see the index of Arduino boards.

The Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put
into DFU mode. 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two
other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the
voltage provided from the board. In future, shields will be compatible with both the board that
uses the AVR, which operates with 5V and with the Arduino Due that operates with 3.3V.

The specialty of using Arduino as a microcontroller is its open source hardware and digital and
analog pins provided with PWM operation. The software is easy to use with a vast library of
predefined functions. An Arduino's microcontroller is also pre-programmed with a boot loader
that simplifies uploading of programs to the on-chip flash memory, compared with other devices
that typically need an external programmer. This makes using an Arduino more straightforward
by allowing the use of an ordinary computer as the programmer.

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

Page | 9

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

DC Current per I/O Pin 40 mA


DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Table 2.1: Operating Characteristics of Arduino Uno

Fig. 2.1.1 Interfacing of arduino with lcd screen.

2.2 LCD
Liquid Crystal Display, LCDs are now commonly used as display devices. The alphanumeric
LCD display with a simple interface that could be connected to a general purpose
microcontroller or microprocessor, comes in variety of formats, like 16X2, 20X4 etc., based on
their screen characteristics.

Page | 10

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

LCD displays utilize two sheets of polarizing material with a liquid crystal solution
between them. An electric current passed through the liquid causes the crystals to align so that
light cannot pass through them. Each crystal, therefore, is like a shutter, either allowing light to
pass through or blocking the light.
Monochrome LCD images usually appear as blue or dark gray images on top of a grayishwhite background. Color LCD displays use two basic techniques for producing color: Passive
matrix is the less expensive of the two technologies. The other technology, called thin film
transistor (TFT) or active-matrix, produces color images that are as sharp as
traditional CRT displays, but the technology is expensive. Recent passive-matrix displays using
new CSTN and DSTN technologies produce sharp colors rivaling active-matrix displays.

Character LCDs, like the one used here, use a standard 16 contact interface, commonly using
pins or card edge connections on 0.1 inch / 2.54 mm centers. Those without backlights may have
only 14 pins, omitting the final two pins powering the light.

Fig. 3.

2.1 Amber backlight on a LCD display

The pin out for a 16 pin 16X2 LCD display is as follows:


1. Ground

Page | 11

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

2. VCC (+3.3 to +5V)


3. Contrast adjustment (VO)
4. Register Select (RS). RS=0: Command, RS=1: Data
5. Read/Write (R/W). R/W=0: Write, R/W=1: Read (This pin is optional due to the fact that
most of the time you will only want to write to it and not read. Therefore, in general use,
this pin will be permanently connected directly to ground.)
6. Clock (Enable). Falling edge triggered
7. Bit 0 (Not used in 4-bit operation)
8. Bit 1 (Not used in 4-bit operation)
9. Bit 2 (Not used in 4-bit operation)
10.Bit 3 (Not used in 4-bit operation)
11.Bit 4
12.Bit 5
13.Bit 6
14.Bit 7
15.Backlight Anode (+) (If applicable)
16.Backlight Cathode (-) (If applicable)
The nominal operating voltage for LED backlights is 5V at full brightness, with dimming at
lower voltages dependent on the details such as LED color. Non-LED backlights often require
higher voltages.
The Data pins are connected to the digital pins of the Arduino for output signals. Also,register
select and enable pins are connected to the microcontroller. COntrastadjustment is done using a
potentiometer connected to the LCD. Backlight anode and cathodepins provide the backlight
options. The read/write pin is generally grounded as in the system, the display is only used for
write options.

Page | 12

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Display LCD using Arduino.


LiquidCrystal - display() and noDisplay()
The Liquid Crystal Library in Arduino uno allows to control LCD displays that are compatible
with the Hitachi HD44780 driver.
This example sketch shows how to use the display() and noDisplay() methods to turn on and off
the display. The text to be displayed will still be preserved when you use noDisplay() so it's a
quick way to blank the display without losing everything on it.
Hardware Required

Arduino Board

LCD Screen (compatible with Hitachi HD44780 driver)

pin headers to solder to the LCD display pins

10k Potentiometer

breadboard

hook-up wire
Circuit
Before wiring the LCD screen to your Arduino we suggest to solder a pin header strip to the 14
(or 16) pin count connector of the LCD screen, as you can see in the image above.
To wire your LCD screen to your Arduino, connect the following pins:

LCD RS pin to digital pin 12

Page | 13

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

LCD Enable pin to digital pin 11

LCD D4 pin to digital pin 5

LCD D5 pin to digital pin 4

LCD D6 pin to digital pin 3

LCD D7 pin to digital pin 2


Additionally, wire a 10K pot to +5V and GND, with it's wiper (output) to LCD screen's VO pin
(pin3).
The display in a Lcd screen and its contrast is controlled by using a potentiometer which controls
the voltage input to the display, which is explained in the following text.

2.2.2 POTENTIOMETER
A potentiometer, informally a pot, is a three-terminal resistor with a sliding or rotating contact
that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, it
acts as a variable resistor or rheostat.
A potentiometer measuring instrument is essentially a voltage divider used for measuring electric
potential (voltage); the component is an implementation of the same principle, hence its name.
Potentiometers are commonly used to control electrical devices such as volume controls on audio
equipment. Potentiometers operated by a mechanism can be used as position transducers, for
example, in a joystick. Potentiometers are rarely used to directly control significant power (more
than a watt), since the power dissipated in the potentiometer would be comparable to the power
in the controlled load.

Page | 14

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Here in the system, potentiometer is used to control the voltage to the lcd display so as to control
the Contrast of the font displayed. Turning the potentiometer increases/decreases the voltage and
hence the contrast.

Fig.2.2.2 LCD connected through the potentiometer to the microcontroller.

PIN DIAGRAM OF THE CONTROLLER.

Page | 15

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

F
Fig. 2.2.3 Pin Diagram of the Controller

2.3 MLX90614 IR SENSOR

MLX90614 I2C Infrared Thermometer


The Melexis MLX90614 is an infrared thermometer designed for non-contact temperature
sensing. It contains an internal 17-bit ADC and a custom DSP chip to achieve high accuracy and
resolution. It has an I2C or PWM interface and will operate off of 3.3V. IR thermometers
measure the IR surface temperature of an object. The distance to the object does not change the
temperature reading as long as the object fills the sensors field of view (beam width). IR
Page | 16

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

temperature readings can vary depending on the emissivity of the target. Metals such as
aluminum have low emissivity and will tend to read lower IR temperatures. Calculations to
compensate the temperature for lower emissivity can be used, if you know the emissivity of the
surface you are measuring.

Fig 2.3.1 IR sensor MLX90614


There are quite a number of different version of this device with voltages of 5 or 3V, beam width
ranging from 90 to 5 degrees, accuracy ratings from .5 C to .1 C, and update rates ranging from .
1 to 1.3 seconds. The narrow beam width devices cost more. The application note Understanding
MLX90614 on-chip digital signal filters explains the tradeoffs in accuracy and update rates using
the on-chip DSP filters. One of the more interesting and expensive ones (about the price of an
mbed) with a narrow five degree beam width or field of view (FOV) is shown below.
It is also available on some older breakout boards and evaluation boards, but the sensor can be
directly interfaced to mbed. The wire leads are a bit problematic for a breadboard. They would
need to be bent quite a bit to fit and that is probably not the best idea on an expensive sensor. A
socket could be used for the 4-pin TO-39 case if one was available on a breakout board. One
easy solution is to use four M/F stranded breadboard jumper wires like the ones shown below
from Sparkfun. The sensor leads are a bit too small for the jumper, but after assembly a light
crimp at the opening where the silver socket pin shows through the black jumper cover with
needle nose pliers works well to hold it firmly in place. This also allows for movement of the
sensor and is handy if it is ever mounted on a servo.

Page | 17

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Fig 2.3.2 M/F jumper wires can be used to attach the sensor to a breadboard.

Wiring
Mbed

MLX90614

Pullups

Gnd

VSS - gnd

Vout

VDD - 3.3V

p27

SCL - I2C clock

4.7K

p28

SDA - I2C data

4.7K

Table 2.3 Pinouts of the IR sensor

Fig.2.3.3 the 4 pins

Page | 18

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

2.4.1

RESISTOR

Introduction
A resistor is a passive two-terminal electrical component that implements electrical resistance as
a circuit element

Fig.2.4.1 Resistors
The current through a resistor is in direct proportion to the voltage across the resistor's terminals.
This relationship is represented by Ohm's law:
(EQN 1)
Where I is the current through the conductor in units of amperes, V is the potential difference
measured across the conductor in units of volts, and R is the resistance of the conductor in units
of ohms. The ratio of the voltage applied across a resistor's terminals to the intensity of current in
the circuit is called its resistance, and this can be assumed to be a constant (independent of the
voltage) for ordinary resistors working within their ratings.
Practical resistors have a series inductance and a small parallel capacitance; these specifications
can be important in high-frequency applications. In a low-noise amplifier or pre-amp, the noise
characteristics of a resistor may be an issue. The unwanted inductance, excess noise, and
temperature coefficient are mainly dependent on the technology used in manufacturing the
resistor.

Page | 19

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Fig.2.4.2 Electronic Symbols


Series and parallel resistors
In a series configuration, the current through all of the resistors is the same, but the voltage
across each resistor will be in proportion to its resistance. The potential difference (voltage) seen
across the network is the sum of those voltages, thus the total resistance can be found as the sum
of those resistances:

(EQN 2)
Resistors in a parallel configuration are each subject to the same potential difference (voltage),
however the currents through them add.

(EQN 3)

Page | 20

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Resistor color coding

Fig.2.4.3 Resistor color coding


To distinguish left from right there is a gap between the C and D bands.

Band A is first significant figure of component value (left side)

Band B is the second significant figure

Band C is the decimal multiplier

Band D if present, indicates tolerance of value in percent (no band means 20%)

For example, a resistor with bands of yellow, violet, red, and gold will have first digit 4 (yellow
in table below), second digit 7 (violet), followed by 2 (red) zeros: 4,700 ohms. Gold signifies that
the tolerance is 5%, so the real resistance could lie anywhere between 4,465 and 4,935 ohms.
The Standard Resistor Color Code

Table 1 Standard Resistor Color Code


Page | 21

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

2.4.2 CAPACITOR
Introduction
A capacitor (originally known as condenser) is a passive two-terminal electrical component used
to store energy in an electric field. The forms of practical capacitors vary widely, but all contain
at least two electrical conductors separated by a dielectric (insulator); for example, one common
construction consists of metal foils separated by a thin layer of insulating film. Capacitors are
widely used as parts of electrical circuits in many common electrical devices.

Fig.2.4.4 Capacitors
Features: ceramic disc capacitor

Linear temperature coefficient of capacitance.


High Stability of capacitance.
Low loss at wide range of frequency.

Specification

Operating temp. range -25 to +85 degree centigrade.


Rated working voltage DC 50V, 500v.
Test Voltage 3 times of the rated voltage.
Capacitance within the tolerance and Q-Factor at 1 Mhz, 1+- 0.2 Vrms.25 degree
centigrade.

Page | 22

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

When there is a potential difference (voltage) across the conductors, a static electric field
develops across the dielectric, causing positive charge to collect on one plate and negative charge
on the other plate. Energy is stored in the electrostatic field.
An ideal capacitor is characterized by a single constant value, capacitance, measured in farads.
This is the ratio of the electric charge on each conductor to the potential difference between
them. The capacitance is greatest when there is a narrow separation between large areas of
conductor, hence capacitor conductors are often called "plates," referring to an early means of
construction. In practice, the dielectric between the plates passes a small amount of leakage
current and also has an electric field strength limit, resulting in a breakdown voltage, while the
conductors and leads introduce an undesired inductance and resistance.

Fig. 2.4.5 Varieties of Capacitors


Practical capacitors are available commercially in many different forms. The type of internal
dielectric, the structure of the plates and the device packaging all strongly affect the
characteristics of the capacitor, and its applications.
Capacitors are widely used in electronic circuits for blocking direct current while allowing
alternating current to pass, in filter networks, for smoothing the output of power supplies, in the
resonant circuits that tune radios to particular frequencies, in electric power transmission systems
for stabilizing voltage and power flow, and for many other purposes.

Page | 23

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Theory of operation
A capacitor consists of two conductors separated by a non-conductive region.
The non-conductive region is called the dielectric. In simpler terms, the
dielectric is just an electrical insulator. Examples of dielectric media are
glass, air, paper, vacuum, and even a semiconductor depletion region
chemically identical to the conductors.

Fig. 2.4.6 Theory of operation of capacitor


A capacitor is assumed to be self-contained and isolated, with no net electric charge and no
influence from any external electric field. The conductors thus hold equal and opposite charges
on their facing surfaces, and the dielectric develops an electric field. In SI units, a capacitance of
one farad means that one coulomb of charge on each conductor causes a voltage of one volt
across the device.
The capacitor is a reasonably general model for electric fields within electric circuits. An ideal
capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge Q
on each conductor to the voltage V between them.
(EQN 4)
Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In
this case, capacitance is defined in terms of incremental changes:
(EQN 5)
Page | 24

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

2.5 LED (LIGHT EMITTING DIODE)


Introduction

Fig.2.5.1 Light Emitting Diode


A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps
in many devices and are increasingly used for other lighting. Appearing as practical electronic
components in 1962, early LEDs emitted low-intensity red light, but modern versions are
available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.

Internal Description of LED


When a light-emitting diode is forward-biased (switched on), electrons are able to recombine
with electron holes within the device, releasing energy in the form of photons. This effect is
called electroluminescence and the color of the light (corresponding to the energy of the photon)
is determined by the energy gap of the semiconductor. An LED is often small in area (less than 1
mm2), and integrated optical components may be used to shape its radiation pattern.

Page | 25

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Fig.2.5.2 Internal description of LED


LEDs present many advantages over incandescent light sources including lower energy
consumption, longer lifetime, improved physical robustness, smaller size, and faster switching.
LEDs powerful enough for room lighting are relatively expensive and require more precise
current and heat management than compact fluorescent lamp sources of comparable output.

Fig.2.5.3 Electronic Symbol of LED

Page | 26

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

Light-emitting diodes are used in applications as diverse as aviation lighting, automotive


lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video
displays, and sensors to be developed, while their high switching rates are also useful in really be
advanced communications technology. Infrared LEDs are also used in the remote control units of
many commercial products including televisions, DVD players, and other domestic appliances.

Advantages of using LEDs

LEDs produce more light per watt. Than do incandescent bulbs; this is useful in battery

powered or Energy saving device.


LEDs can emit light of an intended color without the use of colour filters that traditional

lighting methods require. This is more efficient and can lower initial costs.
LEDs are Ideal for use in applications that are subject to frequent on-off cycling, unlike
fluorescent lamps that burn out more quickly when cycled frequently, or HID lamps that

require a long time before restarting.


LEDs being solid state components, are difficult to damage with external shock.

Fluorescent and incandescent bulbs are easily broken if dropped on the ground.
LEDs have extremely long life span. One manufacturer has calculated the ETTF
(Estimated Time To Failure) for their LEDs to be between 100,000 and 1,000,000 hours.
Fluorescent tubes typically are rated at about 30,000 hours, and incandescent light bulbs
at 1,000- 2,000 hours.

3. PROJECT DESCRIPTION
Page | 27

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

3.1 Introduction
The temperature of the object under test is sensed by a temperature sensor MLX90614 which is
an infrared non-contact temperature sensor.
A 5V dc supply is used to operate the IR sensor as well as the microcontroller. The IR sensor has
two parts integrated inside it, the IR sensitive thermopile detector chip and the signal
conditioning ASIC. A low noise amplifier and a 17 bit ADC and powerful DSP units enable high
accuracy and resolution of the thermometer. The thermometer comes calibrated digital SMBus
output giving full access to the measured temperature in the complete temperature range(s) with
a resolution of 0.02C.
The user can configure the digital output to be PWM. As a standard, the 10-bit PWM is
configured to continuously transmit the measured temperature in range of -20 to 120 C, with an
output resolution of 0.14 C.

3.1.1 SYSTEM DESCRIPTION


The connections are made as shown in fig 3.1. Analog input pins (A4, A5) of the microcontroller
are connected to the IR sensor pins (SLC, SDA) using jumper cables. The sensor senses the
temperature within its infrared beam and through a 17 pin internal ADC, gives the analog input
to the Arduino. Resistors of 4.7K ohms is connected between the SLC, SDA and power supply
pins. Also a capacitor is connected by the supply and pin Vcc to provide ripple free DC for
optimum usage of the sensor. The sensor is grounded and gets it power supply of 3.3V from the
power pins of the Board, through the pins Vcc and Vss. The same power is provided to the leds,
by the means of creating a power base in the breadboard, who are connected by the PWM digital
pins (D9,10,11) of the arduino. They are coded to change color and display as per the
temperature range of the object under test. This combination of 3 leds provide the thermal
flashlight operation, where the green led lights from temperature on or below 23 degrees Celsius,
the blue led lights above this range. The red led lights for temperature above 8 degrees. The Led
combination is connected to the power supply in a common anode formation, with suitable
resistors applied for current limitation and varying the intensity. Since the leds are connected by
Page | 28

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

PWM, the transition is a smooth one when they change color from one temperature range to
other. Also, the sensor being a non-contact one, is based on infrared sensing and hence dependent
on emissivity properties of the objects.
The second part of the system composes of a 16X2 Lcd display which gives the current
temperature in a digital form up to 2nd decimal place. The lcd screen gets the input from the
digital pins (D3-6) of the microcontroller and gets Dc power 5V. The display is backlight by
providing power to the last 2 pins of the 16 pin display. Data pins (D4-7) are connected to the
arduino which provide it with the temperature signal. The contrast of the display is controlled by
the 3 pin potentiometer, connected to the CNT pin of the display. Enable and select pins are
connected to the microcontroller as its interfacing. Since it is used just for display option, R/W is
permanently grounded.

3.2 Component used:

TEMPERATURE SENSOR-MLX90614
16*2 LCD 16 pins
Arduino Uno Microcontroller
10K POTENTIOMETRE
BREADBOARD
LED- red green blue
Resistors : for limiting the current to the devices.
R1 4.7-kilo-ohm
R2 -4.7-kilo-ohm
R3 - 220 -ohm
R4 - 100-ohm
R5- 47-ohm

Capacitors: 0.01F for providing ripple free pure dc input.

Page | 29

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

3.3 CIRCUIT DIAGRAM

Fig 3.1 Circuit diagram of the system

4. RESULTS AND DISCUSSIONS


Page | 30

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

The system proposed deals with problems faced in remote sensing of temperatures. The system
has an IR sensor which directly reads temperatures of objects without contact. The IR sensor is
connected to the microcontroller Arduino UNO, which stores the value of the temperature and
sends it to the LCD screen for display. This is a real time model which gives the temperature of
surroundings or objects instantaneously. The temperature readings can be stored and later plotted
for studying its variations and analysis.
It has wide applications starting from medical appliances where an IR sensor based thermometer
can gradually phase out the mercury based one, providing better and accurate body temperature
readings. It can be used in climatology as the surface temperature is of prime importance to the
study of urban climatology. It modulates the air temperature of the lowest layers of the urban
atmosphere, is central to the energy balance of the surface, helps to determine the internal
climates of buildings and affects the energy exchanges that affect the comfort of city dwellers.
Also, another major application is in remote sensing of temperature. This project can measure the
temperature in industries where human cannot reach. This project could monitor the temperature
from remote area and show the temperature at receiver side in the form of voltage, with the help
of calibration between temperature and voltage. We can measure the temperature of the machine
in industries at critical area where temperature of machine is not measured directly. This could be
used for temperature control of systems in general and motor drives in particular.
Hence we have achieved through this model, detecting temperatures through IR sensor and
taking cognizance of this fact, it can be further developed for many of the above mentioned
applications, particularly for remote sensing and thermal imaging. Through thermal imaging, one
can sense points of heat leakage in plants or have a have a thermally varying contour of a region.
Also, using the matlab applications of the microcontroller, we can have the temperature
variations of an object over a period of time and can use the plots for analysis.

Page | 31

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

5. CONCLUSION
Ever since the invention of thermometer, various techniques have been developed and used to
measure temperature of solid, liquid and gaseous matters. But none of these techniques could
measure the temperature from a remote place, which sometimes becomes a necessity, particularly
when the object under test is in a dangerous or inaccessible area. Presented here is a remote
sensing thermometer to measure the temperature from a remote place.
The main scope of this project was to measure the temperature in industries where human cannot
reach. This project has monitored the temperature from remote area and shown the temperature
at receiver side in the form of voltage, with the help of calibration between temperature and
voltage. We measure the temperature of the machine in industries at critical area where
temperature of machine is not measured directly.
This project, on further development can be used extensively in different fields, ranging from
motor drives to medical applications. The main advantage of using an infrared sensor is its
remote sensing capability of an object not within contact with high accuracy. Infrared tympanic
thermometers would measure body temperature detect infrared energy emanating from the ear
canal and tympanic membrane, hence not prune to the harmful effects of a traditional
thermometer.
Also, surface temperatures and thermal imaging applications can be made using such a device.

Page | 32

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

6. REFERENCES
Literature surveys:
[1]: Author J.A. Voogt and T.R Oke titled Analysis and synthesis of remote sensing
Vol: 86, Issue 3, pages-370-384
[2]:Author Tom Austin, Sierra Research titled Analysis of remote sensing devices
Erg No. 187.00.002.001, Conference Publication
[3]:Author Madam Sin Lian titled Infrared Thermometers

Arduino code:
http://bildr.org/2011/02/mlx90614-arduino/
For i2c library and instructions
http://publiclaboratory.org/tool/thermal-camera
http://splinter.com.au/blog/?p=29
http://www.kasperkamperman.com/blog/arduino/arduino-programming-hsb-to-rgb/

MLX90614 specs: Data sheet


MLX90614 family Single and Dual Zone Infra Red Thermometer in TO-39 Data sheet

LCD display: http://arduino.cc/en/Tutorial/LiquidCrystalDisplay

Articles referred:
Author JM Kornflied, RR Reagen titled Flashlight Patent D566,309,208
http://public laboratory.org/tool/thermal-camera/

Page | 33

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

7. APPENDIX
The code in the microcontroller for operating the leds(thermal flashlight) and displaying the
current temperature on the lcd display as per the input given to the analog pins by sensor is as
follows:
#include <i2cmaster.h>
#include <LiquidCrystal.h>
#include "Wire.h"
//#include "BlinkM_funcs.h"
const float lowReading = 60;
const float highReading = 75;
const unsigned char separatorCharacter = 255;
LiquidCrystal lcd(12, 13, 5, 4, 3, 2);
void setup()
{
pinMode(9,OUTPUT);
pinMode(10,OUTPUT);
pinMode(11,OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 1);
lcd.clear();
i2c_init(); //Initialise the i2c bus
PORTC = (1 << PORTC4) | (1 << PORTC5); //enable pullups
}
float normf(float x, float low, float high)
{
float y = (x - low) * 255.f / (high - low);
if(y > 255)
{
y = 255;
}
if(y < 0)
{
y = 0;
}
return y;
Page | 34

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

void loop()
{
int dev = 0x5A<<1;
int data_low = 0;
int data_high = 0;
int pec = 0;
//write
i2c_start_wait(dev+I2C_WRITE);
i2c_write(0x07);
// read
i2c_rep_start(dev+I2C_READ);
data_low = i2c_readAck(); //Read 1 byte and then send ack
data_high = i2c_readAck(); //Read 1 byte and then send ack
pec = i2c_readNak();
i2c_stop();
//This converts high and low bytes together and processes temperature, MSB is a
error bit and is ignored for temps
double tempFactor = 0.02; // 0.02 degrees per LSB (measurement resolution of the
MLX90614)
double tempData = 0x0000; // zero out the data
int frac; // data past the decimal point
// This masks off the error bit of the high byte, then moves it left 8 bits and adds
the low byte.
tempData = (double)(((data_high & 0x007F) << 8) + data_low);
tempData = (tempData * tempFactor)-0.01;
float celcius = tempData - 273.15;
//Serial.println(fahrenheit);
float state = normf(celcius, lowReading, highReading);
//Serial.write((unsigned int) state);
//Serial.write(separatorCharacter);
// BlinkM MaxM super-bright LED:
// 165 is blue, 0 is red
//BlinkM_fadeToHSB(blinkm_addr, map(state, 0, 255, 165, 0), 255, 255);
// Regular ol' RGB LED:
int hue = map(state,0,255,359,(359*0.5)); // not the whole color wheel
setLedColorHSV(hue,1,1); //We are using Saturation and Value constant at 1
lcd.setCursor(0, 1);
Page | 35

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

lcd.print(" degrees C");


lcd.setCursor(1, 1);
lcd.print(Celcius);
lcd.clear();
}
//Convert a given HSV (Hue Saturation Value) to RGB(Red Green Blue) and set the
led to the color
// h is hue value, integer between 0 and 360
// s is saturation value, double between 0 and 1
// v is value, double between 0 and 1
void setLedColorHSV(int h, double s, double v) {
//this is the algorithm to convert to RGB from HSV
double r=0;
double g=0;
double b=0;
double hf=h/60.0;
int i=(int)floor(h/60.0);
double f = h/60.0 - i;
double pv = v * (1 - s);
double qv = v * (1 - s*f);
double tv = v * (1 - s * (1 - f));
switch (i)
{
case 0: //
r = v;
g = tv;
b = pv;
break;
case 1: //
r = qv;
g = v;
b = pv;
break;
case 2:
r = pv;
g = v;
b = tv;
break;
case 3: //
r = pv;
g = qv;
b = v;
break;
case 4:
Page | 36

ARDUINO BASED THERMAL FLASHLIGHT USING IR SENSOR

r = tv;
g = pv;
b = v;
break;
case 5: //
r = v;
g = pv;
b = qv;
break;
}
//set each component to a integer value between 0 and 255
int red=constrain((int)255*r,0,255);
int green=constrain((int)255*g,0,255);
int blue=constrain((int)255*b,0,255);
setLedColor(red,green,blue);
}
//Sets the current color for the RGB LED
void setLedColor(int red, int green, int blue)
{
analogWrite(9,red); //Red pin attached to 9
analogWrite(10,green); //green pin attached to 10
analogWrite(11,blue); //blue pin attached to 11
}

Page | 37

Вам также может понравиться