hi welcome to an Arduino step-by-step course by Robojax
hi welcome to an Arduino tutorial from Robojax in this video I’m going to show
you how you can use this max 6675 thermocouple module with use with this k-type thermocouple
to read the temperature and see it in Celsius and Fahrenheit using Arduino
you will need to use for example like a type thermocouple sensor
and read the data using this mac 6675 with Arduino the code that I’m providing here will work with
all versions of Arduino and I will explain also the wiring if you're interested to you
to display this temperature on a lcd 1602 or on a led display on a multiple display I have separate
videos with separate code all the link will be provided inside the description below this video
when you receive the module this this will be without the k type so I’m adding a type together
s2 terminal here plus and minus and your if your key type has marks put it this way otherwise you
have to flip it the other way until you read the data as ground vcc and then serial clock chip
select and serial output and here is a data sheet that's from maxim integrated and it can measure
from 0 to 100 degrees Celsius resolution is 12 bit it uses spi communication operating one is from -3
to plus 6 volts I will provide you the length for this in case if you want to look further
the k-type could be this way because this is for different application with not and
also you can have this type of k-type sensor this is the sensor at the top
both of these will work with this chip length of the module is 32.1 millimeter
width is 15.7 millimeter and the depth is 16.3 millimeters
and here is the wiring diagram for mac 6675 thermocouple sensor with Arduino from the right
the serial out is connected using the purple wire to pin four the second pin is connected using the
gray wire two pin five the third wire the clock is connected using the white wire to pin fix
on this side vcc pin is connected using the orange wire 2.5 and the ground is connected using yellow
wire to the ground of Arduino now let me explain the wiring from this side the ground the yellow
this is the ground it's connected to the ground of Arduino the orange is the vcc have been connected
to five volts here doesn't matter you can get it from other source but Arduino is very convenient
so this has been connected to pin four and then we have uh chip select the chip select is connected
to pin five the gray wire here have been connected to pin five and then we have serial clock csk
which is white one this has been connected to pin 6 so we have used four five six
let me explain the code the original source can be downloaded from here but I will provide
the link that you can download directly from our website or from there
let me explain the code the original source can be downloaded from here but I will provide you
the link that you can download directly from our website or from there
this max 6675 include it means include this file which is part of the library
which will be provided a zip file so when you download it either put it directly in the library
folder inside Arduino or go to sketch include library and from here select add zip library
then from this point it to the zip file wherever you downloaded in my case inside
this folder this is an example something dot zip select open and then it will be installed
in your library and then you can see it here file example
and you will see max 6675 with these two examples but
I have modified the code to make it easy this is how it looks and I’ve changed these parameters
so they reflect whatever is on the module and then so that's serial out that is written on the module
and then I put pin serial out pin I’m connected I get to pin four and then this is chip select
connecting into pi five and then serial clock pin connecting it to six I’ve also written them here
once you define all this pin four five and six then we create an instance of this class and
we call it Robojax and it takes these three arguments so clock pin cs pin is open you
must put them in this order if you switch them it will not work so it must be in this order
after that inside the setup we initialize the serial monitor with 9600 baht and we print this
text this 9600 bar is the value that is set here this 96 and after that we go inside the loop
inside the loop this we just print c the serial monitor and this one c equals sign with a space
that's the space under equal sign and then we when we want to read the Celsius we say Robojax because
we have created that here we see Robojax dot read Celsius this is the value that is shown here 19.25
and then we put a space here this is a space between the value and f and
we put f Fahrenheit and this is the Fahrenheit it's just reading our temperature and we wait
1000 milliseconds or one second and the loop continues each line is one element of a loop
and if you want to do something based on some temperature you will do something like this
let's say you want to check if the temperature is over 60 degrees do something f so we said
let's say this is Fahrenheit and you can do Celsius if the temperature is over 86 degrees
then you can do something this is open and closing and do something here you turn on something
let's say the temperature increases and you want to turn on a fan to cool down something or the
temperature decreases if it's below this and you want to turn on a heater turn it on in here
and let me now demonstrate it this is a temperature that this thermocouple sensor
is read by this module and it's displaying here the Celsius and Fahrenheit and I’m going
to use this heat gun this is the master craft from Canadian tire so let's just
as you can see this is the
so it goes very hot now it's 125 degrees Celsius here and this is the reading in Fahrenheit
now it's cooling down
and the reading is I set it for one second so if you want to read faster just change the value
of this to uh less than once I can make it hundred milliseconds or something like that
thanks for watching this was how to use this max 6x75 uh temperature reader with
this k-type thermocouple please make sure to subscribe by clicking at the subscribe button
in here thank you thank you for watching if you learned 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 please post it at the comment section below
I try to answer and reply and don't forget subscribe so you get updates on my upcoming videos