Power function effect on extruder motor rotation under load
The 12 hour topographic print in normal mode completed successfully and is beautiful. It's the best this printer has produced. Surface is nearly free of VFA's and has no weird geometry distortions. It was done in translucent blue PETG because I ran out of gray. Here is a closeup at about 30 degrees like looking down from a plane.. You can see the mountains and valleys. Zoom in and you see the layer lines, but VFA's are tough to find.
Hawkeye, I think it might be helpful for you to see what the power function does to the extruder motor's filament output rate. This is easier to see on the extruder because velocity changes there are over a much larger print distance. You see this as waves on e-core towers. I use my own ecore towers rather than the Prusa ecore tower because I print in PETG. They also vary a chop setting that alters sync of the wave and causes the alignment to shift in angle. I don't alter the sync and this means the visible wave pattern remains at a constant angle. You only see its amplitude change from bottom of tower to top. My tower runs from 1.030 to 1.200 power and changes each 5 mm of tower height.
This was with 1.8 degree motors on x and y so try to ignore the VFA's. Concentrate on the extruder wave that stacks diagonally.
Here you can see that the Moons 1.8 degree stepper does not eliminate all extruder variability. You still see a periodic wave. At the bottom (and very top) of the tower the 1.030 power is barely altering the waveform. You see the filament output rate is periodically diminished.
Going up in power, adds a new point of diminishment in the middle of full flow. I think the torque change created by the higher power is in the correct phase to reduce flow in the middle, but I'm not sure that is what we want to happen. Rather we want the drop in torque to happen nearer the two ends on your graph rather than the central portion.
I am attaching my ecore tower gcodes for both PLA and PETG towers so you can try it yourself on your printer.
The special gcode I used to vary the power with height is..
;BEFORE_LAYER_CHANGE
G92 E0.0
{if layer_z == 5.0}
TMC_SET_WAVE_E30
{elsif layer_z == 10.0}
TMC_SET_WAVE_E40
{elsif layer_z == 15.0}
TMC_SET_WAVE_E50
{elsif layer_z == 20.0}
TMC_SET_WAVE_E60
{elsif layer_z == 25.0}
TMC_SET_WAVE_E70
{elsif layer_z == 30.0}
TMC_SET_WAVE_E80
{elsif layer_z == 35.0}
TMC_SET_WAVE_E90
{elsif layer_z == 40.0}
TMC_SET_WAVE_E100
{elsif layer_z == 45.0}
TMC_SET_WAVE_E110
{elsif layer_z == 50.0}
TMC_SET_WAVE_E120
{elsif layer_z == 55.0}
TMC_SET_WAVE_E130
{elsif layer_z == 60.0}
TMC_SET_WAVE_E140
{elsif layer_z == 65.0}
TMC_SET_WAVE_E150
{elsif layer_z == 70.0}
TMC_SET_WAVE_E160
{elsif layer_z == 75.0}
TMC_SET_WAVE_E170
{elsif layer_z == 80.0}
TMC_SET_WAVE_E180
{elsif layer_z == 85.0}
TMC_SET_WAVE_E190
{elsif layer_z == 90.0}
TMC_SET_WAVE_E200
{elsif layer_z == 95.0}
TMC_SET_WAVE_E0
{endif}
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
Guy, I think the print looks fantastic! Also thanks for the suggestions & code for the ecore towers. I'll definitely do that, once I'm up & running.
I think you may have misunderstood my chart a little. The red dots are what is happening with the stock prusa code. It has the droop in the middle. If you look closely, near the top superimposed on the maximum torque line, are green dots that represent the stator torque for the corrected wave. They are constant, with essentially no variations throughout the complete wave. I probably should have used more colors and spent more time making the chart understandable.
At this rate, I think you will have all the issues resolved before my printer is working. I'm not very mechanically proficient, & your Planar, Parallel and Square process is proving quite a challenge for me to execute 😆
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
What we're trying to correct are position errors, not torque errors per se(though they might be related). but varying the wave from a pure sin wave varies the relative torque between phaseA & phaseB, which shifts the position, while maintaining the same total stator torque.
It is basically two sides of the same medal, at least when the motor has to deliver some torque at all. Because then it matters that the motor pulls toward the correct position AND that it pulls toward this position with the correct torque. In this situation, position and torque are somewhat interchangeable, that is, a positional error can be corrected by adjusting the commanded position or by adjusting the commanded torque. The crucial point is that there is no torque without the true position deviating from the commanded position (which is why 0.9° motors will be more accurate than 1.8° motors - the angular position needs to deviate less in order to build up torque, the maximum torque is reached at a positional deviation of 2 fullsteps, i.e., at 2·0.9° instead of 2·1.8°). So, restricting yourself with a "constant torque" constraint might or might not be useful - depends on the motor, I guess, and by what positional errors are dominantly caused under the targeted working conditions.
mk3s extruder parts printed with 0.9 degree LDO
Did a batch of mk3s extruder parts using standard mode and the 0.9 LDO's on xy and a 1.8 Moons on extruder.
Printer finished job without a hitch.
These are straight off the print plate - no cleaning for strings or any other post processing.
Done with 4 perimeters/40% gyroid fill. 245C nozzle. Low cost, StrongHero PETG filament.
Not a premium filament but I think these look gorgeous.
There is no going back to a stock stepper motor configuration after getting results like this.
Zoom in and take a close look.
Acceleration Limits and Trinamic Spreadcycle Tuning
Two more experiments completed.
1. Does reducing acceleration limits allow 16 microsteps on the 0.9 degree motors?
I wanted to check if badly positioned printing failure in 16 microsteps was was just the Einsy not keeping up with accelerations. Redefined XY microsteps to 16 and HALVED every xy acceleration limit in Marlin. I went with halving because that was a ridiculously big change that should have helped if accelerations were the problem.
Result: Halving accelerations did nothing to fix the shifting/skipping print positions problem. We simply can't run the 0.9 LDO's in 16 microsteps. They have to be at 8 microsteps.
2. What are the toff, tbl, hstr and hend values to use with the 0.9 LDO's?
The motors definitely differ from the stock 1.8 LDO's. There is no reason to expect that the same tuning values would be optimal. Took a few hours with my scope and current probe to check waveforms at various settings and motor speeds. My results are not surprising. The 0.9's should produce less feedback current and one would expect that hysteresis requirement would be lower. Also, changing to 8 microsteps allowed a bit lower toff (higher chop)
Stock motors are tuned by Prusa for x, y and z axes at
toff 3
hstr 5
hend 1
tbl 2
I got cleanest and most consistent sine wave with
toff 2
hstr 0
hend 2
tbl 2
.
That is a lot less hysteresis than the stock motors. Because my z axis motors are stock, I applied the new hysteresis settings to only the x and y axes. The motors are a bit quieter, but they are louder than stock motors.
==== Summary Thus Far
VFA's are caused by stock motors being not completely monotonic when stepping. They can only be slightly reduced (maybe 20%) by tuning Trinamic parameters. Switching to better steppers can nearly eliminate VFA's.
LDO 0.9 degree --> best print quality, but a bit louder than stock motors. Requires patching firmware to function. Can occasionally have a problem detecting home position of axes. For me, the quality improvement is huge enough to put up with the difficulties, but it is somewhat like having an overclocked CPU. It does more, but you gotta take extra measures.
Moons 1.8 degree --> 70% the print quality improvement of the 0.9 LDO's and quieter than stock motors. However twice as expensive. Run with standard firmware.
==== Next Up
Heatsinks are arriving soon for the TMC2130 driver chips. Maybe we'll get stealth more working without overheating.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
It would be interesting to see your opinion of the new LDO cooler steppers. I’ve tried putting one on the x-axis and I think it’s made an improvement
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
That WAS my intention when I ordered the LDO's. Printed Solid shipped me the wrong motors. So I went down the 0.9º stepper path I never intended.
If I were to convince myself to buy yet more motors, I'm more inclined to test a 0.9 degree Moons' vs the 0.9 LDO
Re: Acceleration Limits and Trinamic Spreadcycle Tuning
That is a lot less hysteresis than the stock motors. Because my z axis motors are stock, I applied the new hysteresis settings to only the x and y axes. The motors are a bit quieter, but they are louder than stock motors.
Which current settings are you using now? And are the 0.9° motors louder in general or just at higher speeds?
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I have them at stock settings right now. Really love how they are defined in two places in the firmware.
Configuration_prusa.h
#define TMC2130_CURRENTS_H {16, 20, 35, 30} // default holding currents for all axes
#define TMC2130_CURRENTS_R {16, 20, 35, 30} // default running currents for all axes
#define TMC2130_UNLOAD_CURRENT_R 12 // lower current for M600 to protect filament sensor
tmc2130.cpp
//running currents for homing
uint8_t tmc2130_current_r_home[4] = {8, 10, 20, 18};
Probably should boost the x axis homing a little. X-axis doesn't always detect home properly. Fails about 1/8 times. Interestingly printer never fails to home x right after printer power down and up. It's just sometimes after it has completed a prior print job. I have stallguard threshold adjusted down to 0 for homing and 1 for x,y axis. That always works for y, but just the x is occasional issue.
Reading through the TMC2130 datasheet, I see a reference in stealthchop to setting IRUN. That seems to be set in the firmware using TMC2130_CURRENTS_R even for stealth mode. Maybe drop the currents to ridiculous low value and see if that cause motion failure to stealth mode to check whether those current values are used during stealthchop.
The LDO 0.9 is louder in general. About like the print fan when in spreadcycle. Stealth is quieter, but still need to add cooling before more testing in that mode. I don't know if this is 0.9's in general. Might also be build dependent. Going from 1.8 stock LDO to 1.8 Moon's was a big reduction in audible noise. That was just the motor build making the difference.
Also, reading around on some other printer brand forums, Stealtchop is often reported as a higher thermal load and some are adding active cooling and heatsinks to get it working reliably.
--------
I put together some motor specs. I think the Moons' MS17HA2P4100 0.9 degree unit might be a better choice than the LDO-42STH40-1684MAC I have on the machine. It might allow a bit more headroom for the TMC2130.
1.8 degree motors
LDO 1.8º Prusa Stock LDO-42STH40-1004A (XYE) <-- produces VFA's in print unless bearings & rods are bad enough to mask problem
Voltage 6.5 V
Resistance 6.5 ohm
Current 1.00 A
Holding Torque 0.48 Nm
Weight
Inductance 3.2 mH
LDO 1.8º "Cooler" LDO-42STH40-1004ASR <-- untested yet, but designed as Moon's rival. ( I have some on order for testing)
Voltage 4.1 V
Resistance 4.1 ohm
Current 1.0 A
Hold Torque 0.47 Nm
Weight 280 gm
MS17HD2P4100 Moons 1.8 <--- drop in replacement gives good reduction in VFA's without firmware mods. $50 cost
Voltage 3.9 volt
Resistance 3.9 ohm
Current 1.0 A
Hold Torque 0.48 Nm
Weight 280 gm
inductance 8.9 mH
0.9 degree motors (Requires modified firmware)
LDO 0.9º LDO-42STH40-1684MAC <--- Ultimate print quality improvement. El cheapo 0.9 makes big leap beyond Moon's 1.8 print quality.
Works in spreadcycle but hits TMC2130 thermal limit for stealth. $15-$25, cheap for lots of print improvement, but may not be best choice.
Voltage 2.8 volt
Resistance 1.65 ohm
Current 1.68 A
Hold Torque 0.36 Nm
Weight 280 gm
Moons 0.9 MS17HA4P4200 <-- probably worse than LDO 0.9 due to higher current requirement. Would not select this one.
Voltage 2.22 volt
Resistance 1.11 ohm
Current 2 A
Hold Torque 0.25 Nm
Weight 230 gm
inductance 2.5 mH
Moons 0.9 MS17HA2P4150 <---- probably slight better than LDO 0.9, but still pretty high current
Voltage 2.97 volt
Resistance 1.98 ohm
Current 1.5 A
Hold Torque 0.4 Nm
Weight 290 gm
inductance 5.4 mH
Moons 0.9 MS17HA2P4100 <--- likely better choice than LDO 0.9 (bhawkeye has this but still building printer. I have ordered for testing)
Voltage 3.9 volt
Resistance 3.9 ohm
Current 1.0 A
Hold Torque 0.39 Nm
Weight 290 gm
inductance 11.2 mH
😮 The base printer has become, as usual, a tiny fraction of overall hobby cost.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
Probably should boost the x axis homing a little. X-axis doesn't always detect home properly. Fails about 1/8 times. Interestingly printer never fails to home x right after printer power down and up. It's just sometimes after it has completed a prior print job. I have stallguard threshold adjusted down to 0 for homing and 1 for x,y axis. That always works for y, but just the x is occasional issue.
You can also try negative values for stallguard.
Reading through the TMC2130 datasheet, I see a reference in stealthchop to setting IRUN. That seems to be set in the firmware using TMC2130_CURRENTS_R even for stealth mode. Maybe drop the currents to ridiculous low value and see if that cause motion failure to stealth mode to check whether those current values are used during stealthchop.
Yes, IRUN is also used for stealthchop. Not sure though what Prusa's firmware is actually using for IRUN, I mean whether they are using TMC2130_CURRENTS_H or something else.
The LDO 0.9 is louder in general. About like the print fan when in spreadcycle. Stealth is quieter, but still need to add cooling before more testing in that mode. I don't know if this is 0.9's in general. Might also be build dependent. Going from 1.8 stock LDO to 1.8 Moon's was a big reduction in audible noise. That was just the motor build making the difference.
I don't think that 0.9° motors are louder in general. Maybe it is rather about low current motors vs. high current motors. And yes, motor build is certainly a factor.
I put together some motor specs. I think the Moons' MS17HA2P4150 0.9 degree unit might be a better choice than the LDO-42STH40-1684MAC I have on the machine. It might allow a bit more headroom for the TMC2130.
I agree, the MS17HA2P4150 is a good candidate. I wonder if its smaller brother (35mm length, MS17HA4P4150) would do the trick as well and what advantages (or disadvantages) it might bring besides having a lower rotor inertia (which might not be so relevant).
Motors Motors Motors - Maybe we should shift to a new topic
Sorry I must have edited my post to add the MS17HA2P4100 after you read it.
MS17HA2P4100 is an even better match by spec. A pair of them should arrive today. I'm hoping they will allow Stealthchop to work and have a bit more current feedback for stallguard.
I also have some of the LDO Cool 1.8's on order again. I would like to see how those compare to the Moons' 1.8 motors, but probably won't end up using them on long term basis. The 0.9's yield SO MUCH better print quality. I doubt the LDO Cool 1.8 are so monotonic that they can outperform 0.9 degree motors, but we will test and see.
The extruder isn't going to a 0.9 degree due to its higher torque requirement. Moons 1.8 on the extruder is more consistent than the stock LDO, but even that is not perfect. Seeing the LDO cool in the extruder would be interesting, but it is a hassle swapping out the extruder motor. The x and y I can swap in a couple minutes without. The extruder - that's a tear down - maybe twice if the LDO cool 1.8 is worse than the Moons 1.8'. Will see if xy is comparable to the 1.8 Moon's. If they perform worse on xy than Moon's 1.8, not much reason to test on extruder.
Right now, I'm betting ideal configuration for surface finish quality will be..
0.9 Moons MS17HA2P4100 on x & y
1.8 Moons MS17HD2P4100 on extruder
LDO 0.9's on xy are half the cost, but have a few issues. I would use them long term if there was no alternative. If 0.9 degree Moon's MS17HA2P4100 can get as good or better surface finish with less hassle, the cost is worth it.
We've gotten a bit farther afield from just trinamic chop tuning. Should we continue in this thread or start a new one for motors?
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I'm making and marking this post as an answer so people won't have to read too far before finding out that the stock Prusa/LDO stepper motors themselves are the issue causing VFA's.
Jump a few pages into this thread to find out about the huge difference better 1.8 degree and 0.9 degree stepper motors make with VFA's.
More monotonic stepping 1.8 Moon's achieve a far bigger improvement than 2 month of Trinamic driver tuning.
A 0.9 degree stepper goes even further and makes the VFA's nearly disappear.
Surface finish quality IS affected by stepper motor quality.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I've got the cooler LDO on my x-axis, and I've got 2 more ordered. My MK3S upgrade kit should be here in the middle of next week. I'll be stripping down the extruder to install that, so I'm going to put a cooler LDO in when I'm putting it back together. I'll post results when I've got it installed - I don't think I'm going to have time to produce suitable "before" and "after" photos, so it'll likely just be "after" photos.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I've got the cooler LDO on my x-axis, and I've got 2 more ordered.
Yes. Definitely let us see how they perform on the y and e axes when you get it put back together.
I'm most interested in Y-axis VFA's and how it does in the extruder.
Bunny scientists want to know...
Re: Motors Motors Motors - Maybe we should shift to a new topic
MS17HA2P4100 is an even better match by spec. A pair of them should arrive today. I'm hoping they will allow Stealthchop to work and have a bit more current feedback for stallguard.
When it comes to StealthChop, I guess the 1A is the safer option. It is just that the higher current motors appear to deliver the torque over a wider speed range, also meaning that the sine wave is less distorted (= more quiet motor) at higher speeds.
We've gotten a bit farther afield from just trinamic chop tuning. Should we continue in this thread or start a new one for motors?
Yeah - might be a good idea to start a new thread, maybe in the forum's hardware section this time.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
Let's continue this in the new thread
I'm keeping in user mods forum because hardware seems to be for stock hardware. New steppers probably is more of a modification than help with existing hardware.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I'm making and marking this post as an answer so people won't have to read too far before finding out that the stock Prusa/LDO stepper motors themselves are the issue causing VFA's.
This is a good idea. Maybe you can add a statement on how these findings relate to the different axes? A lot of people exchange the extruder motor for a 0.9 LDO, they might come here looking for answers. But as far as I understand it, this thread focusses on X- and Y-axis?
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
As far as the overheating problem is concerned, I am afraid there is not much you can do about it. At higher speeds (or not so high speeds for 0.9° motors), StealthChop will always go full throttle and the only thing keeping the current from going through the roof is back EMF. There is actually a critical speed for overheating. Below this critical speed, StealthChop will actually down-regulate the current; above the critical speed, backEMF will be the limiting factor and reduce the current as the motor goes faster - that's at least my take on it. So when checking whether the TMC drivers can take it, you should check at different speeds. Or stick to SpreadCycle, which is anyway the safer option when it comes to layer shifts.
I have to take back what I said there, sorry. It is true that StealthChop's current control is less direct and, thus, might be less precise in comparison to SpreadCycle (aka normal mode), but StealthChop's current control will normally limit the current if back-EMF doesn't kick in early anyway. So, how can overheating be explained then? Difficult to tell as the details of how exactly the current is sensed in Stealth mode and when and how the control loop is updated are unknown. Trinamic's documentation is rather vague in this regard.
My current working hypothesis is that the driver tries to sense the current at each chopper pulse, but only the maximum sensed current during one full step is taken for updating the control loop (i.e., applying PWM_GRAD in order to adjust PWM_SCALE). For the motor current to be sensed correctly, two things have to come together: the voltage chopper ON phase has to be long enough (longer than TBL) and, at the very same time, the motor current has to be at the maximum (or minimum) of the true current cycle developing in the motor coil. The duration of the voltage ON phase (according to the PWM duty) is controlled by the driver and follows the driver's target current wave (scaled by PWM_SCALE), whereas the motor current cycle lags more or less behind (depending on speed and possibly load), so it actually can happen that when the motor current goes through its maximum, the ON phases at that time are too short to actually measure this current; and when the ON phases are getting long enough, the motor current is not at its maximum anymore. Still, some current can be sensed at some point, but this sensed current will underestimate the true motor current maximum, which then will cause the driver to erroneously up-regulate the commanded current. Since with lower resistance motors a smaller duty will be sufficient for reaching a certain current, the driver is at higher risk of getting the current sensing wrong when in Stealth mode.
Well, as I said, this is just my current working hypothesis.
Re: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
Yes. Stealthchop adjustments are hard for me to understand. So many times things work backwards from what I expected and what looks best on the scope doesn't always translate into the axes moving most reliably.
Despite my limited understanding of the TMC2130, I now have the Moons' 0.9 MS17HA2P4100 working well on x and y axes. Even sensorless homing on the x-axis seems reliable after tweaking the firmware.
This discussion continues in the new thread.
user-mods-octoprint-enclosures-nozzles- ... 28098.html
RE: Fine Vertical Artifacts / Trinamic Chop Tuning, Any Effect?
I've done some recent testing with the TMC2130 microstep table using a laser pointer and measuring step distances per the Trinamic literature. You all probably won't be surprised to find out that the microsteps are varying significantly in size from step to step. So far my tests have been with an unloaded stock extruder stepper motor set for 16 microsteps, but I'm working on a little test rig to support the motor and add a load while attaching the laser pointer.
I've developed a preliminary curve based on the unloaded values if anyone is bored and wants to try it:
MSLUT[0]: AAA441EF
MSLUT[1]: 6AD6B56A
MSLUT[2]: 29295555
MSLUT[3]: 40821112
MSLUT[4]: 20000000
MSLUT[5]: F7F00000
MSLUT[6]: 2AAB6EF7
MSLUT[7]: C115BFC2
MSLUTSELECT: EB640819
MSLUTSTART: 00F70000