Filament monitor using HC-020K encoder
-
Actually I cant run a print with filament because my test setup is like in the video I made https://youtu.be/skg_SJgsGZk
but the duet think its reading the filament so should be good for gathering data. -
Progress update:
I have changed the tolerance from 70 to 50%
As you can see in the new video https://youtu.be/pRrZK0OoPBg I am running a print, E0 stop led is blinking as the encoder send pulses but duet is telling me: No data received.[c]M591 D0
Pulse-type filament monitor on endstop input 3, sensitivity 1.00mm/pulse, check every 3.0mm, tolerance 50.0%, no data received[/c] -
It could be that your sensor pulls the endstop input low enough to light the LED but not low enough to register as low in the processor. Use the Machine Properties tab of DWC to check whether the detected state of that input changes as the wheel rotates and the LED turns on and off.
-
In the DWC the E0 is triggered correctly, it change its state from NO to YES as I rotate the encoder wheel
-
Thanks. I found the first bug in support for pulsed filament sensors. Please try the firmware at https://www.dropbox.com/s/iq9pzfaugyfei7x/Duet2CombinedFirmware.bin?dl=0.
-
Installed the firmware 1.21RC5+ (2018-03-17 build 1) apparently nothing has changed.
Still [c]M591 D0
Pulse-type filament monitor on endstop input 3, sensitivity 1.00mm/pulse, check every 3.0mm, tolerance 50.0%, no data received[/c]
https://youtu.be/nitZGkwWn7sMaybe something wrong with my conf.g ?
-
Did you get that report after the wheel had spun a few times and the LED flashed off and on?
-
yes, after 30 min of printing the report is the same
-
I've rewritten the pulsed filament monitor support based on the code for the rotating magnet sensor, which is know to be working. Also I have changed the configuration parameters to be the same as for the rotating magnet sensor. You are welcome to try it (it's at https://www.dropbox.com/s/iq9pzfaugyfei7x/Duet2CombinedFirmware.bin?dl=0)), but as I haven't had time to test it yet I don't expect it to work.
-
I have just upgraded the firmware, should I change something in my config.g ?
Right now i have :
[c]; Filament Monitor HC-020K
M591 D0 P7 C3 S1 R70:130 L24.8 E3.0 ; Duet3D rotating magnet sensor for extruder drive 0 is connected to E0 endstop input, 7 = pulse-generating, sensorsensitivity 24.8mm.rev, 50% to 130% tolerance, 3mm detection length
M591 D0 ; display filament sensor parameters for extruder drive 0[/c] -
now after the prints begins i get : [c]Extruder 0 reports too little movement[/c]
-
Upgraded to:
1.21RC5+ (2018-03-17 build 2)I have changed my settings in config.g to:
[c]; Filament Monitor HC-020K
M591 D0 P7 S23.5 C3 R50 E3.0 ; Duet3d sensor for extruder drive 0 is connected to endstop input 3 (E0), S=23.5mm/rev, R=50% error detection tolerance, C=3mm comparison lengthM591 D0 ; display filament sensor parameters for extruder drive 0[/c]
Still getting [c]Extruder 0 reports too little movement[/c]
the strange thing is that The S parameters is set to 23.5 while after M591 D0 I get :
[c]M591 D0
Pulse-type filament monitor on endstop input 3, enabled, sensitivity 28.80mm/pulse, allowed movement 50% to 160%, check every 3.0mm, current position 0.0, no calibration data[/c]
the S parameter is 28.8 instead of 23.5I will be more than happy to send you one HC-020K encoder, just send me the adress to info@3dbnz.com and on Monday UPS will collect the parcel.
in the mean time, thank you
-
setting the sensitivity very low to 0.2 makes the print goes thru
then issuing M591 D0
I get [c]Pulse-type filament monitor on endstop input 3, disabled, sensitivity 28.80mm/pulse, allowed movement 20% to 160%, check every 3.0mm, current position 0.0, measured sensitivity 160.73mm/pulse, measured minimum 0%, maximum 2877% over 63648.7mm [/c]
so i set S value to 160 but then i get again:
[c]Extruder 0 reports too little movement[/c]
and the printer go to pausePS
while the S is 0.2 there is no difference if I remove the sensor from the wheel, the print does not go to pauseWhy M591 D0 is telling me [c]disabled[/c] ?
-
As I said, I brought the parameters into line with the other filament monitors. So S now enables or disables filament monitoring, and L sets the sensitivity. See https://duet3d.dozuki.com/Wiki/Gcode#Section_M591_Configure_filament_sensing.
You will probably need to increase the E parameter.
160mm/pulse sounds far too high. Can you measure it?
-
what P parameter should I use?
still P7 for pulse-generating sensor or P3 for rotating magnet sensor ?One complete rotation of the wheel is 20 pulses
Encoder wheel diameter is 26mm
E0 stepes per mm is 1166 ( 13to1 gearbox ratio) -
Strill P7.
Are you saying that 26mm filament movement give 20 pulses? If so that's 1.3mm per pulse.
I've put a new firmware binary with more sensible default values at https://www.dropbox.com/s/iq9pzfaugyfei7x/Duet2CombinedFirmware.bin?dl=0.
-
Diameter of the encoder wheel is 26mm so the circumference is 26 x 3.1416 = 81.7 mm
So 81.7mm of extruded filament is one full turn of the encoder wheel which gives 20 pulses
81.7 / 20 = 4
if so 4mm per pulseupgraded to: 1.21RC5+ (2018-03-18 build 1)
with this config.g:
[c]; Filament Monitor HC-020K
M591 D0 P7 C3 S0 R70:130 L4.1 E50 ; D= sensor for extruder drive 0, C= E0 endstop input, P=Sensor type, S1= Enable, R=70% to 130% tolerance, L= mm/pulse, E= detection length
M591 D0 ; display filament sensor parameters for extruder drive 0[/c]i get this response:
[c]10:16:26M591 D0
Pulse-type filament monitor on endstop input 3, disabled, sensitivity 4.10mm/pulse, allowed movement 70% to 130%, check every 50.0mm, current position 0.0, measured sensitivity 12778.21mm/pulse, measured minimum 0%, maximum 33% over 1763392.6mm
10:14:15M591 D0
Pulse-type filament monitor on endstop input 3, disabled, sensitivity 4.10mm/pulse, allowed movement 70% to 130%, check every 50.0mm, current position 0.0, measured sensitivity 12296.81mm/pulse, measured minimum 0%, maximum 25% over 479575.5mm[/c]If I enable the monitor with S1 i get "Extruder 0 reports too little movement":
[c]10:18:18Printing paused
10:18:17Resume-after-power-fail state saved
10:18:16M591 D0
Pulse-type filament monitor on endstop input 3, enabled, sensitivity 4.10mm/pulse, allowed movement 70% to 130%, check every 50.0mm, current position 0.0, measured sensitivity 25.00mm/pulse, measured minimum 16%, maximum 16% over 50.0mm[/c]The strange thing is the measured sensitivity of 12778.21mm/pulse while monitor is disabled
-
So the filament runs on the outside of the 26mm diameter encoder wheel?
The measured sensitivity is clearly absurd, as is the recorded extrusion amount (1.76km in the first report). I'll take another look at the code.
-
yes, the filament runs on the outside diameter of the 26mm encoder wheel for now. later I will change that to a smaller diameter
-
I found a likely explanation for the absurd values. Please pick up a new binary from https://www.dropbox.com/s/iq9pzfaugyfei7x/Duet2CombinedFirmware.bin?dl=0.