Pt100 Offset adjustment with M308 command
-
Hi,
I would have a question related to the offset value of my Pt100 sensors, attached on Duet 3 MB6HC 3.5.0-rc.3 firmware. I have +1C deg offset value in my sensor from which I would like to get rid off. Also, I have some small noise, which increases at high temperatures to approx. 1C variance between the target.
With the gcode instructions it is said that I should add Uu, Vv. I assume that I should place U-1 (for offset removal), but this didn't make any change to my temperature reading. Also, does this V (slope adjustment parameter) affect the noise?
I did not find an example on how to write the M308 command with those Uu and Vv, so it would be great to have instruction on that.
Br, Heidi
-
Uu, Vv (RRF 3.5 and later, optional, default zero) Temperature reading offset and slope adjustment parameters. The temperature in °C read from the sensor is adjusted as follows: adjustedReading = (rawReading * (1.0 + v)) + u
Here is the formula, I've asked DC42 for an example on it's usage.
-
Say you have a temperature sensor part way between a heater and the nozzle and you have verified that it reads 250C, when the nozzle temperature internally is only 240C. You may want to report this temperature in the UI or otherwise as 240C, not 250C. Let's also say that your room temperature is 20C, and you wantgthe difference between measured temp and reported temp to be 0C at room temperature.
We now have the values needed to calculate the U and V coefficients to this command.
It's of the form "y=mx+c" where
Using the values above:
Zero Difference Temp = 20C
Sensor Temp= 250C
Display Temp = 240CV = (Display Temp-SensorTemp)/(Sensor Temp-Room Temp) = (240-250)/(250-20)=-0.0435 U = -(RoomTemp*V) =-(20*-0.0435) = 0.8696
This can be seen in this graph:
If you want a positive offset then your display temperature will be higher than your sensor temperature (for example if your temperature sensor was insulated from the nozzle&heater).
-
@HeidiH this facility was added after we released rc3 so you will need to use one of the later firmware builds.
-
@dc42 @T3P3Tony @Phaedrux Thank you all for your help.
I had tried to modify the formula that was given for the M308, which Phaedrux instructed but I didn't understand it sufficiently to get it working. However, based on instructions on T3P3Tony I now got the point better and am now able to make the required modifications.
I would like to double check, that dc42 meant that my 3.5.0-rc.3 firmware version is not the latest release? I checked the version from https://github.com/Duet3D/RepRapFirmware/releases and it seems that this should be the latest?
-
Please try the version linked here, or wait for rc4 which we will release today hopefully!
https://forum.duet3d.com/topic/35366/latest-3-5-post-rc3-firmware-builds/2
-
@HeidiH we hope to release rc4 later today or tomorrow. Meanwhile there are unofficial builds at https://www.dropbox.com/scl/fo/6afk7iewlw1ycldb8dc4u/h?rlkey=21rm8jcz6aqy3gh523wkmxro7&dl=0.
-
@T3P3Tony and @dc42 Thank you for your clear presentation on how to modify those values. I did my corrections accordingly. However, I noticed that with another of my heaters the U and V values were ok to be added on the configuration file. However, with the another the values were such, that I received an erraneous temperature reading of N/A on the web interface and 2000Cdeg on the user interface panel.
The temperature values for the two Pt100 sensors have the following correction coefficients U and V:
Sensor 1 -> showing reliable results
U-0.00332
V0.066408Sensor 2 -> showing the error
U-0.01662
V0.332326What could cause the problem with the another sensor?
BR, Heidi
-
@HeidiH if you do not have the U and V parameters defined for Sensor 2, does it work as expected?
is this the adjustments you expect at 200C and 20C ?
-
@T3P3Tony Hi, and my apologies for the late reply. I repeated my measurements and got a bit more accurate values for the U and V based on those. I now added them in place and neither of the sensors was anymore showing any error, so I think that I might have mixed up with the U and V values. I ensured that the readings now also improved a lot, when using those correct U and V values. So thank you for these parameters for the developers :)!