I always find it interesting that 3D printers — at least the kind most of us have — are mostly open-loop devices. You tell the head to move four millimeters in the X direction and you assume that the stepper motors will make it so. Because of the mechanics, you can calculate that four millimeters is so many steps and direct the motor to take them. If something prevents that amount of travel you get a failed print. But there is one part of the printer that is part of a closed loop. It is very tiny, very important, but you don’t hear a whole lot about it. The thermistor.
The hot end and the heated bed will both have a temperature sensor that the firmware uses to keep temperatures at least in the ballpark. Depending on the controller it might just do on-and-off “bang-bang” control or it might do something as sophisticated as PID control. But either way, you set the desired temperature and the controller uses feedback from the thermistor to try to keep it there.
If you print with high-temperature materials you might have a thermocouple in your hot end, but most machines use a thermistor. These are usually good to about 300 °C. What got me thinking about this was the installation of an E3D V6 clone hot end into my oldest printer which had a five-year-old hot end in it. I had accumulated a variety of clone parts and had no idea what kind of thermistor was in the heat block I was using.
Does it Matter?
When you build the firmware for your printer, you get to tell it what thermistor you are using. There are a few printers that can switch the thermistor type at runtime and — of course — you could just adjust your temperature settings to account for any error if you knew what they were. You usually use a negative temperature coefficient (NTC) device where the resistance goes down as the temperature goes up. But exactly what resistance corresponds to what temperature depends on the device.
So for my upgrade, the old hot end had a thermistor in it that — I think — was made by Honeywell that the firmware knew about. The new hot end was a total unknown. Most (but not all) common thermistors you’ll use in a printer read 100 kΩ at room temperature and that was true of both of these, as well. I wanted to understand how much off my temperatures would be if I picked up the wrong conversion. Surprisingly, while there was plenty of information about how to read a thermistor, I had not seen much data about error from using an incorrect temperature curve, so I decided to take matters into my own hands.
First, it might be worth to think about what really happens in a typical 3D printer’s temperature sensor. Sure, the thermistor changes value, but what then? Most controllers will have a resistor divider with a fixed resistor and the thermistor and then use an A/D to read the voltage.
You don’t want to pass too much current through the thermistor because that current causes some heating and is a source of error. A typical printer will use a 4.7 kΩ resistor at 5 V to excite the thermistor and read the resulting voltage. Suppose the thermistor is at 500 Ω. The voltage across the thermistor will be 5 * (500/(4700+500)) or about a half volt.
I mentioned that most thermistors you’ll find in a printer read 100 kΩ at room temperature. You might think 500 Ω seems kind of low. In fact, as the device gets hot, the resistance rapidly falls off. A 500 Ω resistance corresponds to around 190 °C in a typical 100 kΩ thermistor.
The microcontroller running the printer has to do the opposite math. That is, it will take the equation above and solve for the resistance. In other words: 0.5 = 5 * (R/4700+500) so solve for R. The problem is you don’t want to set your filament temperature in ohms! You want to use degrees.
The best way to compute temperature from a thermistor reading is the Steinhart-Hart model. This requires three parameters and a little number crunching. However, most 3D printer software uses a simplification that uses just the second parameter, or beta, of the thermistor.
Rather than give you the formula, I’ll point you to this spreadsheet. Column A has some resistance values and the other columns have different beta values and show temperatures in degrees C. If you really want to dig into the math and other applications, check out [Peter Vree’s] video, below.
Armed with that spreadsheet, it is pretty easy to figure out how big a deal it is to be out of tune with your thermistor. Of course, you’d like to have the right value, but in the case of a generic thermistor, how big of a deal is it?
My methodology was simple. I went to Digikey and searched for thermistors. I used their filters to only look at 100 kΩ NTC devices that could read at least 300 °C and specified a beta at 100 °C. The beta values ranged from 3988 to 4280 and based on price and quantities, the real range was even less spread than that. For example, Digikey only had about 180 of the device with a beta of 4280. Not very scientific, I’ll admit, but it did give me a range of beta values you might expect to find “in the wild.”
If you note on the spreadsheet (and the graph below), there’s not a lot of temperature difference at the typical range you’ll print plastics like PLA, ABS, and PETG. Of course, you could get unlucky. If you do have that bottom-most curve, the temperature is a good bit off for that one. Or maybe you have a one of a kind thermistor that has some wacky value that will be way off. But statistically, you’d think you are going to be in the ballpark even if you can’t change the thermistor table. Now, if either thermistor has a different room-temperature resistance, all bets are off. But most of the 3D printers I’ve seen do use 100 kΩ sensors.
Although it shouldn’t make much difference, I did make an educated guess based on some heuristics and changed the thermistor type. I thought about trying to set a precise temperature on the thermistor to get a few more data points but decided it wasn’t worth breaking out the sous vide cooker.
After all, every printer is a little different and the temperature the plastic sees probably isn’t the thermistor temperature anyway, so there’s always a little “dialing in” required to determine what temperature your printer needs for a particular job. A difference of five or even ten degrees, then, will be in the noise. You’ll find out your PLA is too runny at 210 °C and drop the temperature to 190 °C. Or perhaps ABS is causing extruder skips and you’ll goose the temperature up a few degrees. You are going to have to do across different brands, or colors, of filament anyway.
At the end, though, I got great results. Who knew that what might be the tiniest part of a 3D printer could be so important? If you look carefully in the photo to the right, there are two thin Teflon-coated wires coming out of the heat block. That’s the thermistor, whatever brand and model number it is.
Thermistors, of course, have lots of other uses. They can be used to limit inrush current, provide temperature-stable bias, and — of course — sense temperature in many different situations. For example, they can be the heart of a very minimalist soldering iron controller.