3-Wire MAX6675 Thermocouple ADC Arduino Interface

Sdílet
Vložit
  • čas přidán 5. 08. 2024
  • How to program Arduino to read the MAX6675 thermocouple ADC for reading high temperatures.
    www.bristolwatch.com/ele2/ther...
  • Věda a technologie

Komentáře • 61

  • @moggiss36
    @moggiss36 Před 7 lety +4

    Fantastic video, this appoach of writing a library from the scratch, explain it and going into detils is a very generous gift to beginers. Thank you Lewis.

  • @RCTurbine
    @RCTurbine Před 7 lety

    Thanks so much Lewis, been battlng with libraries for two days. Followed your code and it worked first time.

    • @Paul-ls9lx
      @Paul-ls9lx Před 6 lety

      Where is the code?

    • @RCTurbine
      @RCTurbine Před 6 lety

      Paul Navarrez
      Paul, on his webste.
      Peter

  • @mattlambert3118
    @mattlambert3118 Před 8 lety

    Just a note to help others out, I had to reverse the clock polarity and put in a couple delays to get this code to work (i.e. digitalWrite(CLK, LOW); _delay_ms(1) **or delay(1)if you're using Arduino instead of regular AVR** value+=digitalRead(DBIT); digitalWrite(CLK, HIGH); ms_delay(1); ) Obviously, the code works as is for some modules (it's demonstrated on the video), but you might want to try these changes if you're having some trouble. Thanks for the vid, Lewis. It was helpful.

  • @cncdavenz
    @cncdavenz Před 8 lety

    Hi,Programing does my head in but you explained this very well,Cheers Dave.

  • @3dw3dw
    @3dw3dw Před 8 lety

    thank you for sharing your knowledge with us. this helped quite a bit.

  • @3D_Printing
    @3D_Printing Před 8 lety

    Excellent video + code + details

  • @woraphanlimraksaenginering2891

    thank you for your code ,it give me understand with SPI communication and max6675.

  • @ilhamwinar9251
    @ilhamwinar9251 Před 5 lety

    good, very complete explanation! no library also, make me understand a lot.

  • @adudecalledjay
    @adudecalledjay Před 6 lety +1

    This code also works for the ESP8266 12E. Only change required is do the CLK on pin 12 not 9.

  •  Před 7 lety

    Thank you for sharing!!!

  • @teehee2237
    @teehee2237 Před 8 lety

    hi lewis, thanks for the video you explain really good, it helped me a lot!, do you know if i can use a 2.2 uf capacitor instead?

  • @ewmorrissey
    @ewmorrissey Před 8 lety

    Lewis,
    trying to use your program on a Mega 2560 with just displaying 0.00 for the temperature - not sure what I am doing wrong. I am new at this type of programing and not sure what Matt Lambert is taking about? To see if that will fix it

    • @LewisLoflin
      @LewisLoflin  Před 8 lety

      This was done on an Arduino nano you have to have the correct pin connections. I don't use the Mega 2650. Try changing the time delay.

  • @bookofspirit
    @bookofspirit Před 6 lety

    Thankyou!!

  • @laredotech
    @laredotech Před 5 lety

    What would I have to do if I change the thermocouple? Let's say for example it measures 0-500c?

    • @LewisLoflin
      @LewisLoflin  Před 5 lety

      While I'm sure it would return a reading I doubt it would be correct. Try it out and read a known temperature as measured by another source. Use a correction factor, a number often multiplied or divided to compensate for the difference. That can be derived by experimentation.

  • @3D_Printing
    @3D_Printing Před 8 lety

    SPI should be able to allow more than one sensor, (compare temperatures, etc), but how to know which sensor is which?

  • @michelolivierhuard
    @michelolivierhuard Před 7 lety

    Hi sir, I'm trying to use max6675 on a battery operated a wireless network and I'm trying to decrease power consumption to a minimum. Is there a way to reduce the 200ms delay? also, can the max6675 chip run on 3.3V? thank you! great vid!

    • @LewisLoflin
      @LewisLoflin  Před 7 lety

      There is a conversion time and 200mSec. is already cutting it close. 3.3 volts I don't know check the spec sheet. Sorry.

    • @michelolivierhuard
      @michelolivierhuard Před 7 lety

      Lewis Loflin Thanks, I did since my previous post. It's very clear: 170-220ms conversion time. The newer max31855 has a reduced conversion time of 70-100ms. I'm gonna go with off the shelf solar power banks.

  • @MrJUANPINHEIRO
    @MrJUANPINHEIRO Před 7 lety

    Good!! Is possible to read four sensors in the same arduino?

    • @LewisLoflin
      @LewisLoflin  Před 7 lety

      Sure as long as you have enough data/clock pins.

    • @totoxahc
      @totoxahc Před 7 lety

      Juan Pinheiro you can share de SO and SCK pins but use one CS pin for each module

    • @MrScottJ87
      @MrScottJ87 Před 7 lety

      +Juan Pinheiro , check out designer2k2's video "MultiDisplay, Typ K Thermocouple Reading and Scope Mode" he has 8 readouts i believe with a regular adruino

  • @DandSCreations
    @DandSCreations Před 6 lety

    This is causing a VERY slow loop in the arduino, I tried attaching a timer interrupt to make it read only on certain read counts, then it basically won't read it at all. It's driving me nuts. I'm trying to control a jet engine with this thing and the MAX6675 is slowing down the whole work!

    • @LewisLoflin
      @LewisLoflin  Před 6 lety

      The MAX6675 is a slow device and there is no way around it. It has I think a 500mS conversion time.

    • @DandSCreations
      @DandSCreations Před 6 lety

      I was a able to shorten to 185 MS and still obtain readings, I then had it read as an interrupt ever 20 loops instead of slowing every loop down 185 MS

    • @LewisLoflin
      @LewisLoflin  Před 6 lety

      Great work. Noted.

  • @nazalmohamed3643
    @nazalmohamed3643 Před 6 lety

    Hi Lewis, awesome video, but when I tried the same code with arduino uno, it's printing only zeroes, connections and codes I crosschecked many times but still it's printing only zeroes. Can you please help.

    • @LewisLoflin
      @LewisLoflin  Před 6 lety

      Hello Nazal. It's really basic code and has worked for a number of people. I ran mine on an Arduino Nano. Did you use the code exactly as on the webpage?

    • @nazalmohamed3643
      @nazalmohamed3643 Před 6 lety

      No I changed the pins to 13-CLk, 12-SO and 10-CS and rest I kept the same. Is it possible that something's wrong with the sensor? It's a new one which I just bought.

  • @Presso99
    @Presso99 Před rokem

    Hi, can we connect 2 thermocouple with Arduino and read the data simultaneously?

    • @LewisLoflin
      @LewisLoflin  Před rokem

      No. You can read one after the other. There is a time delay for conversion so if the conversion on both starts together read one and then the other.

    • @Presso99
      @Presso99 Před rokem

      @@LewisLoflin Thanks. Phidget 1048 has the capability to simultaneously perform 2 readouts. There is a reason why they sell more expensive.

    • @LewisLoflin
      @LewisLoflin  Před rokem

      @@Presso99 I don't know that device. I doubt it reads 4 sensors all at once, but one after the other very fast. The MAX6675 is a digital sensor that puts out a particular serial code. The other device might use a 4-channel high-resolution AD, but it still reads one at a time. Use that same Arduino code for 2 sensors but use different digital pins. Start the conversion on both; after the delay, read each sensor.

  • @breusin
    @breusin Před 8 lety

    What is the purpose of the capacitor? I ran your code without it and it seemed to work.

    • @LewisLoflin
      @LewisLoflin  Před 8 lety

      +Brent Reusing It's a noise bypass capacitor I think. Some of these parts such as a LM7805 won't work without it. The spec sheet said use it.

    • @breusin
      @breusin Před 8 lety

      After testing for a few days, I've found the accuracy at room temperature to be off by a few degrees. Perhaps I need some calibration.
      The noise you speak of is probably presenting as the fluctuations I see between reads. Sometimes as much as 1.5°F.

    • @LewisLoflin
      @LewisLoflin  Před 8 lety

      +Brent Reusing It's going to be off a little bit. This is not a high dollar item. Thanks.

    • @breusin
      @breusin Před 8 lety +1

      Thanks again for the info. My application for use is to take readings from my Big Green Egg BBQ smoker. I want to plot temps throughout the cooking time. So far so good. I used a python script to push the readings to a Google Sheets spreadsheet to give me a real time graph available via the internet. It's just a hobby and I'm having fun.

    • @michelolivierhuard
      @michelolivierhuard Před 7 lety

      Hi Brent! I want to do the same but I don't know anything about python. Can you share some instructions and code? thanks!

  • @debuffedhuman982
    @debuffedhuman982 Před 3 lety

    is there any way to transfer this to matlab code?

  • @asmakhenifer8209
    @asmakhenifer8209 Před 7 lety

    How can enterfacing max6675 with pic 16f876

  • @srinivasan7790
    @srinivasan7790 Před 7 lety

    value += digitalRead(DBIT)

    • @LewisLoflin
      @LewisLoflin  Před 7 lety +1

      This is part of a serial to parallel routine. Read a pin, add that value HIGH or LOW (1 or ), then shift left one bit. Do it X times in a loop.

    • @saturdayscience8173
      @saturdayscience8173 Před 7 lety

      I beg to differ. At the very beginning of the function value is initially = 0. For this particular line of code digitalRead(DBIT) sees if the input pin is LOW or HIGH; ie it returns 0 or 1. That 0 or 1 is then shifted left by i bits. i ranges from 14 down to 0 in your code. Say i = 3 and DBIT is 1 then 1 shifted left 3 times becomes 8. That 8 is then added to the variable value. If DBIT = 0 then 0 shifted any number of bits remains 0, so value +=0 equals value. What you describe would be coded as value = (value + digitalRead(DBIT))

  • @sssserya1
    @sssserya1 Před 8 lety

    test Video ?

  • @ThaiNguyen-ry5io
    @ThaiNguyen-ry5io Před 7 lety

    in formula Ctump = v * 0:25 (0:25 come from that)

    • @saturdayscience8173
      @saturdayscience8173 Před 7 lety

      The temperature has 0.25degC precision and is encoded as a 16 bit 'integer' by multiplying the temperature by 4. Lewis converts the temperature to a float (Ctemp) by dividing by 4.0, as a simple integer would lose the 0.25, 0.50 and 0.75 precision.

  • @3D_Printing
    @3D_Printing Před 8 lety

    EEVBlog explains some things:
    czcams.com/video/AYblSfpKRUk/video.html