Consumed filament in Marlin
March 21, 2019 01:14PM
Hi,

I need to know what is the length of filament which was extruded by the printer. I am using Arduino Mega with Ramps and the control software is Marlin. The cheapest solution (and for me also the best) is to check it in the Marlin - how many filament has been already consumed (or extruded) by the printer (like counting the revolutions of extruders motor and then calculate the length via diameter).

Another option is to use rotary encoder for that - but this is not the best solution for me because I dont have too many free pins on Ramps board and I would have to modificate extruder - so in the future it would be harder to upgrade the extruder.
I am already using modificated version of Marlin so it is no problem for me to add some lines...

Does anybody know if there is a variable in Marlin which calculates the length of the extruded filament? Or if there is a variable which knows total number of revolutions of extruder stepper motor? And in which file of Marlin the variable is?
Thank you for your answers!
Dan
Re: Consumed filament in Marlin
March 21, 2019 09:00PM
Don't think its in standard marlin

but in prusa firmware they have statistics including total filament extruded

look for total_filament_used in Marlin_main.cpp in prusa firmware [github.com]
Re: Consumed filament in Marlin
March 22, 2019 03:26AM
OK I will look there. Thank you for your answer smiling smiley
Re: Consumed filament in Marlin
May 16, 2019 05:00AM
Don't forget that retraction needs to be deducted and not added just to make it extra complicated. I suppose it could be done externally by counting pulses to the stepper driver and monitoring the direction pin if Marlin can't handle it.
Sorry, only registered users may post in this forum.

Click here to login