Welcome! Log In Create A New Profile

Advanced

Thermistor calibration problem

Posted by wifiBeagle 
Thermistor calibration problem
October 08, 2016 12:21PM
I have printed a few things with my new Duet v0.8.5 on my Monoprice IIIP. The hot end temperature seemed to be reading low based on performance and an IR temperature gauge. So I tried setting the M305 H & L parameters. Using a 100K 1% resistor in place of the thermistor a H value of -22 resulted in 25DegC. A 220 Ohm 1% resistor resulted in a temperature of around 280C. I had to input large negative L values to get close to 260C. Going back to the 100K resistor I got around 66C. Changing H impacts the reading but huge negative values would be required to get anywhere close to 25C. Switching to the 220 Ohm resistor results in a reading over 7200C! Thinking something got set somewhere I can't see I flashed to 1.15e. It did not help. I'm still seeing bed and E0 temperatures of 66 & 64C with H & L =0 at an ambient temperature of 22.5C.

Sending M305 P1 after a reset returns T:100000.0 B:3950.0 R:4700.0 L:0.0 H:0.0 X:1 (same as config.g)
M305 P0 returns the same with X:0

What am I doing wrong?

John
Re: Thermistor calibration problem
October 08, 2016 01:31PM
See if anythng here will help: [duet3d.com]

Edited 1 time(s). Last edit at 10/08/2016 01:31PM by stephenrc.
Re: Thermistor calibration problem
October 08, 2016 01:48PM
It sounds to me that the B value you are using in the M305 P1 command does not match the thermistor in the hot end. What do you know about that thermistor?

The temperature reading to expect when you substitute a 220 ohm resistor depends on the B va!ue you specify.

Edited 1 time(s). Last edit at 10/08/2016 01:50PM 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: Thermistor calibration problem
October 08, 2016 04:12PM
With no changes to the hardware or wiring the 100K resistor temperature reading went from near 25C to ~66C after adjusting H & L. The changes were made via the web interface (v1.12). The config.g file M305 gcode line still has H & L =0. This was at 1.15c. No change after reset, power cycling or flashing to 1.15e. According to the link below the thermistor Beta is 3950. This seems like a software issue as the problem occured after I entered a large negative value for L via the web interface (around -300). I am able to get 25.4C with the 100K resistor and H=-1190 and 260.3C with the 220 Ohm resistor and L=-439. Based on what I have read both H & L should be within +/-100. Before I started messing with H & L both were zero and the 100K resistor yielded within ~1C of ambient. The first time I checked the reading with the 220 Ohm resistor H was -22 and L=0 and the reading was ~280C. After adjusting L to get near 260C my problem began.

The only changes have been to the H & L values made through the web interface. After reconnecting the hotend thermistor the reading is ~25C vs a ~23C ambient with the large negative H & L from above. The bed temperature reads ~64C. I have not touched the bed termistor wiring or the P0 H & L values.

[3dprinterwiki.info]

I selected the closest resistors to the desired value from my inventory measured with a BK Precision Model 2833 4-1/2 digit meter. Both were within 0.2%.

I am confused...

John
Re: Thermistor calibration problem
October 08, 2016 08:42PM
Have you measured the thermister at the connector, to make sure it has the expected resistance?.
Re: Thermistor calibration problem
October 09, 2016 03:01AM
The normal range for H and L values is about -60 to +60. If you are certain that your thermistor is reading low at high temperatures then its B value over the temperature range of interest must be higher than 3950. Your best option is to heat the hot end to a known temperature using e.g. a thermocouple as a reference, then measure the thermistor resistance and work out the B value from that. Or if you know what resistance vs temperature table was giving you good results before, pick the resistance at about 220C from that table. There are online calculators that will give you the B value given the resistance at two temperatures, including one in the config tool at [configurator.reprapfirmware.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: Thermistor calibration problem
October 09, 2016 09:21AM
First, thank you for your help and suggestions. It is clear I need help...

I fear I may not have clearly described my dilemma. There is nothing wrong with either of my thermistors. They both read a little over 100K at 23.5C. Neither thermistor mysteriously changed its behavior just because I changed the M305 H & L values on the Duet. Before adjusting H & L values from zero the duet read within a degree or so at ambient and maybe 10-20C high at 200C based on nozzle oozing and an IR thermometer. Now with the same zero values for H & L the readings are WAY off. I read mid 60's at ambient with the thermistor connected or with a 100K resistor and over 7000C with a 220 Ohm resistor. Something has changed with the Duet calibration. Neither the thermistors nor the resistors have changed their behavior. Why do I get such different results at H & L=0 before and after entering large negative values for L?

Before changing L from its initial zero value the 220 Ohm resistor yielded a reading of ~280C. Now with L=0 the reading is ~7200C (yes over seven thousand). The 220 Ohm resistor did not change its value but the Duet has definitely changed its behavior. Why? What can I do to correct the calibration? Did changing the H & L values somehow damage the Duet? How? Is there something stored in non-volatile memory that survives resets and flashing new firmware? If so, how do I reset to the factory default values?

John
Re: Thermistor calibration problem
October 09, 2016 09:30AM
The H and L values can get saved to non-volatile memory, but those saved values will only be used if you do not have explicit values in the M305 commands in config.g. Do your M305 commands include H0 L0 parameters explicitly?

You can run M305 P1 to find out what values are currently being used.

Edited 1 time(s). Last edit at 10/09/2016 09:31AM 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: Thermistor calibration problem
October 09, 2016 11:33AM
Here's the thermistor section from my config.g and the results of M305. The attached file is a screen snip of the temperatures with a 100K resistor installed in place of the extruder thermistor (E0 59.4C / Bed 57.7C). The bed thermistor has been connected throughout my testing. I have never adjusted the H & L values for P0 or P2.

M301 H1 returns the PID settings in config.g so I believe the file is being read correctly.

I would expect the reading to be very stable when connected to the 100K resistor. As I have typed this message the P1 reading has varied from 58.9 to 61.0 while P0 has only varied about 0.4C.

I'm out of ideas...

From config.g
; Heater and thermistor section
;*** If you have a Duet board with 1K thermistor series resistors, change R4700 to R1000 to the following M305 commands
M305 P0 R4700 T100000 B3950 H0 L0 ; Put your own H and/or L values here to set the bed thermistor ADC correction
M305 P1 R4700 T100000 B3950 H0 L0 ; Put your own H and/or L values here to set the first nozzle thermistor ADC correction
M305 P2 R4700 T100000 B3950 H0 L0 ; Put your own H and/or L values here to set the second nozzle thermistor ADC correction

M305 P1 returns T:100000.0 B:3950.0 R:4700.0 L:0.0 H:0.0 X:1

John
Attachments:
open | download - Heaters.JPG (15.7 KB)
Re: Thermistor calibration problem
October 09, 2016 01:07PM
I agree, the reading should be very stable with a 100K resistor connected, and with zero H and L it should be within about 5C of 25C. Do all 3 heater channels show a reading around 60C with the 100K resistor connected to that channel? If so then it sounds as though the ADC on the processor isn't working properly,

However, at this stage I don't want to rule out the possibility of an obscure firmware bug. The default thermistor series resistors are 1K for the wired Duet build of RepRapFirmware. It so happens that if you use a Duet with 4.7K series resistors (which includes all Duet 0.8.5 boards) and you don't override the default by putting R4700 in the M305 commands in config.g, you get readings of about 60C. So I would be interested to know what readings you get if you use the 100K resistor but you comment out the M305 lines in config.g.

The H and L parameters don't affect how the chip is programmed, they just affect how the firmware interprets the ADC readings.



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: Thermistor calibration problem
October 09, 2016 02:12PM
I commented out the M305 Lines in config.g and reset the Duet.

M305 P1 returns T:100000.0 B:4138.0 R:1000.0 L:0.0 H:0.0 X:1
M305 P0 returns T:10000.0 B:3988.0 R:1000.0 L:0.0 H:0.0 X:0
M305 P2 returns T:100000.0 B:4138.0 R:1000.0 L:0.0 H:0.0 X:2

M105 returns T:105.3 B:38.7

I connected the 100K resistor directly to the Duet terminals, M105 returns T:104.9 B:38.4
With nothing connected to the P1 input M105 returns T:102.9 B:38.3
With the 220 Ohm resistor connected directly to the P! input terminals I get "Error: Temperature reading fault on heater 1: short-circuit in sensor". M105 returns T:B:38.1

I can write a simple Arduino sketch to read the raw inputs for the ADC channels used by the Duet. Would that help diagnose the problem? What channels are used by P0, 1 & 2?

Thanks again for all your help.

John
Re: Thermistor calibration problem
October 09, 2016 06:56PM
You can find the corresponding Arduino analog pin numbers at line 57 of [github.com].

To test the ADC you could also feed 0 to 3.3V into the Z probe input with the Z probe type set to 1 in the M558 command. The Z probe reading on the web interface should vary linearly from 0 to 1023.

Edited 1 time(s). Last edit at 10/09/2016 07:00PM 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: Thermistor calibration problem
October 10, 2016 08:19PM
I won't be able to test anything until friday or Saturday. The Z probe test sounds easier. Thanks again.
Re: Thermistor calibration problem
October 15, 2016 10:03AM
I have connected a 20K pot to the Z probe input. 3V3 and ground with the wiper to AD12.

AD12 Pin Voltage ... Z Probe Reading
3.275 ..................... 767 steady
3.064 ....................~765-767 bouncing
3.000 ....................~702-709
2.501 ....................~208-213
2.303-2.304 ...........~6-8

from config.g
; Z probe section
M558 P1 X0 Y0 Z0 H3 F200 T5000 ; Smart IR Z probe, used for homing Z axis, dive height 3mm, probe speed 200mm/min, travel speed 5000mm/min
;G31 X11.0 Y0.5 Z1.20 P500 ; Set the probe height and threshold (put your own values here)

The heater 1 temperature now reads 125.8-125.9 with the 100K resistor installed.

There seems to be some analog input calibration in place that overrides the values in M305's default. M305 is commented out in config.g.

M305 P0 returns T:10000.0 B:3988.0 R:1000.0 L:0.0 H:0.0 X:0
M305 P1 returns T:100000.0 B:4138.0 R:1000.0 L:0.0 H:0.0 X:1
M558 returns Z Probe type 1, dive height 3.0mm, probe speed 200mm/min, travel speed 5000mm/min, used for these axes:

I still believe the hardware is functioning as designed. I have made no changes to the hardware except substituting resistors for the Heater 1 thermistor and adding the pot to the Z probe input. The Z probe input responds to voltage changes but not with the calibration expected.

Any suggestions?

John
.
Re: Thermistor calibration problem
October 15, 2016 01:15PM
Those Z probe readings are far from normal. Unless you are running very old 1.09 series firmware which had a known crosstalk issue between channels on the Duet 0.8.5, I think the processor on your board has developed a low resistance between the ADC input and ground. You need a replacement board or a replacement processor on your existing board.

What firmware version are you running? [Edit: from your first post I see that you are running 1.15e so it isn't a crosstalk issue.]

Edited 1 time(s). Last edit at 10/15/2016 01:17PM 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: Thermistor calibration problem
October 15, 2016 02:27PM
Not what I wanted to hear but not a surprise either. Thank you for all your help in troubleshooting this problem. I will contact Filastruder to investigate my options.

I suspect I will need to adjust the M305 H & L values when I get a functioning Duet board. Any suggestions for a calibration procedure to avoid a repeat of my current problem? I have no idea how I might have created the low resistance between the ADC input and ground.

John
Re: Thermistor calibration problem
October 15, 2016 03:49PM
There is a Duet user and electronics engineer in the USA who can do processor replacements. I expect Filastruder will put you in touch with him.



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: Thermistor calibration problem
October 15, 2016 04:03PM
One other question: can you see any sign of charring or damage to the component labelled L7, located near the microcontroller? If it has gone open circuit then that might possibly cause this type of problem.



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: Thermistor calibration problem
October 16, 2016 08:08PM
No signs of any discoloration anywhere on the board. An earlier version of the firmware showed the processor temperature. It seemed to run in the low 40's. While printing (before changing M305 H & L) the processor was by far the warmest thing on the board based on a simple finger test. That is still true.

Would the ADC be susceptible to static discharge? I did not think to wear a ground strap while changing the thermistor test resistors. The humidity in my shop was 50-55% at the time so I wouldn't have expected static to be a big issue.

John
Re: Thermistor calibration problem
October 17, 2016 02:54AM
In theory the ADC could be susceptible to static discharge, but in practice the built in protection diodes do a good job. The thermistor inputs have RC filters that will provide extra protection. I'm not sure about the Z probe input on the 0.8.5.

Edited 1 time(s). Last edit at 10/17/2016 02:55AM 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: Thermistor calibration problem
October 21, 2016 04:09PM
Quote
dc42
... put you in touch with him.
i am interesting too ...


Delta Printer
Duet 0.8.5 firmware 1.19
Re: Thermistor calibration problem
October 23, 2016 11:57AM
Update:

I have received a replacement Duet. Initially I installed my old SD card in the new Duet and powered it up after verifying all connections. H1 reads 57.5C and the Bed 5.2C at an ambient of about 23C. I then replaced the old SD card with the new one changing only the IP address to avoid a conflict. With the new card in place H1 reads 23.2C and the Bed 22.8C.

With the new card in place:
M305 P0 returns T:100000.0 B:3950.0 R:4700.0 L:0.0 H:30.0 X:0
M305 P1 returns T:100000.0 B:4388.0 R:4700.0 L:0.0 H:30.0 X:1

I have not reconnected the old board with the new SD card but I'm tempted.

I have attached the sys folder from my old SD card for reference. The new board is at 1.15c and Web 1.12. The old board is 1.15e and Web 1.12.

Starting from scratch I copied the www and sys-Prusai3 folders onto a spare freshly formated SD card. I edited the config.g file for my Monoprice version. Starting the Duet with this card H1 & the Bed read a little below ambient. After installing the 100K resistor on H1 I adjusted M305 H to 33 to get 25.0C. Replacing the 100K resistor with a 220 Ohm resistor yielded a 285.1C reading on H1. At this point things were feeling all to familiar so I stopped. I have made no adjustments to M305 L.

At this point I'm researching other resistance vs. temperature values for my thermistor so I can test the readings at values between 100K and 220 Ohms.

John
Attachments:
open | download - sys.zip (40.8 KB)
Re: Thermistor calibration problem
October 23, 2016 01:44PM
I think I'm getting closer to understanding what happened with the original Duet board.

I found a calibration procedure at the following link [forums.reprap.org]

It suggested using 100K and 220 Ohm resistors for calibrating the Duet A/D. The referenced temperature in the procedure for the 220 Ohm resistor was 260.1C. I failed to check if that temperature applied to the thermistor in my printer. Further research reveals for my 100K 3950B thermistor the temperature should be 280.9 (if my math is correct). In an effort to force the reading to 260 vs 280+ I entered very large negative values for M305 L. I was never able to recover after that.

With the new board I was able to achieve 25C at 100K and ~280.8 at 220 Ohms with H=34 and L=-20.

Back to printing!

Thanks for all the help. I'd be lost without it!

John
Re: Thermistor calibration problem
October 23, 2016 02:00PM
Quote
wifiBeagle
I think I'm getting closer to understanding what happened with the original Duet board.

I found a calibration procedure at the following link [forums.reprap.org]

It suggested using 100K and 220 Ohm resistors for calibrating the Duet A/D. The referenced temperature in the procedure for the 220 Ohm resistor was 260.1C. I failed to check if that temperature applied to the thermistor in my printer.

I pointed that out earlier in this thread that the expected temperature reading with a 220 ohm resistor depends on the thermistor B value, here [forums.reprap.org].

The config.g file in your old SD card image has all the M305 commands commented out. That means the firmware will assume 1K series resistors instead of 4.7K, and a 10K bed thermistor instead of 100K. Which explains why the temperature readings were out when you used the old SD card with the new board.



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].
Sorry, only registered users may post in this forum.

Click here to login