Solved RRF3.01RC11: hot-end thermistor: noisy measurement
-
Hi,
I upgraded from RRF2.05 to RRF3.0 and also 3.01RC11 on my Duet2Wifi 1.04.
I noticed that my hotend thermistor has very noisy readings above 210°C after the firmware upgrade. I even rolled-back to RRF2.05 and observed super clean measurements again - so I suspect something is either wrong with my config changes, or RRF3 introduced a different ADC setting / measurement algorithm that now results in noise of +/- 10C on my printer.
Here is my RRF2 config snippet for the heater:
M305 P1 S"Hotend" R4700 T100000 B4725 C7.06e-8 ; set hotend thermistor parameters M307 H1 A560.0 C160.0 D8.0 S1.0 B0 ; hot end heater
And here what I think is the correct RRF3 config snippet:
; Hot end temperature sensor and heater M308 S1 P"e0_temp" A"Hot End" Y"thermistor" R4700 T100000 B4725 C7.06e-8 M950 H1 C"e0_heat" T1 Q250 M143 H1 S280 M307 H1 A400.0 C140.0 D6.0 S1.0 B0
On RRF2 I get nice clean readings at various stable temperatures:
Compared to the very noise graph on RRF3 and RRF3.01RC11:
I tried re-tuning my heater, playing with various values manually, checking my hardware. I can remotely roll-back to RRF2 and the noise is gone - I upgrade to RRF3.0 again, and it is back. I only have the thermostatic hot-end fan on, that kicks in at 50C with 100% - there is no part cooling fan that would affect the readings. Both graphs are in captured in an otherwise idle printer (no movement, or other activity).
I see temperature reading difference of up to 10C from one sample to the next. At some point this will most likely trip a heater fault and kill a running job.
Did anyone else observe different temp readings or heating characteristics after upgrading to RRF3?
-
I noticed that none of these variables are used any more in RRF3:
https://github.com/dc42/RepRapFirmware/blob/v3.01-dev/src/Configuration.h#L128-L130@dc42 is this on purpose or did the code get lost during refactoring? For fan speeds it is still there. On RRF2 there was https://github.com/dc42/RepRapFirmware/blob/dev/src/Platform.cpp#L2686, but on RRF3 is seems to be gone. I'm not even sure if my problem is related to PWM frequency - I tried changing the frequency to super low and super high values, but my temperature noise is seemingly unaffected by it.
-
@resam said in RRF3.01RC11: hot-end thermistor: noisy measurement:
I noticed that none of these variables are used any more in RRF3:
https://github.com/dc42/RepRapFirmware/blob/v3.01-dev/src/Configuration.h#L128-L130@dc42 is this on purpose or did the code get lost during refactoring? For fan speeds it is still there. On RRF2 there was https://github.com/dc42/RepRapFirmware/blob/dev/src/Platform.cpp#L2686, but on RRF3 is seems to be gone. I'm not even sure if my problem is related to PWM frequency - I tried changing the frequency to super low and super high values, but my temperature noise is seemingly unaffected by it.
The difference is that in RRF2 the firmware assumed that heater 0 was the bed heater so it set the PWM frequency to 10Hz. In RRF3 it treats all heaters equally. You can add parameter Q10 in your M950 H0 command to get the same behaviour as RRF2.
-
@dc42 said in RRF3.01RC11: hot-end thermistor: noisy measurement:
The difference is that in RRF2 the firmware assumed that heater 0 was the bed heater so it set the PWM frequency to 10Hz. In RRF3 it treats all heaters equally. You can add parameter Q10 in your M950 H0 command to get the same behaviour as RRF2.
I'm having problems with my hot-end heater: E0, not the bed. I think the default for this was always 250 (assuming by reading the comments in the code).
I've just tested again with this config on RRF3.01RC11:
; Hot end temperature sensor and heater M308 S1 P"e0_temp" A"Hot End" Y"thermistor" R4700 T100000 B4725 C7.06e-8 M950 H1 C"e0_heat" T1 Q10 M143 H1 S280 M307 H1 A400.0 C140.0 D6.0 S1.0 B0
Here the chart, first heating from 0 to 230, and then bumping to 240:
Very noisy again with jumps from one measurement sample to the next of up to 10C.Again - I'm not sure if this is even an PWM frequency artefact - is there any plausible correlation of the frequency the mosfets get switched to influence the ADC_REF or other ADC voltages?
Or did the ADC itself get different setup values in the microcontroller that would explain this difference? Does the ADC aggregate or average a few values? Maybe the smoothing has changed from RRF2 to RRF3?
-
I finally solved my mystery of weird noisy hot-end thermistor readings!
The problem goes back to even https://forum.duet3d.com/topic/5582/hot-end-auto-tuning-failed-due/1 which is also solved now!When I built my printer and my XY carriage I tried to be clever and reduce the number of wires I need to run through my drag chain by combining all ground / power / etc connections as much as possible.
I wrongly assumed that VSSA can be substituted with GND. I essentially plugged my thermistor into GND+THERMISTOR1. This gave me a "good enough" reading apparently that I never bothered to double check.
This however creates a few tiny problems because @dc42 is even more clever and compensates for the extra fuse resistance of VSSA in the firmware - which means I have a wrong reading in certain cases.
Now I'm running my thermistor wiring the way
god@dc42 intended, and I have a super clean temperature reading!Let this be a lesson guys! RTFM!