knutwurst / Marlin-2-0-x-Anycubic-i3-MEGA-S

Marlin 2.0.x Version for Anycubic i3 MEGA M/S/P/X/CHIRON and 4MAX with Anycubic TFT or the "new" DGUS Clone TFT - Now also with BLTouch!
GNU General Public License v3.0
788 stars 187 forks source link

[BUG] Mega Pro (latest), inverted Z-Axis when using TMC firmware variant #237

Closed jonas-koeritz closed 2 years ago

jonas-koeritz commented 2 years ago

Bug Description

When I am using the TMC variant of the firmware (the device should come with TMC drivers and I have opened it and there seem to be TMC drivers in there) the Z-Axis moves inverted. If I home the printer, the head starts moving upwards insted of downwards. I am currently running a print with the non-TMC enabled build and it's working perfectly (apart from whiney motors compared to stock firmware).

Did I miss anything? Any configuration option I can change at runtime?

Steps to Reproduce

  1. Upload MEGA_P_DGUS_TMC_BLT_10_v1.4.0-b3.hex to the printer.
  2. Start homing

Expected behavior: Z-Axis moves towards the bed, into limit switches.

Actual behavior: Z-Axis moves upwards, away from the bed.

Additional Information

I am quite new to this, I really like that the laser option is coming to Marlin so I made the switch.

weihan-ott commented 2 years ago

I got the same things.

I fixed it by these:

find:

if ENABLED(KNUTWURST_MEGA_P)

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false // set to true for stock drivers or TMC2208 with reversed connectors
#define INVERT_Y_DIR true // set to false for stock drivers or TMC2208 with reversed connectors
#define INVERT_Z_DIR ture // set to false for stock drivers or TMC2208 with reversed connectors

change to

if ENABLED(KNUTWURST_MEGA_P)

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false // set to true for stock drivers or TMC2208 with reversed connectors
#define INVERT_Y_DIR true // set to false for stock drivers or TMC2208 with reversed connectors
#define INVERT_Z_DIR ture // set to false for stock drivers or TMC2208 with reversed connectors

that's all.

jonas-koeritz commented 2 years ago

Am I correct to say that this line isn't correct for a Mega_P with stock TMC2208 drivers, just if you upgraded them yourself because AnyCubic matches the wiring to account for the direction change when building the printer?

knutwurst commented 2 years ago

@weihan-ott

find (...)

define INVERT_Z_DIR ture

change to (...)

define INVERT_Z_DIR ture

Am I wrong or is the line you are searching for the same as you changed? Also "ture" is not "true" ;)

@jonas-koeritz , no... it's for the TMC Build. Take a look at line https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/blob/0ae2f00fc8bddd03f74baa57ab9df33f55ac5181/Marlin/Configuration.h#L1817 where the TMC is defined. :)

If you own a stock Mega Pro, this is the line you are searching for: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/blob/0ae2f00fc8bddd03f74baa57ab9df33f55ac5181/Marlin/Configuration.h#L1726

But... normally all users are fine with the configuration. It's strange, that your Z is inverted.

jonas-koeritz commented 2 years ago

My stock mega pro comes with TMC Drivers, maybe that's the problem? It also has a different PSU etc. so it seems to be another product revision?

Oliver Köster @.***> schrieb am Di., 7. Dez. 2021, 08:16:

@jonas-koeritz https://github.com/jonas-koeritz , no... it's for the TMC Build. Take a look at line https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/blob/0ae2f00fc8bddd03f74baa57ab9df33f55ac5181/Marlin/Configuration.h#L1817 where the TMC is defined. :)

If you own a stock Mega Pro, this is the line you are searching for: https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/blob/0ae2f00fc8bddd03f74baa57ab9df33f55ac5181/Marlin/Configuration.h#L1726

But... normally all users are fine with the configuration. It's strange, that your Z is inverted.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/issues/237#issuecomment-987636721, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRPLC6XDMGALN5TVI3IBCTUPWYDDANCNFSM5JPHUX5A .

knutwurst commented 2 years ago

@jonas-koeritz the stock Mega Pro comes with only 2 of 5 TMC drivers on X and Y. On Z and E the stock drivers are A4899. The Non-TMC Firmware is always for the stock model. The TMC is always the correct FW if you change all drivers.

jonas-koeritz commented 2 years ago

Ahh thanks for calcifying. So the marketing is just "we put some TMC Drivers in it, so we can write it on the page", and I am doing everything correctly (not running pure TMC Marlin).

Oliver Köster @.***> schrieb am Di., 7. Dez. 2021, 08:20:

@jonas-koeritz https://github.com/jonas-koeritz the Stock pro comes with only 2 of 5 TMC drivers. The Non-TMC Firmware is always for the stock model. The TMC is always the correct FW if you change all drivers.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knutwurst/Marlin-2-0-x-Anycubic-i3-MEGA-S/issues/237#issuecomment-987639173, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRPLCYCXQAQQ3SWAKOA4MLUPWYTPANCNFSM5JPHUX5A .

knutwurst commented 2 years ago

Correct ;) Just use the Non-TMC build if you own a stock mega Pro. If you decide to switch to TMC all the way, then you can take the _TMC Firmware.

jonas-koeritz commented 2 years ago

Thanks for clarifying! Firmware work's like a charm, haven't tested the laser features yet ;).

github-actions[bot] commented 2 years ago

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.