Running Bed Heat Auto Tune

Running bed heat auto tuned

Running Bed Heat Auto Tunes

Both the heat bed and blower fan were turned off. Note that this is the same test setup I used before I reset Marlin to defaults. First tune failed with 'PID Autotune failed! Temperature too high' - the temperature overshot by 20°C then stopped. Second tune I adjusted the PIDMAX value to 128 and ran again. Success with results P13.42 I0.68 D66.25. Jun 09, 2016 I finally got it to work, you have to heat your bed withing 10 degrees of your target temperature then run the pid autotune, then it will work, as long as you have the pid autotune enabled in your marlin code and that other option below it commented out you are good to go, try that and let me know if it worked for you, if you haven't already figured it out. This was just heating the bed! I tried a print when the bed temperatures was at 105, the code first heated up the extruder then heated up the bed. Except the bed didn't heat up it started to very slowly cool from 104.5 down to 98 degrees! I've tried using PID auto tuning M303 gcode, for some reason it will only auto tune my first extruder.

Swings in temperature for your 3D printer’s hot end, such as the Ender 3, is just plain no good for quality print results. Steady, controlled heat is what you are looking for and getting it right can be great for your print results. PID auto-tuning is a way to control the temperature by using an algorithm to determine the values that the printer uses to heat and maintain temperatures. Below you will find the instructions to set your PID values. This method is going to change the values that are stored in your printer, and used every time it heats. This method is great for setting the PID values if you use very similar filament, and cooling most every time you print. If you use a lot of varying filament, or use cooling on some and not on others, you will want to modify your slicer printer settings to set the PID values for each configuration. Lets take a look:

Running bed heat auto tune reviews
  • First off, use a terminal command processor to send commands to your printer – such as OctoPrint, Repetier Host, or Simplify 3D.
  • Start your printer in a cooled state, with the material you are going to use (such as PLA) primed in the hotend – either from a previous print or heat the printer and push through a few inches of filament and let it cool back down
  • Start the cooling fans if you intend to use them as part of the results you want from the PID test. Send the command M303 E0 S205; to the printer for a temperature of 205C – change the S value to whatever target temperature you are looking to get stable heating for like this:
  • The printer will take about 5 minutes or so and run through the auto-tune test.
  • When it is complete, Marlin will spit out the test values for P, I and D looking something like this near the end of the output:
  • Now tell your printer that you have new defaults, sending in new values for the PID values that you received from the test. In my example I send it the values like this
  • And it returns a success looking like this:
  • Next up, you will want to save your settings to the firmware, or the next time you cycle the power, you will lose the settings, so send the save settings command like this:

There you go, you should be all set to go with stable PID settings that make your printer produce better prints . A couple of quick things to note:

  1. I have seen some varying settings and re-running the whole thing a few times will give you interesting variations in the values returned. The first time I ran this on a printer, the resulting values produced oscillating temperatures (around +-4 degrees C) which is a little too much. You are looking for tight temperature ranges – I was happy with the settings above that roughly stayed very solid in the 204-206 degree C range. Re-running the test a few times you may find a set of values that really tighten it up for you as well.
  2. Remember, if you are swapping in another brand of filament, a different type of filament (like going from PLA to PETG), or using fans vs. no part fans, you will want to either re-run this test and store them in firmware to use until you change them again, or send the M301 command in your printer profile with each of the values for P, I, and D for the configuration each time you go to print. This method takes a little more work, but ensures that the settings are correct for the config you are intending to use.

That’s it for today, if you have a comment or tip leave it below – we would love to hear from you. Happy printing!


Watch this video on YouTube

Not happy with how your 3D printer keeps its temperatures? Fix it with Marlin’s awesome PID autotune and improve the quality of your prints at the same time.

Now where did i put my exciting voice?

Using PID autotune

I’m Tom, and today i’m going to show you how to use the PID autotune feature of the Marlin firmware.

So, temperature control is one of the most crucial features of our 3D printers -- while the earlier printers simply controlled the temperatures of the hotend and later on, the heated bed, by simply turning the heaters on when the temperature was below the setpoint and off when it was above, todays firmwares use a much more elegant way of managing heating. Simply speaking, they determine how much power to send to the heaters by looking at how large the difference between the actual temperature and the setpoint is, how long the actual temperature has been off from from the setpoint and how quickly the temperature is changing at the moment. These three factors make up the proportional, P, integral, I and differential, D part of what is call the P-I-D loop.

Now, the PID loop is not an intelligent system on its own and you need to tell it how much it should care about each of the P, I and D terms by giving the PID loop a set of Kp, Ki and Kd values. Figuring those out by hand is pretty tedious and probably won’t get you a PID loops that works well. So what the guys behind the Marlin firmware implemented is what is known as PID autotune, and it’s an effective and easy way of figuring out a set of Kp, Ki and Kd values. Let’s try that out.

To get started, you need a version of the Marlin firmware on your printer, a working hotend and/or a heated bed that reads correct temperatures and a RepRap host that lets you send commands to your printer via a command line. I’m using Octoprint for this, but for example pronterface will work just as well.

So the basic command for autotune is M303 -- if you just send that command without any options, it will tune your hotend number one for a temperature of 150°C. That will give you a somewhat usable set of values, but to get better ones, you can add two more options: One is S to tell autotune the temperature you want to tune for, for example S230 for a hotend that’s going to print ABS or S120 for a heated bed for ABS. The other option is C as in Cesar, which tells autotune to run the tuning process a couple times in a row and improve the results with each pass. By default, it does three passes, but since they don’t really take long, i’m going to use C10 for ten passes. So let’s try that out, i’ll send M303 S230 C10. The hotend will heat up and then cool and heat again around the target temperature for ten times. It will report back to you each time it has finished a pass and give you a set of PID tunings. When it’s done, it will write back a final set of Kp, Ki and Kd values back to you. You can temporarily set them until the next time you reset the printer by using M301 with P, I and D and each of the calculated tuning values as arguments. So in my case, i’ll send it M301 P12.6 I0.66 D60.6 for my E3D hotend. If you’re also using an E3D hotend, you can use these values as a basis. You can then go and try these shiny new PID tuning on a print -- Marlin will use them until the next time you disconnect from your printer.

Now, that was for tuning a hotend. If you want to use PID for your heated bed, there is one more option you need to add to the M303 command, and that is E for extruder. The heated bed is extruder negative one, the first hotend is zero, the second hotend is one and so on. To set the values, you’ll need to have PID enabled for the heated bed in Marlin’s configuration and you can then use M304 instead of M301 with the same arguments as for a hotend. By the way, if you have more than one hotend, Marlin will use the same PID tunings for all hotends, no matter which one you used for autotune.

To make the settings permanent, you can either send a simple M500, which will make Marlin automatically load up the values you just set with M301 and M304 each time you power up your printer. You can also change the values in Marlin’s configuration files and re-upload the whole firmware.

So that’s all there’s to it -- autotuning is a one-time process and can really improve your prints, so if you haven’t tuned your printer yet, do it now.

Running Bed Heat Auto Tune Reviews

That’s it for today! As always, thanks for watching and don’t forget to like, subscribe and comment you heart out!

Running Bed Heat Auto Tune 2


You can support me without spending a single penny!