Sensorless Filament Monitor
-
Hi folks,
i'm working on an sensorless filament monitor based on energy consumption.
I stareted with the following question:
are we able to detect, if the printer is actual printing / extruding filament without an additional sensor?My assumptions are the following:
- we know the heater energy
- we can estimate the energy needed to heat up the extruding filament
- we can compare both and if the heater energy provided is (much) lower than the energy needed to heat up the expected extruding filament, then a filament error is occured.
What I think, what we need to solve the problem:
- tell the firmware the heater power in watts
- tell the firmware the filament diameter (M200)
- tell the firmware the specific heat capacity of the filament (can be automatically estimated)
based on these values
- we can calculate the current heater energy/second
- we can calculate the current required energy to melt the requested filament
- we can compare both taking into account the lag between both values or
- we can sum up the values over time to compare the used and required energy after some time, I suggest to use the heater dead time
I did that and wrote a small pice of code to test the idea, you can find it on github.
https://github.com/Duet3D/RepRapFirmware/compare/3.4-dev...timschneider:3.4-dev_sensorless_filament_monitor_on_energy_comsumption?expand=1I figured out that it is actually a little more complicated, because of the heat losses and so one
What do you think is it worth to go further?
And maybe someone can help me on estimate the bed heater gain - I don't understand the physics of that. I have a horizontal plane transmitting heat by radiation and convection to the hotend, but on the same time increasing the heat losses based on convection of the heater and this is all related to the distance of the bed heater to the hotend ... I just estimated it for my printer by empirical analysis.
At the end it works very well for me. after 3*deadtime (15sec for me) I can say for sure, if the hotend is extruding new filament and if there is a grinded or broken filament.
-
My filament sensors are well before the hotend. Thus they can detect a break long before the break reaches the hotend.
You scheme would be detecting issues at the hotend itself.
Not sure how that would affect things in real world usage of filament detection.
Interesting approach.
Frederick
-
@fcwilt
Yep, my normal filament sensor (switch) is also mounted at the beginning of the bowden, the printer itself is a direct drive and the bowden is just used to supply the filament to the extruder. But we where faced with the problem of broken filament in the bowden or grinded filament in the extruder. -
I think this is a really interesting idea that detects "lack of extrusion". The question to be thought about for whether it's worth additional time investment is one of what actions the printer should take if this is detected, and also how frequently this happens and what it's impact is.
My opinion is that it happens often enough when there is a clog in the extruder (or other issue) that results in grinding. If can be detected quickly enough and the print paused, then it may be possible to clear the clog and resume the print. However, I don't think 15 seconds is "quickly enough". In this time, a printer running at 100mm/sec may have missed 1.5M of filament deposit and that's quite a lot.
But maybe watching extruder motor current could detect at the onset of grinding? This would require the fw to create a "target range" for motor current based on filament feedrate. If the current exceeded the target limit, grinding would be assumed, the print paused and some action taken.
But how to set expectations for motor current and feedrate? An empirical approach could be taken if it's possible to grab the current feedrate and motor current. These could be echoed out to a file and a bunch of prints done that do not grind. Then the data could be analyzed to determine "normal" current/feedrate ranges. Finally, forcing grinding (grabbing the filament) could be done to see if the current does go "out of range". If it does, then there's a reasonable approach for detecting grinding.
One problem I can see (other folks will probably add others) is that this method might be good for a clog, but maybe not for a grinding condition caused by a bondtech-type extruder with insufficient pressure on the filament.
But it would be cool if a print detected a nozzle clog, paused, moved to a pre-defined location, jacked up the extruder temperature and tried to clear the clog through some sharp extrude/retract moves. If it was successful, it could them resume the print. All automatically.
-
@mikeabuilder hi, thanks for your thoughts! Just to get you right, you are speaking about an extruder pushing 1.5 meter filament per 15 second? A printer running 100 mm/sec in X/Y does not run the extruder at that speed. 100mm/sec extruder speed would mean around 637,94 mm³/sec for 2.85mm Filament. We are arleady proud if we can push around 60-80 mm³/sec, around 1/10th of 1.5 meter -> 150mm and thats not that much any more, when it comes to large scale prints.
concering the motor current thoughts. Do you know an interface in RRF for that?
Just to get you right on the other parts: what do you mean by clogging and grinding.
My understanding of clogging is, that the current nozzle of the printer is clogged in such a way, that no filament is getting through the nozzle, which will lead to grinding on the extruder due to the rising back pressure.Grinding is the situation, where the extruder gears (or means) pushing the filament are not able to push the filament anymore for various reasons e.g. to low pressure between the filament and the pushing means, variation in filament diameter and so on.
Underextrusion conditions caused by slip in the extruder drive drain between the pushing means and the filament can of course be detected by this method, because in an under extrusion condition less energy is needed to ehat up the reduced filament. I didn't tested it yet, but i would guess from the numbers. that the method right now is able to detect underextrusion if it is greater than 25% for longer than 15 sec.
the 15 sec are 3*deat time of my heater, e.g. if I push new filament it can take upto 5 seconds before I can see the increased energy consumption in the temperature readings or if the PID is turning the heater on, it takes upto 5 seconds before that is seen by the tempature sensor.
-
@timschneider said in Sensorless Filament Monitor:
the 15 sec are 3*deat time of my heater, e.g. if I push new filament it can take upto 5 seconds before I can see the increased energy consumption in the temperature readings or if the PID is turning the heater on, it takes upto 5 seconds before that is seen by the tempature sensor.
It takes a while for the PID to react to the temperature drop and increase power. RRF 3.4.0 includes an optional heater feedforward function, to increase heater power with extrusion rate. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m309-set-or-report-heater-feedforward.
Another factor that significantly affects the heater power required is the speed of the print cooling fan.
-
@dc42 said in Sensorless Filament Monitor:
It takes a while for the PID to react to the temperature drop and increase power. RRF 3.4.0 includes an optional heater feedforward function, to increase heater power with extrusion rate. See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m309-set-or-report-heater-feedforward.
@dc42 yes, thank you for pointing this out and to give me a hint in that direction, this will significantly reduces the deadtime - but my point was that I think that 15 sec. from broken filament to pause is not a problem. In my case, I speak of printing times in days and filament usage in kilogramms.
Another factor that significantly affects the heater power required is the speed of the print cooling fan.
In my case this is upto 13W of extra power, but it can be determind.
I'm able to calculate the required power in the range of +-/0.1W and provided power - the heat losses total heat losses and fan losses in the range of +-0.25W. I splited the fan function into a part related to deltaT, thats the main portion 7 - 14 W and another related to fan speed.
Until the bed heater kicks in (1800W), that alone brings me down in the region of +-2W because of the stuff I don't understand ... maybe I can get behind it later on. The bed heater gain is related to the required power of the heater over time and distance in relation to the heater.
But even this is good enough to compare the required energy and estimated energy of the heater to set it on fault.
next step I'll do is to automate these factors and try to solve the bed heater gain problem to tell if its a fault or not even faster e.g. within one or two dead times.
-
@timschneider said in Sensorless Filament Monitor:
Just to get you right, you are speaking about an extruder pushing 1.5 meter filament per 15 second?
DOH! I was not clear. It's not 1.5M of filament (inbound to the extruder) in 15 seconds, but 1.5M outbound from the nozzle. So the part will be missing something.
Regarding an interface in RRF - I'm not aware of any gcodes or object model properties that would give a current value. I don't know how the board enforces motor current limits, but if it's done in fw, then there might be a way to get it. I guess it would be possible to add a current sensor.
An interesting, but off topic discussion would be about making a list of the typical things that can go wrong during a print, the action that a user would take if they were present (and noticed), and whether it's possible to monitor in a way that would allow the action to be taken automatically. The present topic is one example about "end of filament", and/or "clogged nozzle" and/or "too-low extruder traction on fialment".