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

Help with non standard temperature sensor config

Scheduled Pinned Locked Moved Unsolved
Tuning and tweaking
3
6
548
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.
  • undefined
    Pete_A
    last edited by Pete_A 10 Jun 2019, 09:26 6 Oct 2019, 09:23

    G'day Folks,

    I am interfacing a Duet expansion connector to pre-existing printer hardware and need some help with the temperature sensors.

    Specifically, the hardware uses thermocouples and has its own signal conditioning which presents the Duet temperature pin with 6.6mV / degree C.

    I'm not sure how to set up the G code to make it work. I also need to figure out how to reassign the temperature pins from the expansion connector to be read as E0, E1 and bed temperature sensors.

    I am currently running RRF3 firmware.

    Any help greatly appreciated.

    Pete

    undefined 1 Reply Last reply 6 Oct 2019, 22:03 Reply Quote 0
    • undefined
      T3P3Tony administrators @Pete_A
      last edited by 6 Oct 2019, 22:03

      @Pete_A said in Help with non standard temperature sensor config:

      Specifically, the hardware uses thermocouples and has its own signal conditioning which presents the Duet temperature pin with 6.6mV / degree C

      The easiest way will probably to use the themocouple daughter-board:
      https://www.duet3d.com/TC_K_DaughterBoard

      In RRF 3 you would reference the pins as described here:
      https://duet3d.dozuki.com/Wiki/RepRapFirmware_3_overview#Section_M308_Create_or_modify_sensor_or_report_sensor_parameters, e.g:

      M308 S2 P"spi.cs1" Y"thermocouple-max31856"; define temperature sensor number 2 as a default, K Type thermocouple on the first port of a temperature daugher board plugged into the Duet 2.
      

      Alternatively you might be able to get get away with the "linear-analog sensor type with the existing thermocouple interface, I have never tried that.

      www.duet3d.com

      undefined 1 Reply Last reply 7 Oct 2019, 01:05 Reply Quote 0
      • undefined
        Pete_A @T3P3Tony
        last edited by 7 Oct 2019, 01:05

        @T3P3Tony Thanks Tony, I appreciate your taking the time.

        I had started looking a the analog-linear G-Code and I suspect this is the way I will need to go.

        Achieving a direct connection between the existing thermocouples and the Duet thermocouple daughter board isn't going to be achievable; one of my design constraints is I must be plug compatible with the existing chassis and I can not make any permanent modifications.

        Once I assign a non standard ADC pin as a particular temperature input, do I need to 'un-assign' the default input pin for that input somehow ? Or does the firmware accept only the most recently assigned input pin ?

        I will report back on any success using analog-linear

        Regards,
        Pete

        1 Reply Last reply Reply Quote 0
        • undefined
          Pete_A
          last edited by 7 Oct 2019, 03:59

          TL:DR success using analog-linear.

          I have one (of three) thermocouples working using analog-linear, so the software handles the ADC correctly. The other two thermocouples have a different signal path and I need to figure out what is different in how the chassis handles them.

          I also need to work out the exact scaling factor for the thermocouple I can read but that should just be a case of looking at the configuration around the signal conditioning IC (ran out of time today).

          1 Reply Last reply Reply Quote 1
          • undefined
            Pete_A
            last edited by 16 Apr 2020, 08:06

            On further digging, I'm having issues getting the calibration factors configured correctly.

            My signal source is configured for 10mV / degree C.
            I have spent a heap of time iterating the zero and max cal figures with the most useful setting being a zero of 70 and a max at 260 (from memory). These figures get me close to correct indications between 190 and 220C. The description for Analog Linear temperature sensor

            Biggest issue currently is that my readings top out at 229C indicated by the Duet but actual hotend temperature continues to climb.

            I know I need to go back through the OEM signal path and figure out exactly what is happening. This probably isn't helping my interpretation of the sensor description; the sensor test point does do 10mV/C as expected but it is going wonky somewhere downstream from there.

            One idea I am thinking about is changing ADVREF from 3v3 to 5v. This way I can remove the 3v3 zener clamp from the signal path.

            I'm also starting to consider building a replacement signal conditioning board to convert the TC's to SPI signalling.

            undefined 1 Reply Last reply 16 Apr 2020, 08:16 Reply Quote 0
            • undefined
              dc42 administrators @Pete_A
              last edited by dc42 16 Apr 2020, 08:16

              @Pete_A said in Help with non standard temperature sensor config:

              One idea I am thinking about is changing ADVREF from 3v3 to 5v.

              If you are talking about ADVREF on the Duet, you will blow the microcontroller if you do that.

              You could use a voltage divider to reduce the output from 10mV/C to around 6.6mV/C. If you are using a standard thermistor input on the Duet you must also allow for the 4K7 or 2K2 resistor between the input and ADVREF. For example, 1K between your thermocouple amplifier output and the thermistor input, and 2K from thermistor input to ground.

              Note, using an analog input to read a thermistor makes the accuracy and stability of the reading dependent on several components in the amplifier and on the stability of ADVREF. That's why our daughter board uses a MAX31856 chip instead.

              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

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