# Does PID Tuning work on SM2?

**URL:** <https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076>\
**Category:** Snapmaker 2.0 (3-in-1)\
**Created:** [June 12, 2020, 5:36pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076 "2020-06-12T17:36:06Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Isaac11](https://avatars.discourse-cdn.com/v4/letter/i/9de0a6/32.png) [@Isaac11](https://forum.snapmaker.com/u/Isaac11)\
**Post date:** [June 12, 2020, 5:36pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/1 "2020-06-12T17:36:06Z")

</div>

Hello,

I tried to tune my PID but it doesn’t work.  
Can someone tell me if it’s user problem or not ?

---

<div class="post-metadata">

**Author:** ![Joel](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@Joel](https://forum.snapmaker.com/u/Joel)\
**Post date:** [August 15, 2020, 8:30pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/2 "2020-08-15T20:30:57Z")

</div>

I tried as well, but it doesn’t seem to work. Connected via USB and set the command M303 E-1 S60 U1 but it kept saying heating error or something like that. It kept providing error codes so I just turned off the machine. Hope the Snapmaker staff can shed some light on this.

---

<div class="post-metadata">

**Author:** ![xchrisd](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/xchrisd/32/1503_2.png) [@xchrisd](https://forum.snapmaker.com/u/xchrisd)\
**Post date:** [August 16, 2020, 10:10am UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/3 "2020-08-16T10:10:07Z")

</div>

Haven´t tried pid-tuning yet.- There was no need.

> [@3d Print Guide\_Walk Through](https://forum.snapmaker.com/t/3d-print-guide-walk-through/5945/1):
>
> M303 PID AUTOTUNING
> 
> If you want to pid tune, you should generally think about which sort of filament do you take the most of your prints. I´m using the most of the time PLA at about 210°C with no printpartcooler.
> 
> [PID autotune | Marlin Firmware](https://marlinfw.org/docs/gcode/M303.html)
> 
> NOZZLE PID AUTOTUNE  
> If you use the most of the time a printpartcooler i suggest you to run the fan at 100% for pid tuning.
> 
> For running the Partcoolerfan with 100% enter: M106  
> If you want to turn it off again enter: M107
> 
> Enter following to the terminal for pid tuning: M303 C10 E0 S210  
> [M303=PID Tuning] [C10=amount of testing(10times)] [E0=Extruder] [S210=Temperature]  
> If you have done so, you have to wait a few minutes, till following response comes (Your values will be different!):
> 
> Recv: Classic PID  
> Recv: Kp: 9.06  
> Recv: Ki: 1.57  
> Recv: Kd: 13.05  
> Recv: PID Autotune finished! Put the last Kp, Ki and Kd constants from below into Configuration.h
> 
> Now you see my new P9.06 I1.57 D13.05 values.
> 
> To write it to the machine we enter: M301 P9.06 I1.57 D13.05 E0  
> Now you have to save your configuration entering: M500
> 
> BED PID AUTOTUNE  
> this is currently not available, you would have to edit the firmware configuration.

---

<div class="post-metadata">

**Author:** ![gkress](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gkress](https://forum.snapmaker.com/u/gkress)\
**Post date:** [April 13, 2021, 11:16am UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/4 "2021-04-13T11:16:20Z")

</div>

xchrisd, your post made sense, but it still didn’t work. Per Isaac11 and Joel, I got a bunch of “Error:Heating faijled, system stopped! Heater\_ID: 0” errors on the console. I am still VERY interested in doing a PID Tuning check, just to get my prints as absolutely perfect as possible. Does anyone have any insight?

---

<div class="post-metadata">

**Author:** ![gkress](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@gkress](https://forum.snapmaker.com/u/gkress)\
**Post date:** [April 13, 2021, 12:13pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/5 "2021-04-13T12:13:11Z")

</div>

I found this discussion on github. I am still unsure if PID Tuning was solved. I would appreciate some insight from someone who is MUCH better at this than I am.

> <https://github.com/Snapmaker/Snapmaker2-Controller/issues/74>
>
> every time attempting M303 the controller get stuck in a loop that only solved by powering off the machine.
> tried both via...

---

<div class="post-metadata">

**Author:** ![brent113](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/brent113/32/11114_2.png) [@brent113](https://forum.snapmaker.com/u/brent113)\
**Post date:** [April 14, 2021, 12:25am UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/6 "2021-04-14T00:25:36Z")

</div>

> [@gkress](#):
>
> I am still unsure if PID Tuning was solved

You can manually tune with M301. You cannot M303. The developers are working on it, as you found. But M303 is not implemented, you can git blame M303.cpp: [https://github.com/Snapmaker/Snapmaker2-Controller/blame/main/Marlin/src/gcode/temperature/M303.cpp](https://github.com/Snapmaker/Snapmaker2-Controller/blame/main/Marlin/src/gcode/temperature/M303.cpp)

Nothing has changed in the last couple years.

---

<div class="post-metadata">

**Author:** ![Edwin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/edwin/32/13481_2.png) [@Edwin](https://forum.snapmaker.com/u/Edwin)\
**Post date:** [April 14, 2021, 8:03am UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/7 "2021-04-14T08:03:00Z")

</div>

@gkress

PID settings is activated in SM2 Firmware. You can read this [code base](https://github.com/Snapmaker/Snapmaker2-Controller/blob/main/Marlin/Configuration.h)  
.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/snapmaker/original/2X/9/926ca7f0c7ac7a23dd3cdfa385e9268455a526b6.png)

---

<div class="post-metadata">

**Author:** ![eh9](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@eh9](https://forum.snapmaker.com/u/eh9)\
**Post date:** [April 14, 2021, 4:41pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/8 "2021-04-14T16:41:58Z")

</div>

> [@Edwin](#):
>
> PID settings is activated in SM2 Firmware

Is it possible to recompile the firmware with this enabled and otherwise be current with the firmware as shipped? Insofar as I know, the current firmware as shipped is not currently on github. It’s disingenuous to point out that people can recompile an old piece of software that does not have current features, especially when the GPL license for Marlin requires Snapmaker to publish source code for all binaries that it ships.

---

<div class="post-metadata">

**Author:** ![brent113](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.snapmaker.com/brent113/32/11114_2.png) [@brent113](https://forum.snapmaker.com/u/brent113)\
**Post date:** [April 14, 2021, 4:45pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/9 "2021-04-14T16:45:45Z")

</div>

@Edwin, the controller PID configuration.h is irrelevant as the PID control is done inside the module firmware.

The controller only controls the bed and it does not use PID control, it uses bang-bang control.

@eh9 My understanding is the current firmware release is based on the following code: [Release v4.2.1 · Snapmaker/Snapmaker2-Controller · GitHub](https://github.com/Snapmaker/Snapmaker2-Controller/releases/tag/v4.2.1)

---

<div class="post-metadata">

**Author:** ![eh9](https://avatars.discourse-cdn.com/v4/letter/e/7993a0/32.png) [@eh9](https://forum.snapmaker.com/u/eh9)\
**Post date:** [April 14, 2021, 5:30pm UTC](https://forum.snapmaker.com/t/does-pid-tuning-work-on-sm2/7076/10 "2021-04-14T17:30:47Z")

</div>

> [@brent113](#):
>
> My understanding

I looked in the code, and there’s no mention I can see that this version of the code on github is used in any particular published binary. The version designator that is present is buried in the Marlin version; it’s apparent this is what they’re updating from the comments. This is the version number of the controller firmware; it’s not the version of the full binary distribution.

> #define SHORT\_BUILD\_VERSION “SM2-4.2.1”

Absent a definitive statement from Snapmaker, it’s a wish and a guess to figure out how all the versions tie together. It’s a deficiency in Snapmaker’s publication process; they’re still not doing everything right. I don’t see a github project, for example, that packages and builds a binary distribution and, in particular, pulls particular versions of the various code bases into a complete binary. Such a project would have all the relevant versions in one place. To my knowledge, that information has not been authoritatively published in that way or any other way.

Snapmaker ought to take to heart the goals of [Reproducible Builds](https://reproducible-builds.org/) and provide assurance to their community that the published binaries are indeed derived from the source code they publish.
