SOLVED What to change to obtain better PID for a large bed.

  • Background.

    I have a very thick (10mm) aluminium bed, with silicone mains heater, insulated on the underside and with 6mm glass on top. This is fine - please no comments about changing the hardware !!!

    The temperature sensor sits in hole, drilled into the edge of the aluminium and as deep as I can make it. So the sensor "sees" the temperature of the aluminium, close to the top surface and not the heater/aluminium underside interface.

    Due to the mass of aluminium, there is fair amount of thermal lag between the heater coming on and that heat finding it's way to the sensor.

    I have tuned the heater which runs in PID mode, rather than bang-bang.


    If I set the bed temperature to say 50 degrees C, after some time, it will actually settle and run at about 54 deg C. This has all been fine and dandy because I get about 3 degrees drop in temperature at the surface of the glass. So having the temperature running a few degrees higher than the set point has been advantageous.

    However, I now use a "pre-print" macro rather than setting temperatures via the slicer. Without going into the boring details, this macro completes all the homing and hot end heating in the time it takes for the bed to reach operating temperature - in this case 50 degC. The last line of this macro is "M116 ; wait for all temps"

    Again, this is all fine and dandy until I want to do consecutive prints. What happens is that the M116 is waiting for the bed temperature to reach 50 deg C but it's already at 54 and because it is being "controlled" it won't cool down. So it'll sit there forever unless I do something like set the bed temperature to zero, at which point the print will start and I can toggle the bed temperature back up to 50 ( or just wait 10 minutes or so between prints which is unacceptable).

    So in a nutshell, I think I need to alter the PID values so that the bed temperature will run closer to the demand set point. My question is, which parameter? My gut feel is that I need to change the dead time but up or down? For info, the result of PID tuning reveals the following values.

    M307 H0 A283.6 C2745.9 D16.4 S1.00 B0

    I could just play around with the values on a trial and error basis but hope it will be quicker to get a definitive answer on these forums (it takes an awfully long time for my bed to cool).

    Thanks in advance.

  • administrators

    When you say that it settles at 54C when you command it to 50C, do you mean that it overshoots to 54C and then very slowly drops to 50C? I can't see any reason why it would continue to maintain 54C if the setpoint is 50C.

    Your M307 C parameter is very high, indicating that the bed has considerable thermal mass and/or is well-insulated, so if it overshoots then it will take a long time to drop to the correct temperature.

    To reduce the overshoot, I suggest you try increasing the A parameter by about 20% or the D parameter by about 50%.

  • @dc42 Hi David and thanks for getting back to me.

    As per my OP, yes the bed does have high thermal mass and it is also insulated. No I don't mean that it overshoots then slowly drops back. I do mean that it will settle at 54deg C by the end of a print.

    However, I think I know why.

    I've just run a test of heating the bed and noting the temperature every minute. Nothing else running - just the bed heater. Time to reach 50 deg C is a tad under 5 minutes. Thereafter it will overshoot to about 51.2 after a further 2 minutes before dropping back to about 50.8 deg C, 2 minutes or so after that. It will sit there at that temperature until about 25 minutes from start. This is perfectly acceptable.

    After about 25 minutes, the temperature started to rise again but at the same time I noticed that the reading started to get "noisy". That is to say, the temperature reading started to rapidly fluctuate by about +/- 0.3 degrees - not enough to show on the graph but enough that and I had to "eyeball" an average. This lasted for about 7 minutes during which time the (average) temperature reached about 53 deg C. Thereafter, the "noise" diminished and the temperature dropped back to about 50.9.

    So I'm guessing that this noise is what is upsetting the PID algorithm - it's too much of a coincidence that the overall temperature rises when the signal become noisy and drops back again when the noise diminishes. This was with nothing else running on the printer so I can imagine that things might be worse with all the motors, fans and other gubbins running.

    I am using a 4 wire PT100 (historic reasons) so I think my best course of action is to replace this with a "common or garden" thermistor, then see what happens. Hopefully the signal will be cleaner and the problem will be solved.


  • administrators

    You could try grounding the bed plate that the PT100 is attached to, if you haven't already.

  • @dc42 Well it's grounded to the machine frame which in turn is grounded to mains earth. Is that any good?

  • administrators

    Is VIN- also tied to mains ground earth?

  • @dc42 said in What to change to obtain better PID for a large bed.:

    Is VIN- also tied to mains ground earth?

    Errr, I'll have to check - I suspect probably not other than through the PSU casing which is screwed to the frame. I'll add that to my "todo" list.

    While we are on the subject, I use an RCD plug on the end of my printer lead, where it plugs into the wall socket. Do these provide the same earthing as a conventional 3 pin plug?

  • administrators

    @deckingman said in What to change to obtain better PID for a large bed.:

    While we are on the subject, I use an RCD plug on the end of my printer lead, where it plugs into the wall socket. Do these provide the same earthing as a conventional 3 pin plug?


  • Quick update for anyone following this thread. I conected VIN- to mains earth but it hasn't improved things. I'll continue with "plan A" and change to a simple NTC thermistor when I have more time.

  • Problem solved.
    I fitted a genuine E3D cartridge style thermistor in place of the PT100. The signal is much cleaner with no sign of the "noise" I saw earlier. I've rerun the PID tuning (not much different to previous results) and run a static test just heating the bed. The temperature control just sits at the set temperature +0.1 - 0.0. So with set point of 50, I get 50.0 to 50.1 after an initial overshoot of 0.6 degrees which is perfectly acceptable.

    I've edited the title of this thread to mark it solved.

Log in to reply