MAX31856 Thermocouple Amplifier - Page 1
Forum section: electronics / projects

author: jpanhalt
author_rank: Super Contributor
timestamp: April 07, 2022, 06:24:49 pm
content: I have been playing with the MAX31856 TC amplifier for the last couple of years. My project is a predictive (i.e., it predicts done time and hour or more ahead). It now seems I have everything working except the 31856Its datasheet promotes the extensive fault checking it does. Most of the faults are not a problem or are of no concern. One problem is a headache: "overvoltage undervoltage" (ovuv) fault. That fault cannot me masked and when it occurs, it locks the chip for about 20 to 30 minutes. There is no way I have found to clear it.So, what sets it off? Just wiggling the TC, touching the TC end, waving the TC in air. In contrast, my Fluke TC meter withstands all of those antics and never stops. Googling finds that others have had that problem. I have tried the easiest solution of adding capacitors. Decoupling and the capacitor between the leads was increased from 100 nF to 1 uF to no avail. Another option is to increase the series resistance from 100 Ω to 2 kΩ. That is more difficult to do and affects accuracy.Does anyone here have experience with that problem?Datasheet:https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf

author: floobydust
author_rank: Super Contributor
timestamp: April 07, 2022, 08:13:30 pm
content: Maxim thermocouple-to-digital IC's I find are a piece of junk, just a poor design. They have a very high susceptibility to EMI and common-mode noise. And the final insult is they cost near $10 each and the datasheet is 30 pagesJust put your cellphone near the thermocouple wiring, even with the cheeseball 10nF datasheet capacitors and watch false readings and fault codes appear.I think they went overboard with making the parts kindergarten-like and full of "features" that are useless. The diagnostics are stupid - a TC to +Vcc short will never happen and because that "feature" requires CMOS switching the TC (common-mode) off ground, it makes for trouble - ESD sensitivity, and the (CM filter capacitors) decay times from the fault-detect routine. Just terrible.Real world industrial thermocouples are in a thermowell which is usually connected to the thermocouple (weld) so they are referenced to GND and the Maxim parts do not work with that. If your thermocouple ever touches metal, i.e. an oven grill (usually grounded) or tank you get the ground fault flag or worse even though a decent circuit would care less.The most common trap is if your project is running off an ungrounded SMPS. The CM noise from the Y-cap will give you grief. This would give false OV/UV detection, and noisy readings. Try PE grounding your MCU power for less CM noise.I find to get the IC's to work, need ferrite beads/CM choke on the thermocouple's wiring, and make sure the TC is floating. Adding RC filtering also helps for RF immunity.MAX31855and predecessorMAX6675datasheetsedit: added links

author: jpanhalt
author_rank: Super Contributor
timestamp: April 07, 2022, 08:49:25 pm
content: Your observation is consistent with what I am seeing. I also checked the critical components on the Adafruit BOB I started with. C3 and C1 measured 18nF and should be 10nf. I'll give a pass on that. C2 (between the TC leads) was right on at 97nf. C4 & C5 measured 7uF and show 0.1uF on the schematic. Since they are supply decoupling caps, I suspect Adafruit also had a noise problem -- not that it extensively tested the BOB before market.I will try a ferrite bead and increase my supply caps from 1uF to 10uF.BTW, I did most of the programming on a soldered breadboard. It was working pretty good but nowhere nearly as robust as my Fluke. I just assembled my "real" board in February. Those TC problems have really slowed adding refinements to the software. Next version will not use the MAX31856. I just want to get it working well enough by Easter to test my predictive algorithm with a real roast.Thanks.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 07, 2022, 09:15:36 pm
content: Hey, a ferrite bead seemed to help. I can actually rub the TC weld. and it keeps on ticking. Tomorrow, I will add more bypass caps. I build them like a tower in 805's. So, unintentionally, I will have 0.1uF, 1.0uF, and 10uF in parallel.Thanks again.John

author: floobydust
author_rank: Super Contributor
timestamp: April 07, 2022, 09:54:42 pm
content: You can't really add a lot of filtering capacitance at the TC inputs because the fault-checking expects to switch the TC quickly and take a reading. With caps it takes a long time to ramp up/down and false triggers the fault-check.On a PC board, I would add a series FB on each incoming TC lead and even 10's ohms resistors also works to filter out RF. A CM choke or bead can work too. I think you might have an issue with CM noise and your power supply.Maxim's front-end seems optimized for cellphone pickupI had a reflow oven that would jump ahead to the next stage whenever I walked near the oven. The cellphone gave noisy temperature readings and when they went up, the firmware would jump to the next stage... best to average the readings over a few seconds before deciding anything.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 07, 2022, 10:46:53 pm
content: I don't have a cell phone as I spent my whole professional life tied to a telephone 24/7/365. Getting rid of it was the first thing I did when I retired 16 years ago. My children wonder about my safety, and I may reconsider.This project is sitting on top of my PC for hardware simulation. That probably provides enough EMI for the MAX to misbehave. But it makes no difference to my Fluke. I am hoping that with the filtering you suggest and additional caps only on the power pins, I will get through the first real test without a glitch. If that fails, I will use my Fluke and do my usual manual calculations so I don't ruin dinner. My time for such development is limited to Winter and early Spring, and it is getting late. There's a lot to do on a hobby farm. As soon as the ground gets firm enough to drive on with the tractor, I spend most of my time outside with chores.Regards, John

author: floobydust
author_rank: Super Contributor
timestamp: April 08, 2022, 06:01:11 am
content: You might be forgetting about WiFi, my router is next to my PC and spits out RF bursts for the speakers/amp to pickup. Cordless phones at 900MHz are also terrible.My point is the intermittent, noisy readings or fault-codes may be due to local RF interference.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 08, 2022, 10:16:28 am
content: The ferrite bead, which was actually a Laird 35T0375-10H toroid core (DK 240-2522-ND) with 3 wraps close to the chip, seemed to give a big improvement. I ordered some "real" ferrite beads and will get them tomorrow.My router is 15' away. What really bothered me about that chip is the time it took to recover from the ovuv fault, and the fact there is no practical way to force a recovery. Not even a POR seems to help. Initially, I was in comparator mode, and that is the only fault I have ever seen, except an intentional open circuit. Even in interrupt mode, banging on FAULTCLR (bit 1) of the CONFIG_0 register did nothing. I just turn it off and do something else. Maxim must have been aware of the sensitivity and designed it such that that particular fault locks everything.I will definitely update tomorrow.John

author: MarkL
author_rank: Unknown
timestamp: April 08, 2022, 02:02:07 pm
content: I've used the MAX31856 in a couple of designs over the last several years to read J-type thermocouples without ever having any lockup issues. I used the recommended front end filter shown in figure 8 in the datasheet.I selected it because of the programmable fault pin, and although didn't use it in the final designs, explicitly tested the OV/UV fault. I am not using FAULT Interrupt Mode. The fault cleared as soon as the OV/UV test condition was removed from the thermocouple.Have you looked at either of the T+/T- inputs with respect to GND with a scope? Maybe something's not right with the bias? Both inputs should be around +0.7V.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: April 08, 2022, 02:56:33 pm
content: Yeah, low impedances here, ferrite beads are a no-brainer.FWIW, I'm currently working on a TC input stage, with MCP6V76T (noninverting x101) into AMC1035. A somewhat unusual pick, because it's also isolated; D-S bitstream is trivial to isolate. Cold junction compensation is just a thermistor on board, adjusted in software.EMC network is just a pair of ferrite chips (one each lead), nice big 0.1uF across the terminals (signal level is small, X7R will do), ESD diodes, then series resistor and a slight pullup (for open detect, and for reading slightly negative temperatures; note that this puts DC through the TC, so a slight compensation for wire resistance may be needed -- about 10 counts/ohm (16 bit scale) in this case). A common mode choke might be desirable for more EMI or non-isolated environments; further testing will show if I need one.I chose this over more integrated methods, due to the need for isolation, and the excessive complexity and cost of most dedicated chips. Board area is fine for a one-off, 29 components (plus a MAX253 shared with another isolated thing), but wouldn't be so appealing for more than a few channels.Aside, the D-S totalizer was an interesting exercise on AVR-DA. Had to use a bit of the configurable logic, but it gets an exact count. Not sure what methods might apply on other platforms (hopefully something better than squishy interrupts capturing counts!).Tim

author: jmelson
author_rank: Super Contributor
timestamp: April 08, 2022, 04:35:56 pm
content: Quote from: jpanhalt on April 07, 2022, 10:46:53 pmOH YES! I understand, and am WITh you on this. I have a pay by card phone for traveling, and otherwise never have one on me.Jon

author: floobydust
author_rank: Super Contributor
timestamp: April 08, 2022, 07:31:58 pm
content: OP is using theAdafruit MAX31856boardwhich is missing an isolation resistor for the BIAS pin so it's a path for EMI, and there are no ferrite beads or protective clamp diodes. Adafruit forums have Makers encountering several problems with the boards, look atthis postof fixes. It's ridiculous the hoops to go through and your kiln will never work lol.My gripe with all of Maxim's thermocouple to digital product line is the cornball fault-detection circuit, EMI sensitivity and dumbed down datasheets.The thermocouple inputs must be free to move up and down (common-mode) during the fault-detection sequence with the CMOS switches. The IC's common-mode impedance hops around, as well as the CM voltage it can handle.A TC with a grounded thermowell will not work, and EMI filtering or common-mode interference voltage resistors are not permitted because the fault-detect sees a failure.It really boxes you in- a decent design, something that can be used in industrial environments is not possible. In the real world, thermocouples and their wiring are lovely antennas. The Sesame Street simple 0.1uF across TC+ and TC- looks more like a nice resonant circuit the Q is way too high. You still need to add ferrite beads or resistors, ESD clamp diodes, and something to limit common-mode voltages.The original part in the line up, MAX6675 shows TC(-) grounded, "Should be connected to ground externally" and oh look how does that work exactly when the IC schematic shows two CMOS switches S1, S2 and Ref. voltage wanting to move TC(-) around?Then the later generation MAX31855/856are TC(-)"Do not connect to GND".Anyhow, the MAX31855Eval board does have the extra ferrite beads plus some CANBUS 27V clamp diodes. But still the CM voltage a thermocouple can have is a problem.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 08, 2022, 08:11:58 pm
content: @floobydustActually, I am not using the Adafruit BOB. My board is "my" own design copied from the datasheet. I mentioned Adafruit as it apparently did the same thing, and with the breadboard used last year, it was an easy out to soldering that chip.I have attached the full schematic and board (Oshpark) and a snippet of the pertinent part of the board.I will measure the voltages at each TC input relative to ground tomorrow. The only modification relative to the TC is addition of a 1uF between the TC leads, which is based on advice to another user who was having the same problem with his kiln temperature measurement. So far, the makeshift ferrite bead is helping.JohnSorry for the quality of the attachments. I had assumed this site would allow .SCH and .BRD files that could be expanded , but it doesn't.

author: floobydust
author_rank: Super Contributor
timestamp: April 09, 2022, 02:24:19 am
content: Sorry I was being snarky about the kiln comment, didn't know this is what you are doing. I find it frustrating the IC is a PITA whether it's a kiln or reflow oven, a simple application but many hassles reported by people.What I suggest for your project's success with this IC:-I would add the EMI resistors R10/R11 and/or ferrite beads and a series resistor on BIAS pin 2, like the eval board has, to stop EMI coming in on that pin.-The thermocouple and its wiring cannot touch anything conductive i.e. metal grill, baking pan, kiln walls, sheet metal, yourself etc. Also kept away from any mains/heater wiring.Depending on your heater relay, they can make a burst of EMI when the contactor switches or if you're using phase-control. An on/off SSR gives quiet switching but they generate a lot of heat. So if you see problems with readings/fault-codes only whenever the heater switches on/off then you know it's the source of interference.-This IC will not work well when powered from a two-prong AC adapter, including a laptop's USB port. The Y-capacitor adds too much CM noise. You must have an earth-ground connection to the DC power supply. Connected to a PC there is an earth-ground connection via USB but this can get lost out at the kiln when this runs off batteries.If the thermocouple pokes out and taps the heating element, the board becomes hazardous live and is a danger, if the board is grounded then smoke and sparks will fly.-In firmware, maybe keep two averages for temperature- a short term and a long term that does not get updated if at that moment a fault-code is set or the reading is way off. This is to reject any bad readings, and stop your software from jumping to the next stage by accident, or scuttling it's forecast. Or try only take a temp reading when the heater is pulsed off, unless it's constantly on of course. I think you can model the kiln temperature integrating the heater on-time and ballpark thermal mass inside from pottery, unless the bricks are the main mass.The problem at high TC temperatures >900°C, the IC flakes out with fake fault codes, the Adafruit forum guy said leave it floating (not grounded) he says apparently the IC needs only 50uA of leakage current to report a fault and it's due to hot air becoming conductive? Strange voodoo that I don't believe but I don't know 900°C air.Analog Devices "Flexible, Low Power, 4-Channel Thermocouple System with Arduino-Compatible Digital Interface"CN0391ahhh look a grounded thermocouple input andCN0394AC grounded leg, as it should be. There are many helpful TC app notes there too.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 09, 2022, 11:49:20 am
content: @flobbydustThat is very interesting information from Maxim.Just FYI for others and for reference with my "Tentative plan," here are links to the two development boards:MAX31855:https://datasheets.maximintegrated.com/en/ds/MAX31855PMB1.pdfMAX31856:https://datasheets.maximintegrated.com/en/ds/MAX31856EVSYS.pdfThe contrast between the 31856 eval board and 31856 recommendation in its datasheet (both copyright/revision dates February, 2015) is striking.Tentative plan: Modify using same ferrite beads as used in MAX31855 eval board and put them in place of the zero ohm resistors shown in the MAX31856 eval board (R11 and R12 on my board). Splice R1 into the TC- bias trace. Snippets of the related part of my board attached.Opinions? It is a tight fit for me to hand solder.EDIT: I will also remove the additional 1 uF Sesame streetcapacitor between the TC leads (C17). Getting to the 0.01uF caps on the TC leads to ground (C16 and C18) would be very difficult, as access requires removing the TC socket. As for averaging readings, I have the device set to report the average of 4 conversions. I take an average of 3 such readings to report temperature every 2 seconds and average 10 such averages to update statistics (e.g. rate of temperature increase and predicted "done" time) every minute.

author: floobydust
author_rank: Super Contributor
timestamp: April 09, 2022, 09:17:43 pm
content: That plan looks reasonable, the 1uF just leave it if it's hard to change. A lot of interference is AM radio band, filtering that out I find important.I'm not sure where the bias resistor 20k value came from, but start there and let us know if anything improves. I hope it works when the kiln is running.

author: jpanhalt
author_rank: Super Contributor
timestamp: April 09, 2022, 09:48:02 pm
content: Thanks.The 20k seemed a bit large to me. I like dealing with SMD capacitors as you can just keep stacking them up. With resistors, it is a bit more complicated. I will start with 20k, then reduce it as needed.I was thinking about your reference to "kiln." That might apply to cooking in Indiana, but in Ohio, we rarely cook roasts to such high temperatures.Here are a few pictures. The first is my test "roast." It is just a plaster of Paris and vermiculite casting to a density slightly greater than water. The second is my display. User can set a final temperature. For me, that is usually about 130°F (for the picture, it was set lower). The firmware is almost done for the time being. I plan to add an acceleration factor that will take into account the second derivative of the temperature ( i.e, d(rate)/dt where t= time). Right now, it is probably good enough. I am waiting on my order from DK for the chip ferrites. DK has a warning that shipping may be delayed. That instrument box was bought from a fellow who was selling a temperature logger in kits. He sold me the case and buttons alone. The upper two buttons on the right will have the symbols erased and use directions on the screen -- usually "up" and "down". Bottom right is a reset. Second button on the left is backlight on/off or in between. Upper left is "run." It will be battery operated and turning the backlight off will save the battery.I will definitely give a follow-up.John

author: 48X24X48X
author_rank: Frequent Contributor
timestamp: May 15, 2022, 09:27:40 am
content: Sorry if this come late.I have been selling reflow controller since 2011 and has went through Maxim's MAX6675, MAX31855KASA and MAX31856.As other has pointed out, it is a very "dangerous" IC to design with if not design carefully.The ferrite bead is best to be littered everywhere including the power line before and after the voltage regulator on top of the other section as suggested here. These converter is just too sensitive to any small spike of voltage. Add more decoupling capacitor on the voltage rail of different sizes.Maxim has even sold to me wrongly calibrated IC through Digikey and these nearly burn down my customers houses. The reading is like 100 degree lower than the real thing (no apologies from Maxim so whatever). In the beginning I tested the first 100 degree Celsius of each unit. Once this incident happened, I started to test the entire reflow temperature range. Yes it took so much of hours to test just a small batch.On top of that, the MAX6675 and MAX31855 are counterfeit IC's favourite due to the high price.Maybe it's time to look at discrete solution or MCP9601.

author: jpanhalt
author_rank: Super Contributor
timestamp: May 15, 2022, 10:23:46 am
content: I have your oven controller. It is nice.My original code development used the Adafruit BOB for the MAX31856. That worked reasonably well. It was sensitive if I touched the TC tip, but was not as bad as my recent experience. I followed its schematic, which is the same as in the Maxim datasheet so far as the TC. For SPI interface, it included diodes and pull-up resistors (attached). I did not include those. Do you think such pull-ups are needed? As for layout on the TC side, mine is very similar.Recent addition of more decoupling and ferrite beads to my project has helped. I could go a step further and add resistance to the bias connection, but that would involve major surgery on the PCB. Given current chip shortages, I will wait on doing that.As for going to a discrete solution for my final version, I am seriously considering that.Thanks for the advice.EDIT: Hi 48X24X48X,I notice the ferrite beads on supply lines in your schematic. That makes sense. There are none on the TC specifically. You also have a 10k pull up on !CS.Can you comment on the need for the pull up? Did you consider putting ferrite beads in the TC leads per se as shown in the Maxim application note referenced earlier?John

author: 48X24X48X
author_rank: Frequent Contributor
timestamp: May 15, 2022, 01:26:16 pm
content: Thanks for having one!The diode are for voltage translation 5V device to talk to the 3.3V MAX31856. I only added the pull-up on the CS as it was on the SPI bus that was also the ATMega328P's ISP bus. So, you have to pull it high so it doesn't interfere with the ISP programming when it is being used. However, if you are using some other controller say ESP32 or ATSAMD or anything that doesn't share such SPI/ISP interface, it can be omitted.You can swap the 100R on the TC lines to ferrite bead. These ferrite bead was recommended on the MAX31855KASA but can be applied on the MAX31856 too. The ferrite bead on the power line I notice it's importance when I first designed the shield version where the power quality depend very much on the Arduino board under it. Some user that use cheap EBay Arduino clone especially has a hit and miss power supply circuit and that usually inject so much of noise into the thermocouple interface. Once, I added the ferrite bead, the problem seems to go away completely especially if used with a clean power supply.My thoughts are going back to MAX31855KASA as they are still available on LCSC as MAX31856 dates seems to be far away. But, I'm trying to get the date code from them now and verify with Maxim. They are selling MAX6675 for less than $2, would you even believe it? Well I don't.

author: jpanhalt
author_rank: Super Contributor
timestamp: May 15, 2022, 03:01:38 pm
content: Swapping the 100R with the recommended beads is exactly my plan. Next board will have the power supply filters added too.So far, it has worked well enough to find the "final" bug and fix it. Now for another test with a real roast (it's part of my roast thermometer). I am also wondering whether the MAX31855 might have been a better choice. First, though, I need to finish and send it off to my children to test. I have absolutely no plans to sell to the public and admire anyone who can do that successfully.John