Thermistor measurement confusion

Basic Information:

Printer Model: Voron 0.2R1
MCU / Printerboard: SKR PICO V1.0
klippy.log

Describe your issue:

Ok, what am I missing?
On the provided printer.cfg for my printer (which works well) the thermistors are noted as “Generic 3950”. I’m assuming that means “Generic 3950 100K” , which is fine but I was trying to use a generic 3950 10K thermistor, but the difference is not germane to my question.
Anyway, the Pico has a circuit with a 4.7k high side resistor to 3.3v, with the thermistor on the low side-perfectly normal. But, it also has about 4.7K of resistance in series with the thermistor. Not a big deal at room temp where the thermistor is at 100K, but it is a big deal at 100C where the thermistor is only about 6k, and seems like a ridiculous problem at 200K, where the thermistor is roughly 0.6K.
How can Klipper make any reasonable measurement at extruder temperatures? The only way I see that is if “Generic 3950” includes that 4.7K series resistor, but the klipper docs strongly suggest that a series resistor is unlikely (inline_resistor, “It is rare to see this”).
Any thoughts?

What is your level of understanding of voltage dividers and (MCU) ADCs?

The thermistor and the 4.7k pull up form a voltage divider with an output voltage defined by the formula:

Vvd = 3V3 * Rtherm / (4k7 + Rtherm)
Where:
Vvd is the output of the Voltage divider
3V3 is labeled on the schematic as "ADC_VREF" and is the Voltage used by the ADC
Rtherm is the resistance of the thermistor
4k7 is the 4,700 Ohm pull up

The output of the voltage divider is passed to the RP2040’s 12 bit ADC and converted into a number for Klipper to work with - 12 bits means that the analog voltage is converted into a number in the range of 0 to 4096 (2 to the 12th power).

The 12 bit output number is the fraction of Vvd divided by 3.3V. So, if Vvd was 1V, the ADC output would be 1241 (4096 / 3.3).

For your examples:

At 25C (Rtherm = 100k) Vvd = 3.13V & ADC Output = 3912 
At 100C (Rtherm = 6k) Vvd = 1.85V & ADC Output = 2296
At 200C (Rtherm = 0k6) Vvd = 0.37V & ADC Output = 1530
At 250C (Rtherm = 335 Ohms) Vvd = 0.22V & ADC Output = 899

So the ADC Output ranges at the higher temperatures is reasonably large number and provides for fairly good accuracy along with good granularity as the temperature of the thermistor increases.

I know I’ve simplified a few things a bit (namely that the least significant bit, or two, is normally dropped out to minimize noise issues) but that’s basically how the thermistor resistance is converted to a Voltage and Voltage converted into a number. It’s pretty standard on all 3D printer controller boards (and a lot more other applications).

3 Likes

In addition to the detailed explanation from @mykepredko, note that the two 2.37K resistors are NOT in series with the thermistor:

There is nominally no DC current flow of any significance through those resistors because the MCU input that they connect to has extremely high impedance compared to the thermistor. They do however create a low pass filter with the 0.1 uF capacitor to eliminate high frequency AC electrical noise on the ADC interface.

1 Like

I just spent 5 minutes typing up a reasoned response about how you’re wrong, and I’m right. Then I noticed that I misread the schematic. Sorry about the unpublished diss.
I missed that gigantic connector on the left, and assumed the thermistor was connected at the node labeled TH0. So I screwed up both sides of the connection.
I’ll just slink off with my tail between my legs now; but you did answer my question of “what did I miss”. Thanks.

I will say that I’ve had good luck linearizing thermistor measurements, especially at high temps, with a resistor parallel to the thermistor and roughly equivalent to the thermistor room temp value, but I’ve mostly worked with 10K thermistors topping out at 150c or so.

Maybe I do not understand the question correctly, but for sure a 10K NTC is the wrong sensor for a hotend since the resolution especially at high temperatures will be abysmal.

Edit:
I do not even know 10K NTCs that would go above say 150°C and even if, their resistance curves make them only useful in a range up to ~80°C IMO (maybe up to 140 °C, depending on the constant current that is used to drive the measuring circuit and depending on the AD resolution)

No worries whatsoever! We have all done this. I do it on a regular basis, especially when I speed read :slight_smile:

My use of 10k thermistors is in the context of something completely different than 3d printers, and especially hot ends. But there have similar characteristics in that, near the top of their range, resolution can become, as you say, abysmal.

But, yes, you can get excellent results from a 10k thermistor above 150K by using a slightly modified measurement circuit. With a 100K thermistor, it’s easier once one reads the schematic correctly :roll_eyes:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.