Another full day fighting this
New filtering, I think now it's easier to understand, also works pretty well.
Diff means: difference between average and new reading
*FILTER SETTINGS*
- Filter: Coefficient of the filter
- Threshold: Define normal noise level. Diff lower than this will be filter normally. If greater, will increase "threshold counter"
- Count limit: If the threshold counter is below this, normal filter will be used. If exceeded, will start reducing the filter coefficient by "Step down", until reaching "Min"
- Step down: Filter reduction step applied each time
- Min: Minimum filter coefficient, don't go below this.
- Reset limit: If diff greater than this, filter is resetted (ex. Tip removed)
Now let me explain a practical example:
If the normal tip noise in around 20, you set a bigger threshold to have more clearance, ex. 50. Also, if the tip changes too fast, you might increase it a little more.
Now, the new reading reports +100, could be just noise ,or the temp changing fast. The threshold is triggered and the counter increased.
While the counter is below the limit, it will be filter normally, and barely affect the average. You'll need to adjust this depending on how noisy your signal is.
If the next readings is under the threshold, the counter is cleared, but if not, it keeps increasing.
When that counter exceeds the limit, each time the filter coefficient will be lowered, until reaching the min. set value.
Ex. when heating a cold tip, it'll usually be faster than the filter, so if we have a coefficient=90, step down = -5 , min=50, the filter will do 90%,85,80,75,70,65,60,55,50,50,50... and when the readings get normal again, return to 90%.
Anytime a reading is under the threshold, the filter will be restored and the counter resetted.
The higher the threshold and the count limit, the slowest the filter will react. So this always require a lot of testing.
It's easy to have a clean signal by skyrocketing the filter values, but you'll get a slow oscillation caused by the filter response. Though still better than having it jumping around like crazy.
The noise levels can be seen in the DEBUG menu. Set a normal temp (Ex. 350) and check the values in the field RAW. Your noise is highest-lowest. Add some clearance and start testing.
There's nothing the sw can do to improve the RAW readings, that's how the ADC is reading the signal, it purely depends on the external circuitry.
Edit:
The problem is definitely due the tip sensor. It's impossible that they heat up +100ºC in just 1 second, but the sensor does read that.
Tips having little use work better.
So the PID needs to be very responsive, requiring ver narrow adjustments. Its very easy to over or under compensate, both causing spikes and oscillations.
The fact that the PID is able to control it with only 5Hz sampling rate is already amazing.
Opened a new tip, it jumped for 5-10 seconds and after that it worked great. Don't know if I was just lucky or if it's the current filtering doing great.
Current filtering is set at 95%. Seems to greatly cut down the noise, and the adaptative filtering does the rest.
New builds available!