Tuesday, June 10, 2008


Sensing temperature with no temperature sensor

As always, apologies to whoever first suggested this causing it to sink into my unconscious and then re-emerge months later as my own idea...

Above is how we drive the heater in the polymer extruder. The microcontroller feeds a PWM signal into the darlington, and that puts a biggish current through the heating coil - typically about 1.5 A.

Ages ago Vik suggested using the change in the resistance of the heating coil to measure its own temperature by passing the current through a sensing resistor. But there are two problems with this:

  1. That sensing resistor would get hot too, and so not give a stable indication of the current, and
  2. The sensing resistor would waste some of the power.

Here's a way round that:

You leave the PWM/darlington circuit exactly as it is. But you add a parallel darlington and sense resistor too. Then, every second or so, in the middle of the period when the PWM signal is at ground, you turn on the other darlington at "Temp" for a few microseconds and measure the voltage at "Sense". That way the sensing resistor doesn't have time to get hot, and you don't waste power through it in normal operation.

I've put the value of R3 as 1, but one wants to choose a value that will give about 3V at "Sense" when the heater is cold - probably about 3R3 - because the microcontroller A->D has a full range of 5V. The "Sense" voltage will drop as the heater gets hot and its resistance increases.

Labels: , ,

It may work, but a couple of problems I see are: -

Ni-chrome has a very low temperature coefficient, compared to other metals, so the resistance change over a few degrees is very small.

The temperature of the heater is higher than the barrel when it is on and lower when it is off due to the fact that whatever is used as an electrical insulator is not a very good thermal conductor.
Yes - you could be right. I just worked it out and you get a 1.5% reduction in the voltage at the sense connection for a 130 deg C change in temperature. You could put that into an op amp with an offset pot on the other input, but things are starting to get complicated...

On another matter - did you leave a big brolly at Cheltenham. If so, I've saved it for you :-)

If not, I've stolen someone's umbrella :-(
No it wasn't brolly weather while I was there so it looks like you did steal it!

I get a resitance change of about 10% over that range http://hydraraptor.blogspot.com/2007/09/equations-of-extrusion.html

So for 1 degree change you are looking at about 0.1%, which is not trivial to measure. You would also have to measure the voltage across the heater as well as the current because the Darlington will change as it gets warm and also the PSU may vary by a few %.
I thought it might be good to compare it with the current solutions:

For the comparison N is the method using the Ni-chrome as the temp sensor, T is the method using a thermistor as the sensor and C is the method using a thermocouple.

Accuracy/ease or reading:
N - Approx 3mv per degree
T - Approx 20mv per degree
C - Approx 10mv per degree
(All are non-linear and so the voltage change is just an average).

N - 1000C+
T - Up to 170C?
C - Up to 1250C with Type K

N - Tip110 and a resistor.
T - Thermistor, capacitor, resistor.
C - Thermocouple, AD595, resistor.
Each of the solutions requires only 2 to 3 components.

N - Medium cost, good availability.
T - Low cost, excellent availability.
C - High cost, specialized component needed.

As long as the temperature is within the range of the thermistor it is the clear winner on simplicity, cost, availability and even ease of reading.

Above 170C it is closer than I expected between the Ni-chrome and the thermocouple. The thermocouple is easier to read/more accurate but the Ni-chrome is cheaper and more available.

I guess we need to know how accurate is good enough and how accurate the Ni-chrome resistance method could be, without sacrificing its cost and availability advantage.
The thermistor is fine up to 300C if you use one rated to that tempearture and use an ADC rather than the RC method.
What plastics would we need temperatures above 300C for?
PET (Polyethylene terephthalate)?
yup, the thermistor that we use with the Temperature Sensor v1.1 is rated for up to 300C. I wouldnt run it past 250C though. Thats plenty for what we need to do, thats for sure.
The current limiting factor is the PTFE insulator. It goes soft around 250C and gets nasty above 300C.

It would be nice to be able to go a bit hotter to have a go PP, PVC, PET and PS.

If I remeber correctly these all have higher melting points than HDPE and we have to extrude at roughly twice the meting point minus ambient.
Brilliant, Adriaan! I'm just beginning to build the extruder for Tommelise 2. I'm going to try this idea out. :-D
Another idea is to use a current sensing FET instead of the darlington.

It cut me off.


You'd still need an Opamp or two. Hmmm... may not be accurate enough, though, as per IRF


accuracy is only 5%
What about using a diode as a temperature sensor? The forward biased voltage across a diode has a linerarish temperature coefficient of about 2.3mV/°C.

Vik :v)
I haven't seen a diode with a max junction temperature bigger than 200C. Generally 125C or 175C.
Actually, we don't need fabulous accuracy. 5% would probably do.
5% is probably OK for building objects on Balsa but when making objects on peelable rafts I think you need it more accurate than that to control the weld strength.
Why is a thermocouple a high cost device? You can make a thermocouple from iron and copper wire:

More thermocouple info is at:

I don't know if a copper with iron thermocouple is linear, but if it ain't that could be compensated for in software.
If diodes can go up to 175, that's enough for the PLA and CAPA extruders.

I'm using thermistors rated to 125C, stuck out on a brass tab. As long as I have a system that regulates to a working temperature, that might be good enough - particularly where thermistors and thermocouple drivers are in short supply.

Vik :v)

I've been lurking here for a while.

I think the temperature sensing transistor in this circuit should be below the sense line and 1 ohm resistor so it operates as a common emitter.

Also if you created an identical circuit to this with a 10ohm pot instead of the heater and only ran it when measuring the temperature you would have two sense lines and could connect them to a comparator or difference amplifier. This way you wouldn't have to worry about fluctuations in the input voltage.

What do you think?
Actually if you want to do ground reference sensing you should use a MOSFET of adequately low on resistance (on the order of .01% of the heater resistance or less).

The reason for the MOSFET is to avoid base current contamination of your signal.

Also a 24 bit AtoD would probably be a good choice in this spot. If you sampled 20 times a second and fed the results into a PID loop you should be able to get very good temperature control.

Or you could sample at 200 times a second and average to reduce noise.

If you used the thermistor as a feed forward element in your PID loop you should be able to get very tight control.

As to high temp diodes - SiC might do the trick. I'm not familiar with the VI curve vs temperature but Cree (who makes SiC LEDs too) should be able to help with that.
Also you will want to measure heater supply voltage at the same time you measure the current.
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to
Posts [Atom]