How to get consistent and accurate readings from thermocouples?
I upgraded to an Mk9 dual extruder, and it came with thermocouples installed instead of the thermistors I had before.
No matter what I did with the thermocouples, the indicated temperature jumped around by as much as 30C or more. In short, after several weeks of fiddling I never got the thermocouples to work well, and replaced them with thermistors, which have been fine.
So my question is: what is required to get thermocouples to give reliable, consistent, accurate readings? Are they just incredibly touchy?
Some things I tried include:
Of course, one must add circuitry (typically a thermocouple amplifier board such as http://wiki.ultimaker.com/Thermocouple_Sensor_Board_v1), to convert the tiny voltage differences to larger differences usable with Arduino or similar analog inputs.
Place those boards close to the thermocouples, but far enough that they are at pretty stable temperature themselves.
Have absolutely no wire extensions of splices, changes of wire types (material), etc.
Avoid doing repeated measurements too fast.
I replaced a thermocouple board with 5V through a potentiometer to the analog input pin, to rule out problems in the Arduino, pin configurations, or software, and got stable readings.
I checked for shorts-to-ground from the heater block, both sides of the thermocouples, the heater itself, etc. None found.
The thermocouple wires are surrounded by a braided shield (not common or shorted to either thermocouple wire); I tried grounding that at either end and at both ends, to the heat block, the printer frame, the power-supply ground, and the RAMPS board ground. These had various effects (sometimes large), but I couldn't find any configuration that made the readings stable (much less accurate!).
Anything I'm missing?
Maybe $10 for a type K thermocouple, plus $10 extra for the amplifier board you need for it. $1 or less for a thermistor, judging by a quick web search.
Just to add to this, I went through much of the same after switching to an all-metal E3D and having a thermistor fail. I was able to print for a while using the thermocouple and then had no end to my issues. Temperature bouncing ~20C every update and very inconsistent. I tried several different boards, thermocouples, and even went as far as a separate power supply for the board. I ended up removing the diode from one for some reason and that board can be found here - https://oshpark.com/shared_projects/p8Yv87Ks but I don't believe it helped at all.
Thermocouples work by passively generating VERY small voltages via the Seebeck effect -- usually a few tens of millivolts. They're literally just a pair of wires made from two different special alloys, electrically connected together at the "hot" end. That wire junction can be mounted inside whatever kind of attachment tip or lug is desired.
The fact that they're very simple and passive devices makes them extremely precise and consistent between TCs of the same type, MUCH more so than thermistors. Any type-K thermocouple in the world will give you the same accurate output +/-1-2C or so. You can even cut a thermocouple in half, re-twist the ends of the wires together, and it'll still work!
However, the very small (millivolts) signal they generate is quite susceptible to electrical noise and circuit design. The signal voltage has to be greatly amplified to be useful. So it doesn't take much EMR from your heater or stepper wires to interfere with the TC reading. A frequent problem with TC circuits in 3d printers is the dreaded GROUND LOOP -- if the "hot" tip is electrically connected to the hot block, voltage and current on the heater and motor wires can induce small currents through the TC wires that totally screw up the millivolt signal. The amplifier picks up these stray voltages and it throws off the temp read. So, there are some important guidelines for keeping noise out of the TC wires:
- The TC wires must be electrically insulated from the mounting hardware (eye lug, thermowell, whatever your extruder has). You can check this with a multimeter -- you want infinite / out of range resistance from the TC leads to the mounting tip and hot block. While you're at it, make sure your heater cartridge wires aren't shorting to the hot block -- that's unsafe and can also cause problems with TCs.
- Keep the two TC wires close together, and not immediately parallel to noise sources like PWM-controlled heaters or stepper wiring. If you must run the TC in a bundle with the other wires, TWIST the heater/stepper wiring pairs. (For steppers, twist each coil pair to a different pitch if possible. You don't need to twist the separate coil pairs to each other.)
Another common issue with TC circuits is the COLD JUNCTION COMPENSATION. A thermocouple doesn't measure tip temperature, it measures the DIFFERENCE in temperature between the hot tip and the cold junction where the TC is connected to either the amp or copper wiring. The TC amp has an onboard thermistor that it uses to add the temp at the cold junction to the measured signal from the thermocouple. There are a few things you need to do to make sure the cold-junction compensation works properly:
- You should run TC wire all the way from the "hot" tip to the TC amp. You CAN splice it and install plugs, but only with more type-K TC wire and proper type-K thermocouple plugs. These use the same metal as the TC wire so they don't generate undesired junction voltages that interfere with the TC signal. If you splice copper wire between the TC and the amp, any temp differences along the copper will not be measured! This is a particularly big problem if you splice to copper inside a warm enclosure and then run copper to an amp outside the enclosure.
- The amp should not be super hot. The onboard thermistor is designed to accurately measure temperatures reasonably close to room temp, not hot-block temps.
- There should not be large temperature gradients near the amp or between the TC wire termination and the actual amp chip. Place the amp far enough away from the hot end and other heat sources (like stepper motors) that it isn't experiencing weird temp profiles.
If you do the above, the TC will output a good signal, and the amp will read it properly. But there's one more hitch. The mainboard has to know how to understand the amp's output. 3D printer control boards that are designed exclusively for TCs, like Mightyboards, usually use digital communication between the amp and the main control chip (MCU). This is high-reliability and does not require any special firmware configuration -- support is baked in. But if you're strapping an external TC amp onto a board that is expecting thermistors, you will have to tell the firmware how to read the signal from the amp. The most common technique is for the amp to output a linear voltage signal to the MCU's normal thermistor input (ADC). Then you configure the firmware to use the appropriate "thermistor table" (really a voltage lookup table) for that particular amp. Depending on your controller board, you also may need to make sure the regular thermistor pull-up/pull-down resistors aren't affecting the amp's output.
So you need to make sure:
- You don't have electrical noise issues
- The cold-junction compensation is working as intended
- The firmware and controller board is configured correctly for your amp chip's output
If you do all that, a TC should give superior accuracy and reliability over a thermistor.
Thanks! Lots of good info there. I didn't try moving the TC wires well away from the motor/heater/limit wires, or twisting the latter; that's worth a shot. I'll post back when I try it, though since I have a working printer with the thermistors, I may not mess with it for a while.... :)