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
two max 6x75 with 2k type thermocouple and two lcd 1602
with a I square c which has only four wires to display temperature in Fahrenheit and Celsius some
situations you need to have two display and also two k type thermocouple with this max 6675 modules
for that reason I’m going to utilize an usage of this and show you how you can use two of them but
it's up to you that maybe you want to display the two of this on one display and the other display
will be used for something else and because of the usage of this k type with this max 6675 module and
two lcd with I square c I’ve I will explain and go step by step so you will be able to use it
for your application a separate video explaining this thermocouple with the datasheet and all other
information I’ll provide you the link I will strongly encourage you to watch that video and
use it before coming with this lcd and multiple and also a separate video explaining this lcd
which you have to watch and make sure that you can display some information on this before coming to
this once you are able to display some information once you are able to read temperature with this
and display it on the serial monitor then use one of them and make sure it works
then add the second one I’ve linked another video that explaining how to use it with single lcd so
maybe you have to play with that and before coming to these two because you will be ready by then
this has been labeled as plus and minus the red one will be connected in here
chip has pins and they have provided all the pins for you as
ground vcc and then serial clock chip select and serial output
display we have four plans here this is a ground and this is the vcc ground will be
connected to the ground vcc will be connected to five volts in Arduino and then we have
this is a wiring diagram for two max 6x7 five thermocouple with two lcd screen
and I’ve used a breadboard the three wires for the thermocouple are exactly at the same
position for the two of those I’ve used pen four five and six eight nine and ten for the pins and
for the power for all these four modules I’ve brought an orange wire to this point
uh to the side that is red that is my five volts from the ground and a yellow wire to the blue side
where there is a blue line that that's a ground and that is the vcc or five volts
from this point I brought another orange wire to this red section so this is also five volts
and from the ground another wire to this point so this side of breadboard has five volts on
ground and this side has also five volts and ground and the by convention the five volts is
towards the red on both side and this one doesn't have black so the blue is ground on both sides
this module is connected using vcc using orange wire
to five volts to the red side and then ground a yellow wire is connected in here for the second
module same way orange is connected to 5 volts ground is connected using yellow to the ground
this two module that needs I square c communication sda is now connected using
a blue wire from pen a4 is connected to here and scl or clock is connected to this point
this line is scl and this line is our sda this module is connected using this purple wire
to five volts using gray wire connected to the ground the same for this vcc is connected using
purple wire to five volts and ground is connected using grey wires to the ground and then we have
scl the clock is connected using green wire to this point which is connected to a five and scl
of this one is also connected so both of these have been connected to the same point and sda
using blue have been connected here and sda of the other one also have been connected using blue wire
and not to forget for I square c communication if you have more room up to 128 devices can be
connected for this for this module we have ground on this side and then vcc this will be connected
to the ground as you can see it has been connected on this side and this one is vcc connect I’ve been
connected to 5 volts in Arduino and then we have sda and scl, sda have been connected this blue to
a4 and analog 4 and then SC: the clock have been connected to analog 5 of Arduino uno we're using
Arduino uno and then then SCL is a5 and SDA is a4 an Arduino mega is the 20 and then SCL is 21 and
Leonardo and all of those cc will be connected to five volts here in here
the orange and then yellow is the clock the yellow is the ground the ground is
connected to the ground of Arduino and these pins the three of them
have been connected to pin four five and six purple gray white
and here they are
let me now explain the code I will provide you the length for two libraries one will be for the max
6x75 you have to download it as a zip and also there will be another library for the liquid
crystal display or lcd you have to download them as a zip and include them they can be included
in two ways one way would be to put them directly under the library folder inside the Arduino folder
if you know that just proceed with that if you want to prefer the other way it would be clicking
by clicking on the sketch include library and add zip library then point to the zip file let's say
this is a zip file pointed to that and click open for the lcd and also for this once you're done
you will have the options available and this code will work for the thermocouple you can click on
file example and here the max 6675 there are two other examples if you want to play with those
for the lcd also there is one I’m not going to bother with that so this is part of that library
of mac675.h that's a header file for c or c plus plus and this is the wire library which is part of
Arduino you don't have to do anything as long as long as you run this code it's included and this
will be part of the library that I just explained so you have to include these two this line
we are creating this is a class we are creating an instance of this class we call it lcd one and
then this is another uh instance of the class we call it lcd2 these two refers to the two lcd
and the first one we put the address and the second one also this is zero x two sexes
for the second one first one is the address this is 16 character and two line
I will provide you for the length for this is I square c scanner you just upload it to your
um Arduino and after that if you run it and open it you will see that it detects all the devices
if your wiring is correct so now it shows 0x2608 mean hexa decimal value of 26 and that's the 3f
so every few seconds it goes and one of them is this module and the other one I know this is a 3f
but let me just disconnect this one so you will see that that 26 disappeared
and if I put it back you will see that the 26 how up here so this way you can find the address
for I square c after that we define for the thermocouple these are the pins for
one and this is the pin for the other one for the pen this is called serial out so
serial out and I put one here serial out one pin
this is claw chip select one pin and this is clock one pen so this one means instead of a couple one
and then this has been four five and six is used and then I went accordingly just left one
a pen and then eight nine ten this is um for the serial out 2 chip select 2 and then serial clock 2
pen have been defined for the second thermocouple and then we create an instance of the class
of max 6675 this was thermocouple and I just put one thermocouple one and then thermocouple two
and then we pass these values to this well if this is one this should be serial clock1 chip select
one pin and then uh serial out one pen and this is also two the same way if you want to include the
third one just like another add another line and make this two and make sure also define the pins
inside the setup we just initialize the lcd one dot begin that initialize the first lcd
and the first lcd backlight and this is for second lcd begin and backlight these
two are needed to initialize and then we are printing this text on the screen let me show you
if I reset the Arduino you will see that it says max thermocouple one and this is one and s2
that is this text that will be from here it shows Robojax with that model
so this is for lcd one we see lcd one dot print and then we set the cursor this goes
to character zero line one so this goes to the next line and prints the thermocouple one and
this is for the cd2 exact same thing and this is for the serial monitor 9600 baht is the value
that is displayed in here and this is the 9600 at the bottom it must and you can
you can open the serial monitor by clicking in here so that we just wait three seconds
for the user to read the display information if you want to shorten this do that inside this
loop this is for the serial monitor how it prints this you just type thermocouple one
and then read Celsius this is the value for the Celsius temperature so this is the value
and then let me put here some space and then we put and then we thermocouple one read Fahrenheit
this is the value for the Fahrenheit and the same will be displayed in the lcd
so we just this will print one line like that uh portion of the line up to thermocouple one
and this is for the thermocouple 2 as you can see it shows c2 with the values and then c1
this should be c1 f1 c2 f2 we go lcd one dot clear that clears the screen from
the previous value and you'll see two we have to do it for both and then we
this portion from here up to here this is for lcd one you see these are all lcd one
and this is just for the first line line zero character zero character zero line
zero we just print this thermocouple this is this information at the top
and then we go character zero line one and here we print the Celsius we say thermocouple one dots
dot read Celsius and we'll print it and then we jump to character five of line one and we print
this character two three two two three which will print the c uh the degree and then we print the c
then we jump here at the character seven we create some empty space and
then character eight we print the thermocouple that Fahrenheit that will print the temperature
and then that is with each character 14 print the degree and then print the f
this will be the same thing exact same thing we just type two two two two make sure even here
thermocouple should be two and we wait one second and then the loop continues like that
let me now demonstrate this this shoe is 22.5 this a little different
now I’m using this master craft from Canadian tire the heat gun to blow the heat
and it shows the Celsius and Fahrenheit and this one also shows 70 162 and Fahrenheit
as you can see simultaneously Celsius one and then Fahrenheit one is continuously
displayed on the serial monitor as well as in here thanks for watching
this was how to use these two thermocouple uh temperature sensor with max 6675 and lcd lcds
please make sure to subscribe by clicking at the subscribe button in here thank you
thank you for watching tutorial from Robojax 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