Welcome! Log In Create A New Profile

Advanced

Hot End Thermistor Issues

Posted by hornbyben 
Hot End Thermistor Issues
March 11, 2014 09:19AM
Hi,

I have assembled and been succesfully printing with a new ormerod printer from RS. However, one issue that I have been having is with the hot end thermistor.

If I turn the printer on it reads -273K on the software. This obviously indicates that it thinks the temperature is below -30°C. I have checked the thermistor and there are no short circuits or wiring issues. At room temperature (~18°C) the thermistor has a resistance of ~141kOhms. The resistance decreases as it is heated up, and if I warm it up for 20 seconds with a hair dryer and restart the printer the software registers a temperature. I can then set it to heat up, where it holds the temperature with no issues and I am getting good print results.

Does this indicate that I need a new thermistor, or is there a way to modify the firmware so that the resistance reading where it thinks there is a problem is lower? I am currently using DC-42s 057q firmware version. Sorting this would make it much more convenient, as it is a bit of a pain having to warm it with a hair dryer whenever I want to print.

Thanks,

Ben
Re: Hot End Thermistor Issues
March 11, 2014 09:29AM
At exactly 141K you should get a reading of about 17.7C using my 057t-dc42 firmware, or 18.6C using older firmware that runs the ADC in 10-bit mode. So your thermistor appears OK, but either there is leakage to one of the thermistor connections, or something is not quite right with your Duet board. If it's that the 1K reference resistor is (a long way) out of tolerance, then you can pretend to the Duet that your thermistor has a different resistance. To do this, send the command M301 Rxxx (where xxx is the value in ohms you want) using my 057t-dc42 firmware.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues
March 11, 2014 10:10AM
I've has a similar issue with two duets (see [forums.reprap.org]) and have just this minute tested the one that would require heating if the ambient dropped below 15 or so (ie first thing in the morning), on the back of this thread - [forums.reprap.org] (reading down from this link gives some info on the thermistor and measurements that may be useful, as well as a very helpful spreadsheet from dc42) , using dc42's spreadsheet, I plugged in series R's until I got temperatures to match (ie I increased the series resistance value to around 2500, so that the T 13-bit for a resistance of 99900 matched the value that the duet was giving out), then I bit the bullet and measured the resistance of the series resistor directly to see if it was wrong, unfortunately it isn't (R19 is 990ohms as is R21, the series resistor for the bed - the bed circuit works correctly), so I guess there must be some stray leakage elsewhere, or something up with the adc on the hotend pin on that board. C18 and C19 decouple the two thermistors, and these both give the same serial resistance on my multimeter (1.95k), the high side of both series resistors are at 3.271V with no thermistor connected - connecting 9850ohm resistor to EO_TEMP gives a voltage of 2.975 at the divider, connecting the same resistor to BED_TEMP also gives a voltage of 2.975, 680 ohm gives 1.326 and1.326 so it doesn't look like the error is in the voltage divider unfortunately (at least on my board) - I'll try a blast of isopropanol spray and see if dislodges anything... [edit - Update: same as before after a washing in isopropanol, for what it's worth - I'll try swapping the pins in firmware and see if the wrongness stays with the pin]


Ray

Edited 1 time(s). Last edit at 03/11/2014 10:45AM by rayhicks.
Re: Hot End Thermistor Issues
March 11, 2014 11:18AM
Ray, interesting results. However, I don't understand where you got the value of 2500 ohms series resistance from. If the temperature was reading below 25C with a 100K resistor in place of the thermistor, that implies to me that the Duet is behaving as if the series resistance is less than 1K, not greater.

It occurs to me that it would only take a few microamps of leakage from +12V or +5V to the thermistor live side to cause depressed temperature readings. A couple of questions for you:

1. Did you connect the 100K resistor directly to the Duet board pins, or were the hot end loom and 6-pin connector still in the circuit?

2. With the 100K resistor connected, does the reading change when you add or remove 12V power?

I'll do some tests on my board using some 3k9 0.1% resistors I have in the drawer. One thing I have noticed is that at room temperature, my hot end temperature readings have been much more realistic since getting rid of the 6-pin connector and installing 057t firmware - but unfortunately I didn't notice which of those made the difference. I used to see readings of about 5 or 11C, now I see 16.2C

Edited 1 time(s). Last edit at 03/11/2014 11:23AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues
March 11, 2014 12:03PM
Hi dc42 - I increased the series R in the spreadsheet until the calculated readout temperature in cell J11 (for a thermistor resistance of 99900) dropped to the same value my measured 99.9k resistor generated from the duet.

On the t3p3 duet I'm running solely from USB power (it's not connected to a machine), and I'm inserting the resistor directly into the the terminal blocks (a handy inclusion on the t3p3 board!) if there's leakage it's not showing up in the third decimal place on my multimeter

Both divider networks (bed and extruder) behave similarly as far as in-circuit resistances and voltage go, so I swapped the pin assignments in firmware and connected the test resistors to the bed input instead, and they behave very similarly when read through the bed network and pin, so it seems there's a systematic error with the ADC on this board, but that it doesn't manifest using the 10K bed thermistor (which has always agreed with external measurements on this board). I checked the ADVREF voltage at the junction between C64 and L5, and it reads the same as the voltage being fed to R19 and R21 (3.278V within 0.7% of spec - I wondered if the ADC range was being distorted by a problem on that line),

so I guess I should compare values on the "warranty" board with those on the t3p3 board - reading the resistance across the terminals for EO_TEMP on the t3p3 duet (with no thermistor resident) gives 1950ohms, on the warranty it gives 2015ohms, the t3p3 gives a voltage of 3.278 there when powered by usb, the warranty board gives 3.285 so not a dramatic difference. R19 and r21 on the t3p3 board are both 992 ohms - on the warranty board R19 is 999ohms and r21 is 990 so again not much to go on.

Ray
Re: Hot End Thermistor Issues
March 11, 2014 12:54PM
Hi,

Thanks for the advice.

I'll have a look at measuring the resistance where it meets the board on the board, and the reference resistor. If I can compensate with the M301 command, then that would be suitable, as I can always try printing with a few different temperatures to find the value that I need to set it to for good flow.

I know that the resistance measure at the end of the loom wires (i.e. at the plug you attach to the duet) was reading the same as the thermistor itself, but I haven't tried measuring it while attached to the board. If there is any leakage it must be from the +5V side, as I see the issue when the board is powered by the USB only, rather than the PSU.
Re: Hot End Thermistor Issues
March 11, 2014 12:58PM
I've just spotted a design issue that may affect the thermistor readings. The 1K reference resistors are connected directly to the 3.3V supply, however the VDDANA and ADVREF inputs to the chip are both connected to 3.3V via LC networks. So the voltage on VDDANA and ADVREF will be lower than the voltage feeding the 1K resistors by the voltage drop in the inductors. This will cause the thermistors to read colder.

Unfortunately I can't find a specification or part number for the inductors, so I can't work out the voltage drop. I may try to measure it, then it may be possible to allow for it by adjusting the ADC reading slightly.

It would have been better to connect the 1k resistors to ADVREF instead of to +3.3V.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues - POSSIBLE fix
March 11, 2014 01:55PM
One thing on the numbers I gave above - both bed and extruder networks gave 2.975 from 3.278 (as measured on my multimeter) when divided over 990:9850 (measured series resistance versus measured test resistance) - calculating the divided voltage from the ref and the resistor values, I make it (9850/(9850+990))*3.278 =2.979, which means that all of the meter measurements are in pretty good agreement. For a 13bit measurement, this would equate to ADC value 2^13*0.9086 or 7443, which should give a temperature readout from the duet of 84.5 (using the spreadsheet, plugging in 9850 gives an expected ADC value of 7437 and a temperature readout of 84.8).
The temperature readout from the duet is however 82.4 - which corresponds to an ADC reading of 7490, or a voltage of 7490/2^13*3.278 = 2.997.

Repeating the same measurements with the 99900 resitor - I get 3.276 currently for ADREF, 3.244 for the divider output as measured by meter, calculated from resistors and vref, it comes to 3.24385 (or 3.244 for short) exactly in agreement with the measured voltage, and validating to some extent the multimeter. This voltage should give an ADC output of 8112, which should give a temperature readout of 24.8 - however the duet is reporting a temperature of 7.50C - which equates to an ADC reading of around 8157.


Soooo, on a two point graph, this looks like a likely to be a fixed offset on the ADC readout: in the case of the 9850 ohm resistor, there's [EDIT]7490-7437 = 53 7490-7443=47 [/EDIT] channel offset, for the 99900 resistor there's a 8157-8112 = 45 counts offset - call it an average of 50, this would equate to a 6mV error (my meter readings don't seem to vary more than 0.2mV, and I'm not convinced that it's a problem with the actual voltage, it looks like a fixed error in the ADC (particularly since measuring the thermistor voltage at the same time as sampling the temperature over USB, the numbers disagree). I just compiled and (slightly) tested a firmware version and substracting the offset from the raw readout seems to work fine - Ben - if you've read this far, and you're interested in testing the fix, I can build you a hardwired firmware - I'll need to know what correction your board needs - which means you'll need to measure a resistor of around 10 to 100k, then disconnet you thermistor, and measure the voltage across the pins in the inline connector or on the bottom of the duet (this will be your vref), then connect the resistor across the pins (or more easily insert the legs into the middle two pins on the six pin connector, and measure the voltage across it (this will be the voltage that the ADC is trying to measure), lastly, I'll need the temperature that your host is reporting (pronterface etc) - you'll need to restart the duet after connecting the resistor, since it will have shut down the temperature monitoring when it detected an open circuit) - lastly, I'll need to know what firmware version you're using. If you do want a copy, it'll be based on dc42's 0.57n, and it won't work with iamburny's web interface, it'll be to test if the temperatures are reported correctly - if it works, maybe dc42 will be able to shoehorn in yet another parameter somewhere in the PID to allow insertion of an ADC offset correction...

Cheers

Ray

ps I'm off on a business trip tomorrow until Monday, so it'll have to be tonight unless dc42 steps insmiling smiley PPS I used the wrong ADC channel number in 10k resistor error calculation, it should have resulted in an error of 47, not 53, which corresponds closer still to the error of 45 using the 100k resistor

Edited 1 time(s). Last edit at 03/11/2014 06:42PM by rayhicks.
Re: Hot End Thermistor Issues
March 11, 2014 02:14PM
Quote
dc42
I've just spotted a design issue that may affect the thermistor readings. The 1K reference resistors are connected directly to the 3.3V supply, however the VDDANA and ADVREF inputs to the chip are both connected to 3.3V via LC networks. So the voltage on VDDANA and ADVREF will be lower than the voltage feeding the 1K resistors by the voltage drop in the inductors. This will cause the thermistors to read colder.

Unfortunately I can't find a specification or part number for the inductors, so I can't work out the voltage drop. I may try to measure it, then it may be possible to allow for it by adjusting the ADC reading slightly.

It would have been better to connect the 1k resistors to ADVREF instead of to +3.3V.

True dc42 - I buried this little nugget in one of my earlier posts:
Quote
rayhicks
I checked the ADVREF voltage at the junction between C64 and L5, and it reads the same as the voltage being fed to R19 and R21 (3.278V within 0.7% of spec - I wondered if the ADC range was being distorted by a problem on that line),
Checking again, ADVREF agrees to the last millivolt with the highend going to the 1k resistors, I don't see any drop over the inductor either. I calculated (see the crossing post above) that there's approximately a 6mV error between the actual voltage and the voltage that the ADC is reporting, or about 50 ADC counts at 13bits.
I checked a quick patch briefly on my t3p3 duet (based on your n version) I subtracted 6 from the raw 10bit ADC value after the open circuit check in platform::GetTemperature - and this seems to work (the board is reporting 23.5°C for the 99900ohm resistor and 84.8°C for the 9850 ohm, I've suggested above that Ben tries repeating my measurements on his and I can provide a quick and dirty firmware patch for him, if it works maybe you could incorporate it?

Cheers

Ray
Re: Hot End Thermistor Issues
March 11, 2014 06:12PM
And lastly... looking at the ADC specs for the SAM3X/3A series [www.atmel.com], tables 46-31 and 46-32 give the following offset error data:
12 BIT
Parameter         | Conditions                                              | Min |  Typ   |Max| Units
Offset error (Oe) | VDDIN 3.0V to <3.6V Single ended, DIFF=0, OFF=x, GAIN=xx| -30 |+11.5 |+56 |LSB
10 BIT
Parameter         | Conditions                                           | Min|Typ  |Max| Units
Offset Error      |all gain, Differential or Single ended, no calibration|-8  |+3  |+20  |LSB

This would fit with the offset I measured on the T3P3 ADC above - and the chip on some boards could be further out than mine and still be less than the Max spec (Ben's for instance) - there's no mention of a calibration procedure on the document I read, but I guess the one I outlined above will be useful. - Just modifying Beta or Series resistor values wouldn't help to solve these offsets (improving the match at one temperature would throw other temperatures off).

EDIT I've attached a modified version of dc42's thermistor spreadsheet, where I've added an optional offset, I've also set F9 to J19 to use this offset, and pasted non-offset versions in the cells below. The resistance values are approximations to those that should correspond with my ancient tabulation in the thermistor thread I started here [forums.reprap.org] - the upper block corresponds then to Tr and the lower block to Tm in my table in that post. while the lowe end temperatures agree very well with an offset in the ADC of around 45-50, it DOESN'T account for the high temperature discrepancy I observed, whether there's also a gain issue (which is likely from the data sheet), or there was a measurement error (which is also likely from my setup) isn't clear, but either of those would account for the apparent over-read in the table. Looking at responses to dc42's request for feedback on ambient hotend readouts [forums.reprap.org], I'd say that there is a general discrepancy due to an ADC offset, and Ben and I are at the extreme upper end where it can actually shut down printing at low ambients - it shouldn't affect the running temperature though, so there are two ways of addressing it in my mind, the easiest would be to change the lock-out temperature so that it's lower than can be achieved with a maximum offset from the spec sheet (somewhere higher than absolute zero, but lower than -30 : even a wild number like -250 would suffice to prevent false alarms while never ignoring a true disconnection), the other is to write a firmware mod that would allow a user to calibrate their ADC, calibrating the offset is fairly trivial for someone with a parts box and a DMM, I'm not sure about calibrating the gain, which also may be the solution to this thread:[forums.reprap.org] - I'd go for the calibration, but for just printing, the lower lock out change would be pretty effective/EDIT]

Ray

Edited 1 time(s). Last edit at 03/11/2014 08:11PM by rayhicks.
Attachments:
open | download - Thermistor3.xls (39 KB)
Re: Hot End Thermistor Issues
March 11, 2014 08:04PM
Ray, good catch. However, I've taken a look at the datasheet, and as well as an offset error of +11.5 typical, it quotes a gain error of -23 typical (both in 12-bit single-ended mode @ 3.0 to 3.6V). I believe this means that the error at the top end of the range (i.e. low temperatures) should be typically -11.5. See also Figure 46-13 on the datasheet. So the ADC reading will typically be be less than the ideal. This is in the wrong direction to account for the temperature under-reading that many users see.

Of course, these are just typical values, and actual chips might under- or over-read. I'm wondering whether I ought to implement a configurable upper-end offset adjustment in the firmware, saved to flash memory like the other thermistor and PID parameters.

I'm surprised that the SAM3X processor has such large errors. Even in 10-bit mode, the offset and gain errors are -8 to +20 LSB and -16 to +3 LSB respectively. The atmega and attiny processors I am more used to programming have offset and gain errors of just 2.0 and 1.5 LSB respectively. Given the offset and gain errors of the SAM3X, the extra 2 bits resolution in 12-bit mode will be useless in many applications.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues
March 11, 2014 08:25PM
Indeed dc42 - it's quite a wide tolerance 20 LSB is more than 4bits worth surely? quite a margin when you're only playing with tensmiling smiley - I was busy editing my last post (since I had said it would be my last post!) when you replied -I've used your spreadsheet to check the results I tabulated elsewhere, based on what i measured the offset on my t3p3 board to be, I also pontificated on how best to fix it, and whether the gain error may be to blame for problems in another thread

In the data sheet graphs they seem to show gain and offset as correlated parameters - I'm not sure that they would be though, or if they're just trying to show a "worst case" of max offset and least gain. It's be useful to have measured resistors and the measured voltage across them on the boards that seem to be over-reporting temperature, along with the open circuit voltage to compare.

There is discussion of calibration in this document [www.atmel.com], but for seemingly a different series of chip (atmel put it on the same page as the SAM3X though so it's probably relevant), it's not clear to me from my skimming of this who is meant to do the calibration (atmel or the manufacturer who uses their chips) - but they do describe a procedure and a mechanism for storing the result...

Ray
[EDIT - actually my head is bending from thinking about it now, butif the high offset chips DID have low gain, wouldn't that actually make them under-report low temperatures, as I modelled in your spread sheet and observed on my t3p3 duet (due to the offset), AND overreport high temperatures (due to the gain)? /EDIT]

Edited 1 time(s). Last edit at 03/11/2014 08:32PM by rayhicks.
Re: Hot End Thermistor Issues
March 12, 2014 04:25AM
Hi Ray,

I will repeat your measurements, but unfortunately I don't have any resistors at the minute. I'll see if I can borrow a few from work and get back to you. I measured r19, which gave some interesting results. With the multimeter set to 20k I get 0.98kohms, but when set to 2k I get 0.889 with the multimeter leads one way round and 0.789 the other way round. I suspect it's probably either an issue with the multimeter or a result of the electricity flowing elsewhere in the circuit. These measurements were done with no power going to the board.

Thanks again for all your help,

Ben
Re: Hot End Thermistor Issues
March 13, 2014 04:59AM
Hi,

I've had a chance to do what you said Ray. I did this at a few different resistances.

Resistance / ohms, vref / V, Temp Registered / C
99800 ; 3.27 ; -2.4 (fluctuating to 3.6) - on USB power
82000 ; 3.26 ; 12.3 (fluctuating to 12.4) - on USB power
10960 ; 3.25 ; 78.6 - on USB power
10960 ; 3.30 ; 78.6 - on mains power

I'm currently using firmware 0.57q-dc42, but I don't know if this is the same issue you have, as the temperatures seem to be quite accurate once it is heating (see below).

I also tried looking at the effect of putting fixed resistors in place of the thermistor and looking at the temperature reading in pronteface.

Resistance / ohms , Temp / C
99800 ; -2.4
82000 ; 8.4
9980 ; 81.4
6760 ; 94.6
990 ; 172.3
119.3 ; 303

Lastly I put a thermocouple into the extruder head and compared the difference between the set temperature and measured.

Set Temp / C , P'face Temp / C , Measured Temp / C
100 ; 99.7 ; 106.5
150 ; 149.4 ; 154.8
175 ; 174.2 ; 177.8
200 ; 199.1 ; 200.5
205 ; 204.2 ; 205.3
250 ; 249.5 ; 245.6

So although my setup requires warming on a cold morning, it appears to be measuring the temperature reasonably accurately at extrusion temperatures. DC42, is there any way, using your firmware, to set the thermistor error cut off point to a lower temperature, e.g. -100 rather than -30?

Thanks,

Ben
Re: Hot End Thermistor Issues
March 13, 2014 05:42AM
Quote
dc42
I've just spotted a design issue that may affect the thermistor readings. The 1K reference resistors are connected directly to the 3.3V supply, however the VDDANA and ADVREF inputs to the chip are both connected to 3.3V via LC networks. So the voltage on VDDANA and ADVREF will be lower than the voltage feeding the 1K resistors by the voltage drop in the inductors. This will cause the thermistors to read colder.

Unfortunately I can't find a specification or part number for the inductors, so I can't work out the voltage drop. I may try to measure it, then it may be possible to allow for it by adjusting the ADC reading slightly.

It would have been better to connect the 1k resistors to ADVREF instead of to +3.3V.

+1 to the list of Duet improvements then. It all gets a bit crazy though for off-board analogue sensors like the IR Z probe - the LED should be connected to VSS and VDD while the phototransistor should connect to VSSA and VSSD. Indeed, the LED should be driven from a constant current source to prevent VDD modulating the signal. Crazy analogue. eye rolling smiley


RS Components Reprap Ormerod No. 481
Re: Hot End Thermistor Issues
March 14, 2014 08:40PM
Hi Ben,

it looks like your resistor data would fit with having a more extreme offset than my board (somewhere around 8 LSB o on 10 bit) I've plugged it into a modified version of dc42's spreadsheet that produces the expected ADC readings (with the addition of an offset), below is the data for when the offset is 65 /8 LSByou can see the 10 bit data matched your temperature readout quite closely.

R    ADC10b  ADC13b  T10-bit T13-bit
99800	1021.3	8170.7	-2.3	-1.0
82000	1019.2	8153.3	8.6	9.9
9980	938.2	7505.9	81.8	81.9
28000	996.2	7969.5	48.8	49.1
6760	899.5	7196.3	95.0	94.9
990	516.9	4135.4	172.7	172.6
119.3	116.6	933.1	300.7	300.6

My board behaves in this way too, I think my "overreading " at high temps was an artefact of my measuring system.

Cheers

Ray
Re: Hot End Thermistor Issues
March 14, 2014 09:14PM
I have a firmware build that lets you adjust the offsets at both the high and low ends, but I haven't had time to test it yet. I should get time on Sunday.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues
March 16, 2014 04:36PM
Thanks dc42. I'd be happy to give it a try if you get one working.

With the slightly warmer weather it's working ok. I did get a hair dryer for less than £4 at Argos, so that now lives with the printer as a back up option for cold mornings.

Thanks,

Ben
Re: Hot End Thermistor Issues
March 17, 2014 08:20AM
Hi Ben, see [forums.reprap.org].



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Hot End Thermistor Issues
March 18, 2014 09:09AM
Thanks DC42.
Sorry, only registered users may post in this forum.

Click here to login