Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Pt100 Offset adjustment with M308 command

    Scheduled Pinned Locked Moved
    General Discussion
    4
    10
    321
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • HeidiHundefined
      HeidiH
      last edited by

      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

      T3P3Tonyundefined dc42undefined 2 Replies Last reply Reply Quote 0
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        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.

        Z-Bot CoreXY Build | Thingiverse Profile

        1 Reply Last reply Reply Quote 0
        • T3P3Tonyundefined
          T3P3Tony administrators @HeidiH
          last edited by T3P3Tony

          @HeidiH

          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 = 240C

          V = (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:
          1000022072.png

          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).

          www.duet3d.com

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @HeidiH
            last edited by

            @HeidiH this facility was added after we released rc3 so you will need to use one of the later firmware builds.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            HeidiHundefined 1 Reply Last reply Reply Quote 0
            • HeidiHundefined
              HeidiH @dc42
              last edited by

              @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?

              T3P3Tonyundefined dc42undefined 2 Replies Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators @HeidiH
                last edited by

                @HeidiH

                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

                www.duet3d.com

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators @HeidiH
                  last edited by dc42

                  @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.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  HeidiHundefined 1 Reply Last reply Reply Quote 0
                  • HeidiHundefined
                    HeidiH @dc42
                    last edited by

                    @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.066408

                    Sensor 2 -> showing the error
                    U-0.01662
                    V0.332326

                    What could cause the problem with the another sensor?

                    BR, Heidi

                    T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                    • T3P3Tonyundefined
                      T3P3Tony administrators @HeidiH
                      last edited by

                      @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 ?

                      015df80f-7b43-4313-b1c8-154785298607-image.png

                      www.duet3d.com

                      HeidiHundefined 1 Reply Last reply Reply Quote 0
                      • HeidiHundefined
                        HeidiH @T3P3Tony
                        last edited by

                        @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 :)!

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA