Hi, welcome to an Arduino tutorial from Robojax. my name is Ahmad Shamshiri
I'm presenting this tutorial from Canada. in this tutorial we are going to learn
how we can use this Melixes MLX90614 infrared touchless temperature
sensor to measure the ambient and object temperature and displayed on
a screen or uses for other purpose as degrees Celsius Fahrenheit and Kelvin.
<> perhaps you will keep the sensor on the other side for single zone dual zone <>
<> ours is a single zone three in the wiring if you downloaded the library and<>
<> now here the sensor is located at our helping this area this is a<> >>
You can get the code for this by clicking at the link below the video in the description
which will take you to www.robojax.com/learn/arduino
Let's get started with this
this is an infrared thermometer which can measure the temperature without
touching the surface this is the module I've soldered this, this usually they ship
it like this with a pin header separately so you have to solder it keep
the sensor on the other side and solder it here so this way you can point it to
any way you want on this side we have a simple regulator that regulates from 5
volts to 3 volts that this module is operating (XT6206)
and there are two resistors that are needed for I2C communication
because this is also sold without the PCB
Like this
and you just need 2 resistors to use it but the this PCB makes it easy and clean
on the module we have VCC pin which will be connected to 3.3 volts or 5 volts and
then we have GND ground this will be connected to GND of Arduino
SCL and SDA are 2 pins for I2C communication which i'm going to show. We can measure the
temperatures using infrared. It needs to have a line of sight access to the
surface there are different version of this available and this version is
having in 90 degrees angle of view there are different models of this available with different
angle and quality this is the cheapest one perhaps with 90 degrees angle
meaning this will measure 90 degrees so if I measure of temperature is actually
measuring all this area and the further the object inaccurate the value because
it will measured long ways in terms of 90 degrees you see this this will be
very long so keep that in mind but there are different models of this available
in terms of accuracy and angle of view this module is offered in two variation
one is from -40 °C to 125 degrees Celsius and the other is from minus 70 up to 380
degrees Celsius the accuracy of this one is 0.5 degrees Celsius but there are
other a lot of other factors will affect the measurement and here it has been
displayed on Adafruit website you can use it directly from this point you see
this piece you can see this is ground and this is the power you can connect it
directly to 3.3 volts and between this point you just put a resistor two five
volts and it will work
you
the module is sold on Aliexpress if you searched for MLX90614
you will see that it is all CA$36 plus shipping Canadian 25 on eBay
you can get it for seven dollars plus shipping or nine dollars depending on a
type that you select and the modules that I'm using with a close-up
magnifying camera baa that's the model BAA180 and
then I turned it along A18 so we got BAA18
Datasheet viewed
if you pay attention here ours is to 3V but we have a regulator to regulate 5
volts to 3 volts so you know we are not worried B and then AA, AA is single zone
the second one and then the second A standard package I2C address
that it uses is 0X5A this is a hex value supply current is 1 point 3 milliamperes
sleep mode current is 2 point 5 micro ampere typical at ambient temperature of
85 degrees it can keep the data for 10 years the data retention time and also
reading and writing for ambient temperature and of 25 degrees will be
hundred thousand times but if the temperature increases 125 degrees
Celsius then it will be 10,000 times erase and write time is 5
milliseconds here the voltage is mentioned that if we have A it will be 5
volts and if we have B which is the module that I'm using is 3 volts and if
you are using the external component with a it can work from 8 to 16 volts
and there is a typical application suggestion in the datasheet. and here are the
addresses in the ROM that temperature maximum is stored at this address many
mummies stored at this address and then the control and temperature range and
all other values these are the addresses that are being read by the code this is
for AA version and this is an angle as you can see from minus 90 to 90 degrees
from this center point it measures for a minus 50 to 50 degrees
and both side so that's very important to know this is for dual zone ours is
single so we don't have two pieces we are measuring on a single zone this is
for CC as you see there there are version that the accuracy is increased
and then if even we have you see around maybe five or three degrees so this
becomes more accurate there are different versions CH and CF for further
information I provide you the data sheet so you can have a look at it.
if you want to learn Arduino I have a best seller course on udemy where you
can learn Arduino from ground up with hundreds of projects all course material
library codes wiring diagram everything available in one place the link for my
new courses below this video in the description.
Wiring Explained
if you need the wiring diagram for this it's available as part of my Arduino
course at udemy.com. now let me explain the wiring from this side the VCC is
connected the VIN is connected to 5 volts of Arduino Uno the GND or ground is
connected to the ground this is SCL pin the SCL is connected
using white wire to A5 SDA using this black wire to A4 we also have SDA and SCL
in here you can connect to these two last pins
Code Explained
I've used this Adafruit mlx nine zero six one four library I will provide you
the link I know if I will provide you the zip file in case they change it and
the code will not work but if you want to download it from here just click here
and selct downloads zip or from the link that I provide you download the zip file and
your computer and save it once you downloaded the library click on sketch
include library and then select add the zip library and then point it to where
you have saved it in my case inside download tutorial and here is that I'm
ready click open and it will be installed after that close Arduino and
reopen it now you will be able to see the examples if we go click on file->
->examples
here Adafruit ml x nine zero six one four so it's available I'm just clicking
and opening it. let me explain the code full explanation of the code is
available as part of my Arduino course at udemy.com here I'm just going to show
you how to print the text and how to get it these two texts are the value that
are displayed here this ambient and object you could get temperatures you
just type printTemp and inside a single quote put capital letter C this
will give you that temperature of the object in Celsius. and if you want to
get the temperature of ambient surrounding area of that objects or
something else then just put D I use D because D a was not used somewhere else
and that is the second letter after C and if you want to get the temperature
of an object in Fahrenheit use this capital F and if you want the ambient
the next letter after F is G that will give you the temperature in Fahrenheit
for the ambient if you not want to get the temperature in Kelvin for an object
use this line but K and after K there is L L will give you the ambient
temperature in Kelvin and this line just runs these dashes so you know that the
could have ended and next reading on the start I've put this three seconds so we
can wait a little longer to be able to read the text but you can change it to a
smaller value of around five millisecond or greater. now if you want to just get
the temperature we use this getTmp and F so here for example if you want to
get the temperature in Celsius and you want to do something and compare it if
it is greater than 40 then do something and here this is opening and closing and
put your code here let's say you want to turn ON a really a fan of device or
something or turn off something or turn on a camera whatever you want to do do
it here
Full code explanation is available at my Arduino course at Udemy.com. Link to my course is below this video.
you
if you want to learn Arduino I have a best seller course on udemy where you
can learn Arduino from ground up with hundreds of projects all course material
library codes wiring diagram everything available in one place the link for my
Luna courses below this video in the description
Demonstration
and here is a demonstration I'm using Arduino Uno it is connected I have
placed here a ruler so you know in terms of a
distance what is the effect of it this box is now at at zero and now here the
sensor is located at 100 millimeter or 10 centimeter at the moment on the
serial monitor it shows whichever you are paying
attention to for example serious twenty four point five degrees Celsius because
the angle of incidence is now in a certain distance you will read different
value because the angle of this one is opening with ninety degrees this angle
is 90 degrees pay attention that when I put this here it is reading all this
area and is giving me the average so this is the average temperature from all
these areas from this point it is 90 degrees so it's huge to get accurate
measurement I have to be very close so this now it is measuring from this point
up to this point now that is where it gives you 24 degrees lehel this is the
distance we are measuring all these areas bring my hand
and now measures around 30 degrees Celsius or as you can see 86
degrees Fahrenheit but the distance is affecting it and different version of
this will have different and they have different angle of view increase the
accuracy of this we need to put some kind of lens here to direct the infrared
and also compensate if there is any deviation or variation in their
reflection because if you put some lenses you can direct it to narrower
area set of ninety degrees you can make it narrower and narrow and then the
angle of incidence will be smaller and as a result you will get a better
reading
Longer lens for higher accuracy
you
I've placed it at 100 millimeter or 10 centimeters as you can see they're
reading 24 degrees Celsius now I'm getting a heat gun this is a
Mastercraft heat gun from Canadian Tire I am applying heat on this surface
making sure that he didn't had this object the sensor the ambient
temperature issues now 28 because I was just testing it and messed the recording
so I'm doing it again now this is now hitting this area
here's your reading temperature now 41 degrees filthy of that is from this
surface and if I rotate this side it is a little cooler and the temperature
should be a little different now 26 degrees if I bring this back you should
be able to read a higher temperature now 28 degrees so the heater turned on I'm
gonna point it towards this heater and measure the temperature there this is
now pointing to somewhere where I'm gonna bring the heater as you can see it
is reading hundred degrees Celsius
I would like to thank my Patrons from Patreon.com
Subtitle was typed and corrected on April 13, 2020
you
thanks for watching this was how to use this mlx nine zero six one four
infrared touchless temperature sensor. if you learn something and found this
useful please thumb up 👍 as this will help my video in the search algorithm of YouTube
if you have comment or question posted on the comment section below I try to
answer and reply if you want to get updates of my upcoming videos make sure
to subscribe for typically it needs 1.3 million pairs to operate when it's
measuring and also 1.5 million pair when you're programming it and this is the
heater that I was bringing in front of it