What exactly does PID tuning do?



  • Diet WiFi 1.04, most recent version of RRF, E3D Titan Aero H/E

    I think my hot end tepotature is way off. I am guessing that it might be out by 30-50c, but have no way to be sure. This raises two questions for me.

    1-what does the PID tuning (M303 & M307) do for me? Is it for temperature accuracy of for efficiency at a given temp, or something else.

    2-how do I best determine the temp? I know I can’t use a temp gun. I tried using the k-type thermocouple on a $25 Multi meter, but I have no clue how accurate that is which is compounded by difficulties finding a good way to use it. Is there another device that would work better on the hot end?



  • PID tuning measures the response of the sensor output with respect to the input to the heater; it basically tries to learn how the heater responds so that it can reach the set temperature as quickly as possible without overshooting or oscillating.

    If the temperature is wrong then start by making sure you have the right settings for the sensor you're using.

    PID tuning has nothing to do with f.ex 60C actually being 60C .It only tries to make sure if you ask for 60C you get whatever the temperature is when your sensor says it is 60C - if that makes sense?



  • PID tuning has nothing to do with f.ex 60C actually being 60C .It only tries to make sure if you ask for 60C you get whatever the temperature is when your sensor says it is 60C - if that makes sense?

    That’s kind of what I thought. How do you check the actual temp on the hot end? The thermocouple was all over the place depending on how I tried to use it with the highest temp being way below the reported temp in WCP.

    One reason that I am pretty sure the reported temp is way low is tha I can’t get any PLA layer bonding with a reading of less than 220c. I have alway always used 185 on my other printers.



  • Not sure, I've never been too fuzzed about what the actual temperature is, I've always been more concerned with precision rather than accuracy for printer temperature. You have to try out each filament anyways, so if its 230 or 235 is of little importance to me, as long as its the same each time. (And I have a Seek Thermal which should let me check my hotend relatively easy)

    But if you have a thermocouple stick that in boiling water and check that you get a 100C reading. Then stick it on the hotend, preferably inside any insulation you may have, or somehow get a good connection and cover. Allow the hotend to reach its setpoint, and give everything a few minutes to get up to the same temperature and compare?



  • If it's a Titan Aero and genuine V6 hotend and cartridge thermistor from E3D, then you should get pretty accurate results just by using the thermistor settings provided by E3D.

    What settings are you using?



  • @bearer I had not thought of the boiling water trick to check the thermocouple. Good idea.

    If the thermocouple passes muster, I will try attaching it to the bare hot end with capton (sp?) tape and see what happens. Thanks.



  • For the home gamer water to a propper boil, and water filled with ice cubes are the two easiest to recreate temperature references which will be close to 100C and 0C. Just make sure you don't touch the container or ice with the actual probe. But not super usefull for hot end use as its only half to a third of the range, but still, it'll give you some idea.

    Kapton tape to hold the thermocouple to the hotend and giving it some time to stabilize ought give a good reading, provided the temperature the read by the thermistor isn't oscillating.


  • administrators

    Is it really a thermocouple you are using, connected to a thermocouple daughter board that is plugged into the Duet, or is it the more common thermistor? It it's a thermistor, then you may just be using the wrong settings in config.g.



  • @dc42 said in What exactly does PID tuning do?:

    Is it really a thermocouple you are using, connected to a thermocouple daughter board that is plugged into the Duet, or is it the more common thermistor? It it's a thermistor, then you may just be using the wrong settings in config.g.

    I am using a k-type thermocouple on a multi-meter with a temporature function and a thermocouple plug.

    The problem is worse than I thought. I tested the thermocouple/multimeter with boiling water and it was within a couple degrees of 100c. I taped the thermocouple to the heat block and when DWC showed 235c , the thermocouple showed 160c My neighbor has another thermocouple device and we tried with that and got essentially the same reading (157-165)

    I am not using the thermocouple daughter board as I have zero confidence that it will be significantly different that the three devices I have tried. Is their reason to believe otherwise? Also the fact that I have to print PLA at such a high temp seems to confirm that the temp reported in DWC is not accurate.

    Could it be that there is a setting somewhere that does not correctly identify the Titan Aero thermister?

    @Phaedrux - Also the Titan Areo is the real deal....not a knock-off



  • I think dc42 meant to ask if you had a thermcouple on the hotend, or basically establish which thermistor you have, and if the settings are correct?



  • @bearer I am not using a thermocouple/daughter board on the hotend. I am using the thernmistor that came with the Titan Aero. If there is a setting that should be tweaked to accomodate that arrangment, I have not done so. That certainly could be the issue.

    @dc42 I may have miss understood your question

    Do I really need to go to the Duet daughter board to get anything more accurate than a 65+ inaccuracy? If I have to I will, but I guess I thought the Titan Aero would work as supplied.

    How do I set the firmware to work with the Titan Aero thermistor? Or that just not a realistic option.



  • @crchisholm Check your M305 values in your config.g, I have a Titan Aero and I've never had the slightest reason to suspect the accuracy of the E3D thermistor (It is the cartridge type you have, yes?) My settings are:

    M305 P1 T100000 B4388 C7.06e-8 R2200 ; Set thermistor + ADC parameters for heater 1

    But I have a Maestro, for your WiFi I believe the R parameter should be changed to R4700. It should then look like this:

    M305 P1 T100000 B4388 C7.06e-8 R4700

    Otherwise, please post your config.g to let us have a look at it.

    Alan



  • @mudcruzr I think your B values are out of date. That was correct for firmware 1.16 and earlier. According to the E3D documentation the values for the Duet Wifi and firmware 1.17 and later should be:

    M305 P1 T100000 B4725 C7.06e-8 R4700

    There was a mistake in the configurator that was still using the old values.

    @crchisholm So check your config.g for the heater section and compare your M305 P1 commands with the one above. A wrong value there would definitely explain the difference in temperature readings.



  • @mudcruzr said

    M305 P1 T100000 B4388 C7.06e-8 R4700

    I made the change but not much difference config.g attached.

    ; Configuration file for Duet WiFi (firmware version 1.21)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Fri Feb 01 2019 16:04:24 GMT-0500 (Eastern Standard Time)

    ; General preferences
    G90 ; Send absolute coordinates...
    M83 ; ...but relative extruder moves

    M667 S1 ; Select CoreXY mode

    ; Network
    M550 P"Core XY" ; Set machine name
    M552 S1 ; Enable network
    ; M587 S"BHNDVW3201B4B28" P"3c5d116a" ; Configure access point. You can delete this line once connected
    M586 P0 S1 ; Enable HTTP
    M586 P1 S0 ; Disable FTP
    M586 P2 S0 ; Disable Telnet

    ; Drives
    M569 P0 S0 ; Drive 0 goes backwards
    M569 P1 S0 ; Drive 1 goes backwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S0 ; Drive 3 goes forwards
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation

    M92 X80.5369 Y100.7067 Z399.9219 E416.666 ; Set steps per mm

    M566 X900.00 Y900.00 Z150.00 E857.1428 ; Set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y6000.00 Z380.00 E1500.00 ; Set maximum speeds (mm/min)
    M201 X3000.00 Y500.00 Z100.00 E10000.00 ; Set accelerations (mm/s^2)
    M906 X950.00 Y950.00 Z950.00 E950.00 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; Axis Limits
    M208 X0 Y0 Z0 S1 ; Set axis minima
    M208 X300 Y270 Z300 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 Z1 S0 ; Set active low and disabled endstops

    ; Z-Probe
    ;M574 Z1 S2 ; Set endstops controlled by probe
    ;M558 P5 H5 F0 T6000 ; Set Z probe type to switch and the dive height + speeds
    ;G31 P500 X0 Y0 Z0 ; Set Z probe trigger value, offset and trigger height
    ;M557 X15:13 Y15:195 S20 ; Define mesh grid

    ; Heaters
    M305 P0 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 0
    M143 H0 S120 ; Set temperature limit for heater 0 to 120C

    M305 P1 T100000 B4388 C7.06e-8 R4700 ; As suggested by mudcurxzr
    ;M305 P1 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1

    M143 H1 S280 ; Set temperature limit for heater 1 to 280C
    M305 P2 T100000 B4138 R4700 ; Set thermistor + ADC parameters for heater 1
    M143 H2 S280

    ; Fans
    M106 P0 S0.3 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
    M106 P1 S1 I0 F500 H1 T45 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C

    ; Automatic power saving
    M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; Set voltage thresholds and actions to run on power loss

    ; Attempt to control heater2
    M307 H2 A-1 C-1 D-1 ; Disable Heater E1 for use with the Berd-Air cooling
    M106 P0 A2 S0 F30000 ; Fan 0 (Part Cooler) using Heater E1 Mosfet; Custom settings are not configured

    ; BLTouch code
    G29 S1
    M307 H3 A-1 C-1 D-1
    M558 P9 H5 F100 T2000
    G31 X30 Y15 Z3 P25
    G31 P500 Z0.1
    M375 ; load "heightMape.csv"



  • @phaedrux Remember I have a Maestro



  • Use your multimeter and measure the resistance of the thermistor at room temperature? Cant see any other possibility than

    • sensor is bad
    • input channel is not configured correctly
    • input channel is bad (try another one?)


  • @mudcruzr said in What exactly does PID tuning do?:

    @phaedrux Remember I have a Maestro

    In that case the only thing that changes in the command I posted is the R4700. For the maestro it's R2200, but you can actually leave the R value off completely for boards newer than the 0.6 Duet.



  • @phaedrux Sorry m8, missed you were talking about the B parameter. I've changed it and will keep a close eye on temps for a day or two.

    Alan



  • Ok, for good or for bad, I have ordered the thermocouple daughter board and K type probe for it. I think the reason I didn't want to do that was that I spent a lot of time designing and printing (on another priinter) the case....just the way I wanted it. So now, after installing this, I will be redesigning it again. Oh well.



  • So this didn't give a good result?

    M305 P1 T100000 B4725 C7.06e-8


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.