Extruder motors skip steps with pressure advance enabled
-
@wilriker said in Extruder motors skip steps with pressure advance enabled:
@edgars-batna I couldn't help and had to get my machine back working to try to print the EccentricGearTest non-volumetric. Only a couple of layers though because I only sloppily set it back to working condition and it was unable to cope with the high jerk for Y. Anyway, until I stopped it there were no observable skipped steps for the extruder. running with PA at 0.1s. Also no issues reported in
M122
(which I would not expect also on your side).M122 never reported any errors for me.
There are places that take the speed changes and extrusion amount into consideration in the code and I'm trying to find anything obvious there, but it's a long shot as I'm sure nothing obvious was left there by the mighty firmware devs. With enough jerk and with low enough segment size these parameters are nearing zero. My theory is that there could be a condition when no pressure advance is actually required, but I'm in well over my head now. My other theory is that my family will print a gun and kill me and the printer once it's is up and running first thing in the morning.
-
@edgars-batna said in Extruder motors skip steps with pressure advance enabled:
M122 never reported any errors for me.
Meh! That's what I wanted to say that I do not expect any errors in
M122
in your side either. This happens when you get lost on negations.There are places that take the speed changes and extrusion amount into consideration in the code and I'm trying to find anything obvious there, but it's a long shot as I'm sure nothing obvious was left there by the mighty firmware devs.
I think finding obvious errors is rather unlikely. Simply because those would most probably have affected others as well.
With enough jerk and with low enough segment size these parameters are nearing zero. My theory is that there could be a condition when no pressure advance is actually required, but I'm in well over my head now.
You could try to only print very tight arcs using
G2|G3
. This should result in segments being a short as 0.2mm. if you also change direction as often as you can it should lead to PA not being applied.My other theory is that my family will print a gun and kill me and the printer once it's is up and running first thing in the morning.
I suggest a knife. This is less likely to hurt the person using it.
-
@wilriker I've got more findings. Could you please try something for me:
- Remove filament
- If possible, remove or disconnect axes so that motors can run at high jerk. We need to achieve high jerk, or the problem does not occur.
- Try to get to at least 1500 jerk, ideally 2000 for XY and around 1000 for E.
- Accelerations can be set to same values as jerk. Top speeds are unimportant, but at least 30mm/s on XY and, I dunno, 75mm/s for extruder. We're running without filament and, potentially, the axes.
- If running with axes, make sure you've got space for at least 200mm for X and 100mm for Y movement.
- Set E microstepping to 16, volumetric or non-volumetric doesn't matter, I suggest trying both. Obviously this only works for low stepsPerMM extruder setups, so for geared extruders the values might need to be way higher.
- Set PA to 0.6 for the test: M572 D0:1 S0.6
- Enable cold extrudes: M302 P1
- Run this macro: 0_1548503110156_PA tiny segment test 4.gcode
I've found that unless I increase XY jerk to above 1500 skipping barely happens on my printer.
The skipping is caused by these small segments:
G1 X172.798 Y66.774 E0.00764
G1 X172.616 Y66.956 E0.00764
G1 X172.550 Y66.983 E0.00211
G1 X171.617 Y66.983 E0.02771
G1 X171.551 Y66.956 E0.00211
G1 X171.369 Y66.774 E0.00764
G1 X171.187 Y66.956 E0.00764
G1 X171.122 Y66.983 E0.00211
G1 X170.189 Y66.983 E0.02771
G1 X170.123 Y66.956 E0.00211
G1 X169.941 Y66.774 E0.00764
G1 X169.759 Y66.956 E0.00764
G1 X169.694 Y66.983 E0.00211
G1 X168.760 Y66.983 E0.02771And there is a semi-sudden change in behavior depending on printer configuration where skipping appears and is rampant. It must be related to startSpeed == endSpeed == topSpeed condition, but I'm still just building up theory and repro cases.
-
@edgars-batna Looks like could be homing in on something. I had a notification from GitHub that you had made a comment regarding the issue I raised with Slic3R generating "random" segment lengths for arcs. This was once thought to be the root of the problem that I was having with PA. AFAIK, the slicer issue was never fixed but eventually something changed in firmware and the problems I was having went away. Sooooo.....
If I get chance, I'll run your gcode file on my machine - I can run at those accels and jerk settings without probs (although my machine doesn't print well with those values). For test purposes, without filament, I can set steps per mm the same as yours (and mixing ratios too). Give me some time though - I'm in the middle of quite a large print run........
-
@deckingman Interesting coincidence. For reference, here's the slic3r PE issue: https://github.com/prusa3d/Slic3r/issues/1000
The thing about pressure is that in the gcode I posted above it alternates between 0.0297 and 0.0296 and I don't see any obvious means to take such errors into account and prevent PA from happening. This low-precision stuff is something that should have been left to rot in the past...
There are a few things I'd like to try in the code using the process of elimination to see how the behavior changes, but I'm afraid to brick my Duet (yeah, I'll try it anyway).
-
@edgars-batna Yes, that's the one I started - I'm irp53 on Github - (my initials and year of birth). Guess you must be mdealer.
You could try a different slicer - see if it makes any difference? - Just a thought.......
-
@deckingman said in Extruder motors skip steps with pressure advance enabled:
@edgars-batna Yes, that's the one I started - I'm irp53 on Github - (my initials and year of birth). Guess you must be mdealer.
You could try a different slicer - see if it makes any difference? - Just a thought.......
Yes, mdealer - that's me.
So far I haven't seen any free slicers that work as expected. Slic3r came close, but is nearly abandoned now. Slic3r PE is now the best one out there as far as I can tell. It has bugs, but it's actively moving forward. They've done a good job so far, even considering the bugs. They've worked around so many other issues already (e.g. Perl).
Btw, I'm modifying and testing the firmware as we speak. Just by commenting out extrusionPending (the fraction from previous move, which was added in 2.02) extruders no longer skip as hard. They still skip, tho, which sort of confirms that this can be an old issue. Tightly balancing between 3-4 potential problems in some corner cases here and my printer has "corner case" etched all over it.
-
@edgars-batna Yes I agree with you about slicers. Tried them all - free and paid. My problem is multi-colour with 5 extruders - none of them do that well (if at all) apart from Slic3R. PE version of slic3r is now too tightly aligned with PE firmware for MMU style multi colour printing so I have to turn off all that stuff and use my own macros and post processing scripts. I'm actually starting to hate it with a vengeance and reverted back to non PE Slic3R. There has been a bit of movement on non PE Slic3R - there are some dev versions around which aren't bad.
Brae of you to modify and test the firmware - I wouldn't know where to start with any of that stuff.
-
Late to the party here....
My printer has a single 40mm NEMA-17 motor running at <1.5A and it pushes the filament much harder than necessary to extrude for printing even at 200 mm/sec print speed. A recent operator error jammed the hot-end and the extruder pushed the filament so hard that it pushed out the Bowden tube- I lowered the current so the motor would skip if that happens again. It runs smoothly and quietly and the motor doesn't get hot enough to need a heatsink, even in a 50C chamber.
Forgive me if my analysis is too simple, but I noticed you've got two NEMA-23 motors running at 2.4A each, pushing on a single piece of filament, and they are covered with heat sinks. Are they getting that hot? The config files you posted at the top of the thread set motor current to 2.5A (all motors) and the spec sheet you posted a little later says the motor is rated for 2.1A. A more recent post has the XYZ motors down to 2.1A, but the extruders are at 2.4A, the limit of the firmware/board.
In my limited experience, running steppers above their rated current leads to rough motion and excessive heat. Have you tried lowering the motor currents? Is there a fan blowing on the controller board? It's probably getting pretty hot. Hot driver chips might cause rough motion and strange behavior, too.
-
@mrehorstdmd I'm aware of the problems regarding overheating. With cooling fans and heatsinks the motors stay acceptable to the touch, even at higher amps. The board is cooled from both sides. I've actually lowered XY and Z current to 2.1 and 2.0 respectively since then. I've tried lowering E current to 1.5 and it had no impact and, since I'm diagnosing lost steps on E, I'd rather have them in overdrive to rule out torque problems. Right now I've got a Nema 23 and Nema 17 in push-pull arrangement respectively. The Nema 23 is rated at 3A and is getting hotter than the 2.1A Nema 17, which indicates inefficient operation like lost steps etc. If the motors are faulty, I'd rather have them blow up immediately.
I've actually narrowed down a few things in code since yesterday and there seems to be multiple "issues" at play here:
- The accumulated rounding error correction causes a snowball effect on very tiny segments when jerk is high.
- Pressure advance is applied to these tiny segments when the pressure is not actually changing or is changing just marginally (less or equal than 0.0001 mm/s), causing lost steps.
Now, I'm totally new to programming 3d printers, so pardon if I'm getting some things wrong. As soon as I've got something tangible in the code, I'll make pull request on github or a patch, or I'll disassemble my printer and eat it.
-
@edgars-batna OK, I was trying the short Gcode segment you posted together with the settings you listed and I can now reproduce skipped steps on my machine with 100 steps/mm@x16. Even if I reduce the speed factor to just 1% the behavior will stay the same.
@dc42: the instructions and code snippet in this post can reproduce this error also for me. So this seems to be either a firmware bug or a physical limitation with low-steps/mm-extruders.
-
@wilriker It'll be a while until I get anything meaningful as there are a ton of computations and I don't know how to debug this CPU over USB or even if it's possible. I assume it's possible as there are drivers in the github repo, but what tools are used, I've got no idea... except that it must be a flavor of gdb and I might need Atmel Studio.
Any pointers from anyone?
-
@wilriker said in Extruder motors skip steps with pressure advance enabled:
@edgars-batna OK, I was trying the short Gcode segment you posted together with the settings you listed and I can now reproduce skipped steps on my machine with 100 steps/mm@x16. Even if I reduce the speed factor to just 1% the behavior will stay the same.
@dc42: the instructions and code snippet in this post can reproduce this error also for me. So this seems to be either a firmware bug or a physical limitation with low-steps/mm-extruders.
Thanks for reproducing it. I have added this to my list of pending investigations. As you say, it may be an issue triggered by low steps/mm extruders and short segments.
-
@wilriker @dc42 As discussed, I've been experimenting with source code:
https://github.com/mdealer/RepRapFirmware/commits/pressure-advance-skips
Expect blatant errors... it would be interesting to hear any thoughts. Nevertheless, the implementation works way better for my printer, but it obviously prints slower now. On the bright side, no longer any lost layers or extruder skips on any print I've run. Lots of retractions are also not a problem anymore. It now obeys extruder InstantDv more.
The longest test so far was 8 hours on my CoreXY. I'd upload a binary, but I do not want any unsuspecting souls trashing their printer without the devs looking at this first. The logic by which it slows down on high extrusion compensation is a dirty hack somewhere between DriveMovement and DDA and that rounding error bug check override right there is sketchy at best. Oh, and it uses a bit more memory and CPU...
Anyways, maybe this helps anyone. Is it alright if I post a binary of this?
-
Just a heads-up. There are a few things I do not understand yet, but I've found the same issue again or another, potentially related, issue.
GCode for big printers: 0_1551297623857_icicles pa test more retraction big.gcode
GCode for smaller printers: 0_1551297617481_icicles pa test more retraction.gcodeResults:
On the left - 2.02 and 2.03beta2
On the right: my modified branch where I basically switched to doubles and dropped "extrusionPending" in PrepareExtruder and a few other speed or rounding related things. The layers are WAY more even, but I can't get the underextrusion at the start of the move under control.I'd like to assume that the uneven layers experienced by some users could be caused by something from here. I'm getting this uneven layer thing on all prints and it's always the same. If I juggle the maths a bit the pattern also changes and stays predictably the same.
-
Dear
I was also trying to tune Pressure advance, I also noticed steps being skipped , I did many testing with many different configurations , My conclusion is that PA is skipping steps due to a much to high acceleration on short segments , on a cube of 50x50x50 for exemple I saw no skipping steps but as soon as I use a different model with circular and a grove β for example 6mm in diameter with a grove intersecting with the circleβ I start to get losses in steps if I increase my jerk by a lot I get a much reduce loses of steps , but then the other models get under extruded at some places.
I hope it can help, cause it would be nice to have it working optimally, the shape corners get a much nicer with PA
Best Regards
Manuel -
@mrt said in Extruder motors skip steps with pressure advance enabled:
I start to get losses in steps if I increase my jerk by a lot I get a much reduce loses of steps , but then the other models get under extruded at some places.
Which jerk setting? XY jerk has a completely different effect to extruder jerk:
-
Increasing XY jerk will allow curves to be printed at higher speeds. This can avoid the printer speeding up and slowing down on each line segment in the curve, so pressure advance is not needed during the curve. Increasing XY jerk too high can lead to the XY motors skipping steps.
-
Increasing extruder jerk has the side effect of allowing higher extruder acceleration, although the M201 extruder acceleration limit will still be honoured. If your extruder is skipping steps then this may be a sign that your E jerk is set too high.
So you might want to try increasing XY jerk and reducing E jerk.
-
-
Dear DC42
in my mgs I was referring to E jerk, I use E400 with pa enabled and it is skipping steps but not in an extreme way, if I disable it no skipping steps. I normally use E1000 a E1500 without pa and working well but with pa I get extreme step skipping
my Xy Jerk are tuned to have almost no ringing "X900 Y900" I can go to 1200 but then very small ringing start appearing .
Best Regards
Manuel