Okay - I looked at this code just now and I disagree. There was no bug. The Ki term is used 2 lines of code below:
iTerm[e] = Ki * temp_iState[e];
Your now multiplying by Ki twice. This means your ki value instead of being set to 2 is actually the equivalent of being set to ki squared or 4.
If you change the code back to the official code and set I=4.0 in your PID settings you should get the same results.
Edited by Guest- 1
Recommended Posts
ekh 3
Let me quote myself:
This was correct, but it was not the supply woltage, but the nozzle heater element that was worn out. The resistance was 10ohm
I checked that even when the FET was on all the time the temperature was too low.
The printer has for long periods worked 24/7 and the heater element has been worn out. In another post I blamed the FET because it has failed once before, but not this time.
Another heating element I bought for making my own printer is only 4ohm.
So the loop amplification was more than halved (10/4 = 2.5 times assuming the original heater also was 4ohm).
That is why I was the only one suffering from the error in the PID formula.
Link to post
Share on other sites