element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sensors
  • Technologies
  • More
Sensors
Sensor Forum Any ideas for low-cost Thermocouple Interfacing methods?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Sensors to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 25 replies
  • Subscribers 340 subscribers
  • Views 6491 views
  • Users 0 members are here
  • thermocouple
  • thermistor
Related

Any ideas for low-cost Thermocouple Interfacing methods?

shabaz
shabaz over 3 years ago

Note: See here for a project that resulted from this discussion: BLE EasyTempProbe 

Hi,

Since thermocouple measurement ICs are getting expensive/hard to find, I wished to use a single channel ADC, for thermocouple measurements (actually, I want to use a dual channel ADC for two thermocouples, but it's likely the same problem just doubled!).

The trouble is, the cold end of the thermocouple needs measuring too, and I was thinking of using a thermistor for that because that's easier to obtain (and cheaper) than an IC sensor. In summary, I wished to multiplex a thermistor and a thermocouple.

I've come up with the diagram below so far and wish to use it in an environment where the cold junction might be in the range of -40 to +50 deg C, and the thermocouple might be in the range of -40 to +400 deg C (maybe a Type J thermocouple). I think it will have an error of a few deg C. The ADC is 16-bit, and I likely won't be using the whole range of it. The ADC has a PGA of up to 8X, so it will be set to 8X when measuring the thermocouple.

The main benefit of the proposal below is that it is cheap since it just needs a couple of transistors and a few resistors. I could think of more complex circuits for a more accurate measurement, but it would be nice to see if this is good enough, or if it could be tweaked to be good enough unless anyone has other suggestions.

If it works, this would be a cheap way (under $5, ADC included) to have two thermocouples each with their own compensation, with the drawbacks that accuracy might be a few degrees at best, and no isolation either, unfortunately. 

Any ideas would be gratefully appreciated, since I'm sure I may be missing some great techniques, missing the wood for the trees, etc! Has anyone come across any low-cost methods to do such a thing? Any mistakes I'm making?

image

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 3 years ago +6
    Thinking out loud: Both transistors off, no path on input to 0V so ADC pins 2 and 3 pulled to 3.3V, probably outsiede ADC common mode range. Both transistors on, both sides of thermocouple pulled to…
  • shabaz
    shabaz over 3 years ago +3
    Hi fmilburn (Replying here to remove the comment indent, since I wanted to share some diagrams) I've had a shot at doing it, and was close to giving up since I was seeing huge errors!, but it was…
  • shabaz
    shabaz over 3 years ago +3
    I had a short bit of time to try to prototype this, it is not tested yet. The jumper positions on the left select different resistors, to simulate the thermistor, to be at a temperature of -30, 0, 25 or…
  • shabaz
    shabaz over 3 years ago in reply to scottiebabe

    Wow that's awesome! Thanks for testing this, it is great to see the scope trace. 

    I made some good progress yesterday, and the code is functional although I'm using a lot of floating-point for now. Anyway it made my prototyping time shorter, the code can always be refined later. I still need to order the 1k thermistor, and order/find a thermocouple probe. I might have a Type-K probe lying around somewhere.

    I still need to do the PCB design.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 3 years ago in reply to shabaz

    I do think the input impedance is a bit low, but fortunately for your application it shouldn't be a big deal. Its only for the thermocouple that you need the frontend PGA. I only wrote a very basic uPython script, it isn't a full driver but for interest here is the code I used:

      

    from machine import Pin, I2C
    import time
    import struct
    import ctypes
    
    pwr = Pin(9,Pin.OUT)
    pwr.value(1)
    
    i2c = I2C(1, scl=Pin(11), sda=Pin(10), freq=400_000)
    
    # MCP3425 has a 7-bit address of 0b1101xxx
    # which is 0x68 -> 0x6F (104 -> 111)
    
    i2cDevs = i2c.scan()
    
    PossibleDevs = set(i2cDevs).intersection(range(104,112))
    print( 'Found potential i2c devices: {}'.format(PossibleDevs) )
    
    # Assume the MCP3425 is the first one!
    MCP3425ADDR = PossibleDevs.pop()
    
    i2c.readfrom(MCP3425ADDR,3)
    
    GAIN_1 = 0b00
    GAIN_2 = 0b01
    GAIN_4 = 0b10
    GAIN_8 = 0b11
    
    SRATE_240 = 0b00
    SRATE_60  = 0b01
    SRATE_15 = 0b10
    
    SRdef = {
            "RDYn": 7 << uctypes.BF_POS | 1 << uctypes.BF_LEN | uctypes.BFUINT8,
            "CMODE": 4 << uctypes.BF_POS | 1 << uctypes.BF_LEN | uctypes.BFUINT8,
            "SRATE": 2 << uctypes.BF_POS | 2 << uctypes.BF_LEN | uctypes.BFUINT8,
            "GAIN": 0 << uctypes.BF_POS | 2 << uctypes.BF_LEN | uctypes.BFUINT8,
    }
    
    
    dat = bytearray(1)
    StatContReg = ctypes.struct(ctypes.addressof(dat),SRdef)
    StatContReg.GAIN = GAIN_8
    StatContReg.SRATE = SRATE_15
    StatContReg.CMODE = 1
    StatContReg.RDYn = 1
    i2c.writeto(MCP3425ADDR,dat)
    
    for i in range(100):
        time.sleep(0.1)
        dat = i2c.readfrom(MCP3425ADDR,3)
        sample = struct.unpack('>h',dat[0:2])[0]
        vmeas = sample*2.048/(2**15)/8
        print(vmeas)

    Its an interesting part for its cost, simplicity (i2c), and package sot23-6 for the 3425...

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 3 years ago in reply to scottiebabe

    It's definitely an easy-to-use part with just a single register and simple read/write scheme : ) The single-channel version of the ADC is not currently available at UK Farnell, it has an ETA of next year, but there are lots of the dual-channel in-stock, for very little cost.

    I ran a quick test on the circuit, using a resistor to simulate the thermistor at zero degrees C, and using a 'process calibrator' (which is incidentally not calibrated) to simulate the thermocouple.

    Across the range of -100 deg C to +400 degC, the discrepancy between the calibrator and the measurement with this project is under 1 degree C.

    At -200 and +700 degrees C, the error reaches 2 degrees C so it's less usable at those sorts of temperature ranges at present, but I need to explore further, I've done no investigation/troubleshooting yet. I'm really happy it's usable for a decent temperature range, I was not expecting much more accuracy than this, but I'll investigate further to see where the error is coming from. It's partially likely to be the resistance of the ADC, since I have hard-coded it in my formula to be 2.25Mohm/8, and that won't be very exact; I could tweak the hard-coded value of course, but I don't know it's really worth it, since it is good enough to be usable provided I'm not at a steelworks or building my own kiln etc!

    Also the interpolation in the code is partially causing a bit of error, since it's every 10 degrees C currently.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • scottiebabe
    scottiebabe over 3 years ago in reply to shabaz

    The burr-brown ADS1100 looks awfully similar to these microchip parts, I wonder which came first :) https://www.ti.com/lit/ds/symlink/ads1100.pdf 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • shabaz
    shabaz over 3 years ago

    I've created a separate post to document things as a practical project with code etc, so that this thread remains focussed on the ADC circuit.

    BLE EasyTempProbe

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Cancel
<
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube