Interested in pressure advance algorithm



  • @dc42 Was wondering if you could point me in the direction of the code for the pressure advanced algorithm. my printer prints really well can print really fast but when it prints fast it has problems rounding corners and making certain shapes because obviously the problems that exist with acceleration deceleration and extrusion.

    I'd like to see if I can play with the algorithm see what can be done.


  • administrators

    There is a good web page somewhere explaining the theory, but I can't find it. Basically, pressure advance assumes that the extrusion force needed increases linearly with extrusion rate, and the stepper motor and Bowden tube together behave like a spring so that when the extrusion force is increased, additional movement is needed to take up the springiness. So instead of commanding a stepper movement M that is equal to the extrusion rate E, we need to add an extra term proportional to the rate of extrusion. That is, instead of setting M = E we set M = E + K * dE/dt where K is the pressure advance factor.

    The implementation is divided between firmware source files DDA.cpp and DriveMovement.cpp. In particular, function Prepare calculates some parameters for the movement, and function CalcNextStepCartesian generates steps pulses at the correct intervals using those parameters.



  • @dc42 very cool. I took a look. I didn't realize g that the firmware was so low level, I kinda thought it was just a hair higher level, but obviously can't be too high, as, it is firmware.

    Am I correct in thinking that ghosting can be influenced by this code? And is there any where else to look into tweak that?


  • administrators

    Ghosting is normally caused by ringing, not by incorrect pressure advance.



  • @dc42 thanks, that makes sense.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.