MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.19k stars 19.22k forks source link

[BUG] Sensorless Homing/Probing not working on SKR Pro v1.1 + TMC2209 v1.1 #15496

Closed hackebike closed 4 years ago

hackebike commented 4 years ago

I am setting up a custom printer using the SKR Pro v1.1 with TMC 2209 v1.1 from BIGTREETECH. TMC 2209 are setup in UART mode.

I complied Marlin from yesterday October 8th. I have setup the configuration files but when testing the following happen:

I played with sensitivity but is not working. I uploaded the 3 config files, or can be viewed here https://github.com/hackebike/3dprinter

Marlin-config.zip

tvixen commented 4 years ago

Try disabling #define SQUARE_WAVE_STEPPING Did you try to lower #define X_STALL_SENSITIVITY 50 to 255 ? (Why 50 ?)

hackebike commented 4 years ago

I tested without #define SQUARE_WAVE_STEPPING but not working. I tested many different sensitivity from 0 to 200 increment of 10, no luck. I also tested without #define HYBRID_THRESHOLD but nothing. I swapped for TMC 2209 v1.0 same vendor, no luck.

any other suggestions? Maybe compiling issues with TMC library?

psim commented 4 years ago

Almost same issues here: endstops are not working even if I trigger them manually.

Marlin.zip

tvixen commented 4 years ago

Did you do a M502 M500 M501, every time for every step in the software ? (just to be sure) Did you look at http://marlinfw.org/docs/gcode/M914.html

hackebike commented 4 years ago

did not tried those commands yet, but I think SKR Pro has some issues with EEPROM. I used M914 to set sensitivity, 2209 goes from 0 (less) to 255 (more) sensitive.

Not sure what other tests to do.

tvixen commented 4 years ago

Oki M914 should work too.

hackebike commented 4 years ago

will give it a try and report, is there a sequence of these commands that I need to use? thx

tvixen commented 4 years ago

Well if you got the skills, you could hook it up on a veroboard and try a single driver + a stepper, and a oscilloscope to trigger the stallguard acc. to https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2209_Datasheet_V103.pdf

But I think it will only confirm your suspicion, that the SKR Pro has issues. Actually I see no STM32 chip fully complying with Marlin.

hackebike commented 4 years ago

Cannot use the EEprom as the SKR pro has issues, does this affect my issue?

tvixen commented 4 years ago

No not really ....directly. But the whole 32bit project has some thing who require EEprom settings, so you will (inevitably) run into problems sooner or later.

hackebike commented 4 years ago

will do more testing tomorrow, also trying on the skr v1.3 to see if the tmc2209 are the issue or something else.

randellhodges commented 4 years ago

Well if you got the skills, you could hook it up on a veroboard and try a single driver + a stepper, and a oscilloscope to trigger the stallguard acc. to https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2209_Datasheet_V103.pdf

But I think it will only confirm your suspicion, that the SKR Pro has issues. Actually I see no STM32 chip fully complying with Marlin.

Why do you think no STM32 chip will fully comply with Marlin? Isn't Marlin and the concept of the HAL to abstract that away and "make it work?"

Disclaimer: I have SKR 1.1 PRO sitting in the box, waiting.

tvixen commented 4 years ago

You can see the progress of the chipset here: https://github.com/MarlinFirmware/Marlin/issues/14345

hackebike commented 4 years ago

@ randellhodges did you had a chance to test sensorless homing ?

randellhodges commented 4 years ago

@hackebike No, I'm still using my SKR 1.3 along with the TMC2208 drivers. From what I've read, I've decided that when I do switch over to the TMC2209 drivers, I'm going to stick with endstop switches.

I'm going to try the TMC2209 in the SKR 1.3 tonight probably, then work on moving them into the SKR PRO 1.1 and try that out. I've done a lot of work on the printer and I'm trying to introduce these changes slowly.

hackebike commented 4 years ago

ok great make sense. I will try the 2209 on skr 1.3 too tomorrow so will report my findings. Will use the same config as I am using now but compiling for skr1.3.

Also I contacted BIGTREETECH to get some support, engineering team should look into this hopefully soon!

randellhodges commented 4 years ago

@hackebike You continuing with sensorless home (using stallguard)?

If not, remember, on the TMC2209 you have to either clip or unsolder the stallguard pin. That is one thing I don't like about these boards. It would be nice if they had a little jumper up top to let you disconnect that pin without effort.

I'll be unsoldering mine.

hackebike commented 4 years ago

I will continue with sensorless homing since my custom printer is huge and do not want to deal with mechanical switches and wiring all over the places!

It's just annoying that they release hardware but they do not release configurations for the supported drivers. They must have tested these scenario otherwise how they tested?

Yes I know about the clipping thing and that's one thing I want to avoid, messing with hardware that is suppose to work. I did for the 2130 with soldering but is just a mess!

My print will last couple of days so less (?) is better for me.

I will push BTT to provide config files that works with laster Marlin and TMC 2209 !

hackebike commented 4 years ago

also did you see this? https://www.youtube.com/watch?v=6oKtRML0kUU

randellhodges commented 4 years ago

also did you see this? https://www.youtube.com/watch?v=6oKtRML0kUU

Yup, but I also failed to mention, while I ordered the v1.1, they actually sent me v1.2, so I don't think mine will have that issue.

hackebike commented 4 years ago

I have both 1.1 and 1.2, tested both for sensorless, no luck ! I am starting to think that they did not test it.

teemuatlut commented 4 years ago

https://github.com/teemuatlut/Marlin/tree/tmc2209_stallguard

Let me know if anything changes.

hackebike commented 4 years ago

ok, great, will test it tomorrow and report results. thx!

hackebike commented 4 years ago

@teemuatlut getting an error while compiling, check image and config files

Marlin-config.zip

Screen Shot 2019-10-10 at 8 24 45 PM

LongLiveCHIEF commented 4 years ago

the settings I use in my branch of Marlin are designed for the SKR boards, and I try to keep them updated. I know they instructions from Bigtreetech are incorrect (and I've got fixes and open issues for all this stuff if you check out their repo), but mine should work for you. Check 'em out at github.com/HackerHappyHour/Marlin skr config branch

I'll be doing another rebase today or tomorrow to update for firmware changes of 2.x that have occurred between July and now.

hackebike commented 4 years ago

sounds good! So at the moment I have couple of tests to do, one with some hybrid threshold set to 0 (some people said to try!), than will use @teemuatlut release and than will do your for sure!

Will report my findings and thx a lot for the support!

btw I noticed you compiled for skr 1.3, did you test the 2209 for skr pro?

hackebike commented 4 years ago

hybrid threshold set to 0 did not work!

@LongLiveCHIEF can you tell me if I can compile what you have right now in your depot or I wait for your update? thx

hackebike commented 4 years ago

If stallguard is not used the SKR Pro manual mention to remove the PIn on the TMC 2209 !! What a great idea ..... !!! https://github.com/bigtreetech/BIGTREETECH-SKR-PRO-V1.1/blob/master/manual/SKR%20PRO%20V1.1%20user%20manual%20v1.1.pdf

hackebike commented 4 years ago

did more tests and nothing is working! If anyone has some suggestions please let me know, for now will use the 2208 without sensorless homing!

TB1405 commented 4 years ago

I think There is a bug in the actual marlin Version i have a skr pro with btt2209 and Version from a month ago and with this eorks. With the actual it didnt work

hackebike commented 4 years ago

@TB1405 really? Are you referring to Marlin compilation or that skr pro+tmc2209 sensorless homing works? could you upload the Marlin code with configuration so that we can test it ? it would be great! thx

hackebike commented 4 years ago

I got a Marlin code with configs from BTT, but I had an issues compiling it. So I just changed the config files to what I needed and the standard platform.ini file, it compiles but no luck on sensorless homing. Anyway, anyone want to give it a try for Marlin from BTT? This is the BTT Marlin that suppose to work with TMC 2209 sensorless homing

phellwing commented 4 years ago

I got a Marlin code with configs from BTT, but I had an issues compiling it. So I just changed the config files to what I needed and the standard platform.ini file, it compiles but no luck on sensorless homing. Anyway, anyone want to give it a try for Marlin from BTT? This is the BTT Marlin that suppose to work with TMC 2209 sensorless homing

It compile (BTT TMC driver) i have newer used sensorless homing, but it looks like it doing som kind of homing on x and y but i soon need new gt2 belt (it homing a little hard).

now i would se if i can edit it so i can testprint.

hackebike commented 4 years ago

@phellwing so it does compile for you without modifying anything? are you using VS Code?

phellwing commented 4 years ago

Download, import to visual studio, compile. Nothing else. (Have to add a driver to E1, I have only one extruder)

hackebike commented 4 years ago

ok great, which means it must be something with VS Code extension/configuration. Did you test if the sensorless homing works with TMC 2209?

You can just comment out the second Extruder, just set to have only one extruder and comment out E1 driver.

hackebike commented 4 years ago

Re-installed the VS Code and it did compile, which is a good step, but not the final one! :)

Here is the original BTT Marlin code that they sent me and sensorless homing is suppose to work. If you want to take a look. Not sure when this code was taken from Marlin github repo so have no idea what works and what does not!

It compiled ! which is great news! Will do some tests tomorrow.

hackebike commented 4 years ago

I tested the BTT marlin code that was suppose to work, but nothing!

hackebike commented 4 years ago

I tested BTT marlin on 2 different board, SKR Pro v1.1 and SKR v1.3 with 2 sets of TMC 2209 v1.1/v1.2 and sensorless homing did not work either of them.

hackebike commented 4 years ago

I got it working both sensorless homing and probing with SKR pro v1.1 and TMC 2209 v1.2. Not sure how, since I downloaded Marlin from few days ag, compiled with new settings in the configuration files and it worked with sensitivity X60 Y60 Z76. Here are the config files.

here is a video: https://www.youtube.com/watch?v=UJwzSTcQslo

fiveofds commented 4 years ago

I have an SKR PRO V1.1 with TMC2209s using Configurations from Bigtreetec I can get sensorless homing working IF it is configured as a cartesian printer but then configuring for my delta printer:

// Direction of endstops when homing; 1=MAX, -1=MIN // :[-1,1]

define X_HOME_DIR 1 //MPD

define Y_HOME_DIR 1 //MPD

define Z_HOME_DIR 1 //MPD

When this is switched from -1 to 1 sensorless homing stops working Any advice?

github-actions[bot] commented 4 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.