Test results were done on firmware version 20. Yes, technically it's 20.39, but the LCD GUI has nothing to do with this so only the motion controller firmware is applicable.
This took me only 2 hours and that's cause I was being slow and lazy. I've compiled the results from my PID auto tune in the main file you can grab on the main page of this project once I upload it. Currently I am still working out what method of control I want on the hotend and the file is for both.
Scroll to the bottom for the update.
Once you start investing some dedicated time into a system, you get a feel for it. I have some observations about the hotend as a result of the tuning of the heated bed that I will share at the end.
Here is what the auto-tune algorithm decided to do; I ran it for 45 ˚C all of the way up to 80 ˚C in 5 ˚C intervals:
Just about every function is disabled when you run the autotune algorithm, fwiw.
I decided to average the output and test it @ 70 ˚C which is decently hard enough for the system to work with when you have a breeze:
I didn't like the overshoot so I tweaked each of the variables, disturbed, observed, and bumped it to 70 ˚C, as you can see, to see how it behaved.
The bed power readings aren't incredibly useful. They appear to be a small, time-averaged output, but the time base is so small that noise from the PWM switching shows up.
I watched my 'scope with a 70 second window up on my screen with 'High Resolution' sampling on to time average the output. The readout is solid with no perturbations in the current, btw the MOSFET diode is holding up wonderfully. The current undershoot caused by it is ~1 A peak to peak and it has ~120 kHz frequency when the switching frequency is 147 Hz.
Anyhow, with that, I decided to test how well the PID variables handled setpoint changes.
Here is the first 10 min window:
Sorry for the cursor...
Next setpoint bump test:
This screen cap overlaps with the previous one. Oh, and yes, it looks like it's about to overshoot a tad, ignore that and look at the next one.
Now time for the big bumps to the setpoint:
Man that is beautiful. That is what a properly controlled system looks like.
In summary, here is the behavior of the bed:
- Allow for 45 seconds for 90% of a 5 ˚C change, raising or lowering
- Allow for 60 seconds for 90% of a 10 ˚C change, raising or lowering
- If you're within 3-4 ˚C of the setpoint and the power was fully off or on, it'll then re-engage to damp the rise/fall and prevent any over or undershoot.
I would like to reduce the PWM duty cycle jitter, but there is no instability and the system is well controlled so I'm not going to touch it.
If you like these characteristics for the heated bed enter the following G-code:
M304 P48.94 I0.03 D187.31 M500
These settings have been updated scroll down
So, lessons learned from this round of tuning when reflecting back on the hotend?
- A 40 W heater cartridge is overkill on the hotend and is causing problems.
- A 25W or 30W would be better suited for the PID control with this heater block
- If that isn't able to be remedied, better noise damping from the PSU, that's another post, and higher 'D' is one option
- The combination of 'P' & 'I' tunrs off current 5 ˚C before the setpoint and then overshoots by 5 ˚C, but power does not turn back on until it's 1.5 ˚C from the setpoint when it's falling.
- Damping the power input and/or the heat loss of the hotend will alloy for better PID control
- If the overshoot cannot be controlled well enough, then 'faking it' and intentionally setting your temp 5 ˚C lower may be an appropriate fix for the system in the time being.
I was able to look at the heated bed PID again to reduce 'D' like I wanted too. Also figured out that 'I' has a resolution of one one-thousandth as well. I was about to get a 10 ˚C rise in 30 seconds or less for all temps under 60 ˚C, It very fast and responsive to breezes now too with the updated PID values:
M304 P106.56 I0.024 D96.81 M500