3-Wire MAX6675 Thermocouple ADC Arduino Interface

Поділитися
Вставка
  • Опубліковано 18 жов 2024

КОМЕНТАРІ • 61

  • @moggiss36
    @moggiss36 7 років тому +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.

  • @mattlambert3118
    @mattlambert3118 8 років тому

    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.

  • @RCTurbine
    @RCTurbine 7 років тому

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

    • @Paul-ls9lx
      @Paul-ls9lx 7 років тому

      Where is the code?

    • @RCTurbine
      @RCTurbine 7 років тому

      Paul Navarrez
      Paul, on his webste.
      Peter

  • @adudecalledjay
    @adudecalledjay 6 років тому +1

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

  • @cncdavenz
    @cncdavenz 9 років тому

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

  • @3dw3dw
    @3dw3dw 8 років тому

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

  • @woraphanlimraksaenginering2891
    @woraphanlimraksaenginering2891 7 років тому

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

  • @ilhamwinar9251
    @ilhamwinar9251 5 років тому

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

  • @3D_Printing
    @3D_Printing 8 років тому

    Excellent video + code + details

  • @teehee2237
    @teehee2237 8 років тому

    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?

    • @LewisLoflin
      @LewisLoflin  8 років тому +1

      Power supply cap? should work.

  • @ewmorrissey
    @ewmorrissey 8 років тому

    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  8 років тому

      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.

  •  8 років тому

    Thank you for sharing!!!

  • @michelolivierhuard
    @michelolivierhuard 7 років тому

    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  7 років тому

      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 7 років тому

      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.

  • @3D_Printing
    @3D_Printing 8 років тому

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

  • @laredotech
    @laredotech 6 років тому

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

    • @LewisLoflin
      @LewisLoflin  6 років тому

      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.

  • @Presso99
    @Presso99 2 роки тому

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

    • @LewisLoflin
      @LewisLoflin  2 роки тому

      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 2 роки тому

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

    • @LewisLoflin
      @LewisLoflin  2 роки тому

      @@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.

  • @DandSCreations
    @DandSCreations 6 років тому

    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  6 років тому

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

    • @DandSCreations
      @DandSCreations 6 років тому

      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  6 років тому

      Great work. Noted.

  • @nazalmohamed3643
    @nazalmohamed3643 6 років тому

    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  6 років тому

      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 6 років тому

      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.

  • @MrJUANPINHEIRO
    @MrJUANPINHEIRO 8 років тому

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

    • @LewisLoflin
      @LewisLoflin  8 років тому

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

    • @totoxahc
      @totoxahc 8 років тому

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

    • @MrScottJ87
      @MrScottJ87 7 років тому

      +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

  • @breusin
    @breusin 9 років тому

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

    • @LewisLoflin
      @LewisLoflin  9 років тому

      +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 9 років тому

      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  9 років тому

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

    • @breusin
      @breusin 9 років тому +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 7 років тому

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

  • @bookofspirit
    @bookofspirit 6 років тому

    Thankyou!!

  • @debuffedhuman982
    @debuffedhuman982 3 роки тому

    is there any way to transfer this to matlab code?

  • @asmakhenifer8209
    @asmakhenifer8209 7 років тому

    How can enterfacing max6675 with pic 16f876

    • @LewisLoflin
      @LewisLoflin  7 років тому

      If programmed in PIC C it isn't that different from Arduino.

    • @asmakhenifer8209
      @asmakhenifer8209 7 років тому

      thank you so much

  • @srinivasan7790
    @srinivasan7790 7 років тому

    value += digitalRead(DBIT)

    • @LewisLoflin
      @LewisLoflin  7 років тому +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 7 років тому

      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 9 років тому

    test Video ?

    • @LewisLoflin
      @LewisLoflin  9 років тому

      +SergeyD It should work now.

  • @3D_Printing
    @3D_Printing 8 років тому

    EEVBlog explains some things:
    ua-cam.com/video/AYblSfpKRUk/v-deo.html

  • @ThaiNguyen-ry5io
    @ThaiNguyen-ry5io 8 років тому

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

    • @saturdayscience8173
      @saturdayscience8173 7 років тому

      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.