Saturday, October 5, 2019

Problems with stepper motors from Aliexpress

A lot of people have reported problems with the stepper motors from Aliexpress.

But before we start let me say this. Most of the problems are mechanical problems.
Make sure you're frame is perpendicular and all axes can move freely without any issues.
Also test if you only have problems in stealth mode or also in normal mode.

Tweaking the motor current setting can do damage to the Einsy board as well as create issues with prints like high TMC temp failures!

Be aware that the Einsy board is only capable of 980mA per stepper motor, while the TMC driver could peak up to 2A.

 If you choose to tweak the settings, you do this on your own risk!


If you still having issues with the motors you can adjust the motor current. Some user reported that they had success by increasing the motor currents in the firmware. So I will show you now how to do it.

Before we start changing values in the firmware, we should figure out what the right values would be.
The easiest way to do this is to use the g-code command M907 which is supported in Prusa Firmware since Version 3.5.0.

Let me explain first how the command works, you can also find more details here.

You can set the motor current for all axis to 500mA with

M907 S500

or for each axis individual, which I strongly recommend.

M906 [E<mA>] [X<mA>] [Y<mA>] [Z<mA>]

The format in M907 command is is E,X,Y,Z !

But what would be good values to start with? Well lets have a look into the Prusa Firmware:

In the Configuration_prusa.h file the motor currents are defined in trinamic registers, not in mA!
The format in the Prusa firmware is X,Y,Z,!

#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  // lowe current for M600 to protect filament sensor 

So we need a table to compare the trinamic registers with mA settings.

mAtrinamic registernote
00doesn't mean current off, lowest current is 1/32 current with vsense low range
301 
402 
603 
904 
1005 
1206 
1307 
1508 
1809 
19010 
21011 
23012 
24013 
25013 
26014 
28015 
30016 
32017 
34018 
35019 
37020 
39021 
41022 
43023 
45024 
46025 
48026 
50027 
52028 
53529 
N/D30extruder default
54033 
56034 
58035 
59036farm mode extruder default
61037 
63038 
64039 
66040 
67041 
69042 
71043 
72044 
73045 
76046 
77047 
79048 
81049 
82050 
84051 
85052 
87053 
89054 
90055 
92056 
94057 
95058 
97059 
98060 
100061 
102062 
102963 

So the default for the extruder is 535mA. For the z-Axis it is 580mA, for the x-Axis 300mA and for the y-Axis 370mA.

A G-code command for setting the motor current with default values it would look like this:

M907 E535 X300 Y370 Z580

So now you have a baseline to work you way up, until you don't have any issues anymore.
If you just have a problem with one or two axis you can simply remove the other axis.

For example if you have only issues with the Y and the Z axis your command would look like this:

M907 Y390 Z610

Now add this line to the top of your g-code file that you want to use for testing. Print and check if you still have any issues. You can slowly increase the values until your problem is solved. 

Once you have verified the values for your printer, use the table again to calculate the register settings. 

So in our example the g-code:
M907 Y390 Z610
would translate into:
#define TMC2130_CURRENTS_R {16, 21, 37, 30}  // default running currents for all axes
Now we change the Configuration_prusa.h file and compile our firmware and upload it to the printer. Look at my previous posts how to do that. We just change the running currents, the holding currents should not be a problem.

Then test again if everything is ok. If you still have issues try to figure our the proper values with the M907 command first, before you make changes to the firmware settings.

With the higher motor current you might run into some issues. Maybe you get the TCM diver temp failure for long prints or your stepper motors get really hot. This is why it is important to increase the current setting just to what you really need!





1 comment:

  1. Come here just to say thank you! Your article helped me alot. This kind of information should be documented in the firmware repo.

    ReplyDelete

A new project "automatic cat litter box"

 I did not post any updates for a long time. I spent some time making some money with 3D printing to recover some of the costs from this hob...