-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extruder "Advance" Functionality #3867
Comments
Comment by Roxy-3DPrintBoard It would be helpful for me to see close up pictures of a JKN improved print versus a 'Normal' print. Does anybody have a way to get both pictures so it is easier for us to visualize and discuss the properties? |
Comment by Sebastianv650 OK here is what I plan to do on next Saturday (hoping a have enough time):
I think I found out whats the problem with both existing advance implementations: |
Comment by alexborro Sebastian, as far as I know - at least in marlin - the advance has its own Cheers. Alex. 2016-04-14 12:42 GMT-03:00 Sebastianv650 [email protected]:
"Não é o mais forte da espécie que sobrevive, nem o mais inteligente. É Alex Borro |
Comment by Sebastianv650 @alexborro thats right, but the esteps addition is made in the usual ISR. They are only executed by a seperate ISR. I don't get the purpose of this to be honest, I think that's not absolutely necessary. |
Comment by alexborro It is strange. I think we should understand how a good advance algorithm should work and @Sebastianv650, if you could spend some time making some doc about what you We can create a branch off of Marlin to work together. Cheers. Alex. 2016-04-14 13:07 GMT-03:00 Sebastianv650 [email protected]:
"Não é o mais forte da espécie que sobrevive, nem o mais inteligente. É Alex Borro |
Comment by Sebastianv650 I did a quick-and dirty presentation about the basics I got up to now: I hope it is enough for a first step, I want to spend my time into coding now. I'm very excited if my aproach regarding new advance step distribution will work! |
Comment by jbrazio Great info, great investigation, great work ! :double-thumbs-up: It makes perfect sense that dV will vary between |
Comment by Sebastianv650 I'm currently looking for some existing dt.. We have an acceleration_time and a deceleration_time used by the ISR. They are used to calculate when the next interrupt has to happen. But I don't get the unit they use, maybe someone can help? Anyone has a better idea how to get e velocity? Looks like I have a little mental block.. Edit regarding acceleration_time: Dumb question, it proves my last ATmega project was some years ago.. Of course this is due to the timer / prescaler settings. 1ms = 2000 "cycles" for the settings used in Marlin. Perfect, so everything we need as input is already calculated! |
Comment by alexborro What if we put all the esteps related calc in a separated place?? I mean, Does it make sense?? [image: Imagem inline 1] 2016-04-16 10:18 GMT-03:00 Sebastianv650 [email protected]:
"Não é o mais forte da espécie que sobrevive, nem o mais inteligente. É Alex Borro |
Comment by Sebastianv650 Maybe I'm not understanding what you are meaning, but the calculation for advance is only 3 or 5 extra lines. I would go the other way round:remove that unnecessary extra advance isr and do the esteps inside the main ISR as it's done without advance. |
Comment by jbrazio Do you believe we can create this as a self contained object ? |
Comment by Sebastianv650 Somebody want's to see some awsome pictures? I printed two identical test cubes: 20x20x2mm, 0,2mm layer height, 80mm/s print speed, 500mm/s² accel. to see the distribution. Here you go: Pictures Now the code needs some testing and streamlining, then I call it ready to share! |
Comment by CCS86 Dude, @Sebastianv650 , that looks outstanding!!!! I am super excited about this! |
Comment by jbrazio Congrats, that looks awesome ! |
Comment by Nandox7 Great work done there! That is cool. In regards to the results cube when using K=0, why the warped corners? -Nando On 18 April 2016 at 17:32, João Brázio [email protected] wrote:
|
Comment by jbrazio
Due to the [high] printing speed. |
Comment by Sebastianv650 @Nandox7 , @jbrazio is right it depends on the print speed. That's why you should print the perimeters slow without advance. The faster you go, the more the edges will bleed out. If you print at or around jerk speed, the edges will be perfect. But than a big print will take ages.. |
Comment by alexborro Nice work Sebastian! If you don't mind sharing the code, I would like to merge it into my branch Cheers... Alex.
|
Comment by Sebastianv650 I created a fork of Marlin RCBugfix and added my changes: Any comments are welcome, consider it as a working draft. The goal is to improve the code until everyone is happy and we can transfer it into Marlin. What should be tested: One important thing is still open in the code: Edit: And the M905 code was only choosen because it was free, if someone has a better idea where it would fit - tell us! |
Comment by jbrazio So you have completely removed this method ? // extruder advance constant (s2/mm3)
//
// advance (steps) = STEPS_PER_CUBIC_MM_E * EXTRUDER_ADVANCE_K * cubic mm per second ^ 2
//
// Hooke's law says: force = k * distance
// Bernoulli's principle says: v ^ 2 / 2 + g . h + pressure / density = constant
// so: v ^ 2 is proportional to number of steps we advance the extruder
//#define ADVANCE
#if ENABLED(ADVANCE)
#define EXTRUDER_ADVANCE_K .0
#define D_FILAMENT 2.85
#endif |
Comment by Sebastianv650 The original advance is still there, my implementation is quite different so I wasn't able to reuse code. So I created a new LIN_ADVANCE because I wasn't sure if somebody wants to keep the original thing. |
Comment by jbrazio If we improve then this one shall replace the other, re using as much as possible (not the code) but the configuration flags. If you don't mind cleaning the code from the previous unused implementation that would also be appreciated. |
Comment by Sebastianv650
Got it. Marlin will collapse very short moves to the next longer move. If a short move is executed together with a retract or unretract move, this leads to an unwanted hughe advance step mounts. The math is correct, but advance together with retract moves is unwanted. I have to find a way to filter is one out. A workaround is to compare bse and allsteps, if they are nearly equal it is a retract or unretract move. |
Comment by Sebastianv650 @jbrazio, no problem, I could do that. But there is one thing to consider: |
Comment by alexborro @Sebastianv650 I have a bowden system to test. And believe me, it is possible to have faster bowden extruder, with correct gear ratio. Mine is capable of 85mm/s. By why does it need a lot of steps in the end of a line?? I understand in the beginning - the advanced steps - but it should be subtracted from the esteps in the end of a line, shouldn't it? |
Comment by Sebastianv650 I know a bowden can be as fast as a direct drive, but I'm afraid it has to be much faster then a direct for this. Think of the filament between the nozzle and your extruder as a spring. If you have to bring this spring to a specific force by compressing it, that might be no problem if your spring is short. If your spring is 10x longer, which means it's much "softer", you have to do a lot more travel mm to reach the force needed in the same time.. You are right, the beginning is the chalanging part. If it can handle the "jumpstart", the break down will be no problem. |
Comment by CCS86 It seems to me that the machine's acceleration settings will have a On Tue, Apr 19, 2016, 2:03 PM Sebastianv650 [email protected]
|
Comment by Sebastianv650 I noticed that I get too much material extruded with advance enabled, which is most noticeable on small details with 100% infill like the top of a cone. To track this down, I created a counter for the sum of all esteps due to advance and another one that counts the time spent accelerating and decelerating. In theory, they should be both 0 after each print - you can't come to a stop if you are always longer accelerating than decelerating. In reality, both values gets bigger over time which means Marlin is always longer in accel. than decel. Anyone has an idea what's wrong in my thinking? You can try it very simple with a static long counter_timer variable in stepper.cpp. Add all "timer" for accel., subtract all "timer" during decel. |
Comment by alexborro The number of acceleration is not equal to deceleration due to jerk and About the amount of extruded material, are you sure you are not changing Cheers. Alex. 2016-04-20 13:35 GMT-03:00 Sebastianv650 [email protected]:
"Não é o mais forte da espécie que sobrevive, nem o mais inteligente. É Alex Borro |
How difficult would it be to merge your code into the 1.0.x branch of Marlin? Part of me wants to try the new 1.1.x RC, but I'm a little worried about all the safety stuff being 100% online, and I'm not sure if anyone has set it up for an Ultimaker yet. |
Duplicate of #3676 |
I think I don't get your chart to 100%. What do you mean with 1 turn / 2 turns and what are the differences between the 4 plots in generall. The short description below is a bit confusing to me, do you tested different heat blocks or extruders? Beside this, I think you might have a problem not related to the intention that an advance function has. Advance only adjusts for the effects during acceleration / deceleration, where the main portion is comming from the springiness of the filament but there are a lot of other smaller factors that are not covered from any implementation at the moment. So advance tries to cover a dynamic behaviour. When you measure the wall thickness of a "suitable long" straight wall at different speeds, where suitable long means it's much longer than the acceleration distance, you should see a stabilised flow with and without advance active. Therefore, also the wall thickness should be equal through all test cube speeds. If it's not, you have a slipping extruder to filament drive. Think about it: If the filament wouldn't be slipping in the extruder gear and you see less extrusion than your extruder speed should result in - where is the delta filament volume gone? It can't disapear. |
Hi @Sebastianv650 - only just saw your comment now - Yes I 100% agree that the delta filament cannot disappear - hence my test to try and find cause. Also looking to see if linear advance can fix the problem seen in the graphs. As stated the graphs should be a straight line, until the speed increases such that the heatblock can no longer keep up, and then what will happen? If it cant shove the filament through, then either it compresses ( and oozes out during the next move ), or the extruder slips. |
Maybe #9852 will give you some informations. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
2 similar comments
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue by CCS86
Thursday Apr 14, 2016 at 13:41 GMT
Originally opened as https://github.com/MarlinFirmware/MarlinDev/issues/402
We seem to have some interest now in retooling the "Advance" function in Marlin, and had a good discussion in another issue, here: https://github.com/MarlinFirmware/MarlinDev/issues/77
Here were the key points:
The text was updated successfully, but these errors were encountered: