Closed alexxy closed 4 years ago
Did you get the TMC2660's working ? I am designing a new controller board that uses them, so would be nice to know :)
Currently no. Seems like we need new lib to get them working =)
To bad, have a look at the bottom of https://github.com/MarlinFirmware/Marlin/pull/8063#issuecomment-340261846 to see what i am working on :)
Yea the drivers need a new library for Marlin to be able to communicate with them. I could expand my TMC2130 or TMC2208 libraries to support them but I don't have the drivers to test. Nor really a board that would support the layout.
@teemuatlut if you extend you're lib i'd be glad to test =) Currently i have working Marlin on Azteeg X5 GT (standart drivers work, but i have 2660 ones) #8139
And i can test when i get my board ready, probably be about 2 weeks... Have a bootloader sorted, but will need a HAL and TMC2660 drivers :/
@Spawn32 stm32 based board? I actualy have an idea to create stm32 board with 6-8 steppers =)
STM32F7 and 6x TMC2660 :)
Its a monster that can even run linux
I'm not too keen on developing for something I don't actually have. While it may take me from a couple of days to a week to get the library running, it'll be months or years of supporting it. Old and new features that need testing, bug fixes, interacting with users and helping them solve problems. I don't really want to put myself in a position where my best is only a guess. I'll try contacting Panucatt and see if they'd be interested in providing samples so that I may bring Marlin/Arduino support for their drivers.
Actualy seems like duet3d board uses same drivers and very similar setup
Yes, the Duet3d uses the TMC2660's... DuetWifi_Schematic_v1.02.pdf
I'll try contacting Panucatt and see if they'd be interested in providing samples so that I may bring Marlin/Arduino support for their drivers.
@teemuatlut Roy has been very helpful trying to get an official 32-bit branch of Marlin going. When we were discussing how to seed the Marlin developers with 32-bit boards, it kind of felt like his preference was to use the Azteeg X5 GT 32bit Motion Controller as the reference platform. (It may be I'm just imagining that. But that is what I think.)
With the Azteeg X5 GT 32bit Motion Controller you can plug in the Bigfoot BSD2660 sub modules.
It says they are "Based on TMC2660. SPI setup and configuration including current limit and microstepping. 3A 30V. For 3D printing and CNC applications. Super quiet and smooth. 1/256 microstepping. "
Part of the reason I was pushing for the Re-ARM as the reference platform is because it would keep costs down. But we are now at the point where just one developer having an Azteeg X5 GT can make good progress. If you contact Roy, please include a link to this post so he knows I'm supportive. I should get around to sending him an updated status report also.
Yeah, Azteeg X5 GT is interesting board. I already done pinout for marlin #8139 . Only thing missing is 2660 steppers.
Quick update. I got a response from Roy at Panucatt and he was happy to provide me with the drivers, so now I'll need to create a new driver library to support the TMC2660. It'll likely be ready (as can be) before my drivers get here but you can test them before I can.
@Roxy-3D Roy asked me about the progress with LPC HAL and I gave him a brief summary but also said that you'd be contacting soon with a more in depth update about it. Hope you don't mind =)
I gave him a brief summary but also said that you'd be contacting soon with a more in depth update about it. Hope you don't mind =)
Not a problem! I'll try to do that in the next day or two...
@Roxy-3D @teemuatlut and the rest of you:
Nice, is just a incredible job you guy's do here. thank you :)
@teemuatlut Any news on TMC2660 ? 😃
I think the hardware is on its' way so I could theoretically start with the library. I just have a bunch of other stuff too that I should be doing.
Hi! Any news about this drivers?
Someone using this driver could tell if the lack of StealthChop mode makes any difference. I mean, do you miss it?
Em 5 de dez de 2017 11:55, "Alexey Shvetsov" notifications@github.com escreveu:
Hi! Any news about this drivers?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/8138#issuecomment-349310592, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-ZE6dbimmv_UZDmS862LuLgkl0Yo6pks5s9UtDgaJpZM4QKH3t .
@alexxy I've started working on a universal TMC driver library that would support 5 driver models. This is quite a big task and requires a completely new architecture inside the library to do it in a way that makes sense. That said, I did take a look at the TMC2660 communication information and it seems to differ a bit from the other drivers. Makes me think that they're a slightly older driver design.
Edit: Steppers are turning now so I've established basic communications.
@cool are there some branch to test?
Good work @teemuatlut looking forward to testing it :)
@alexxy No not yet. I'll first try to get the library examples to work on TMC2660 as well as 2130, 2208, 2224 and 5130. The final Marlin integration on a basic level is actually quite simple and shouldn't take much time.
@teemuatlut hows youre universal tmc lib going?
TMC5130 and TMC2130 compile the Simple example. I've been busy with other tasks for a while now but the new library is on the agenda over the christmas holidays because I can't do much CAD work on the laptop. I've pretty much decided that TMC2660 has to be an entity on its' own because of a drastically different register structure. TMC2208 needs some fundamental changes to work properly.
@teemuatlut TMC 5130 has an integrated velocity ramp generator, do you plan to implement the ramp generator function as well? apart from standard trapezoidal ramp it also has a six point ramp function, which seems pretty cool. To test TMC2660 there is a readily available shield for Uno called TOS100 for Arduino and it can be purchased from Watterott Electronic for about 25 Euro. TMC2660 was also used in T-Bone cape for beagle bone (project available on GitHub) tried and tested lib available for all functions.
I do have full support for Trinamic's TRAMS board in the works but it's been pushed back ever since the summer. But IIRC it did do movements and homing and other basic functions. Regarding the TMC2660, I have the bigfoot drivers from Panucatt and I've also got an Azteeg X5 GT to go along with them so testing is not a problem. I've already been able to communicate them and set the TOFF to have some movement. Mostly it's a matter of writing the methods in a more user friendly way.
Some progress.
Obviously not finished but you should be able to get the driver moving with toff(4); cs(10);
.
Also see the Simple.ino example that's currently configured for TMC2660.
@teemuatlut cool. Seems basic movement works for me
Hi!
Seems like STM32F7 HAL added driver for TMC2660. Was this planned as generic driver for such type of TMC drivers?
I'm currently running an azteeg xt GT with the TMC 2660 big foot drivers. Running smoothie currently. Would like to try marlin 2. Does anyone have this working well, and is there any documentation on how to get it going. I'm struggling to find any.
@jsondag — There's no real documentation at this time. Basically, use these options in Configuration_adv.h
(bugfix branch)…
/**
* Enable this section if you have TMC26X motor drivers.
* You will need to import the TMC26XStepper library into the Arduino IDE for this
* (https://github.com/trinamic/TMC26XStepper.git)
*/
//#define HAVE_TMC26X
#if ENABLED(HAVE_TMC26X) // Choose your axes here. This is mandatory!
. . .
#endif // HAVE_TMC26X
Thanks. Is there anywhere about how to compile for the azteeg? I saw something about using platformio but wasn’t quite sure how to go about that.
Which Azteeg? I'm assuming you mean the Azteeg X5 GT.
Easiest way to get PlatformIO:
Then you can use the Tasks menu to build…
…or upload…
Use the PlaformIO Home button to show the PlatformIO Home tab if you need to install additional board support.
Ghm.. Does 2660 drivers works with TMC26XStepper? it seems like different driver.
@alexxy Yes TMC26XStepper works for the 2660, in my F7 hal i have a slightly modified version, mostly since i use the STM32Generic and it needs the newer version of the I2C, doesn't like the Marlin version :)
Right now i dont have a working stepper anymore on my F7 Borg board, Timers in Marlin has been very modified the last month's and its broken, don even now where to begin, LOL
But, it will get sorted, and i will update the HW rev on the board ( a few blunders) an make a new batch + ad it to gihub :)
really hope @teemuatlut finds time to make a lib for the 2660 soon :)
Ghm... Current TMC26XStepper doesnt compile on LPC (however i'll try to fix it) Seems like i have problem with SPI.h on LPC (missing definitions for
arm-none-eabi-g++ -o .pioenvs/LPC1768/libf3e/TMC26XStepper/TMC26XStepper.o -c -fno-rtti -fno-exceptions -std=gnu++11 -Os -ffunction-sections -fdata-sections -mthumb -nostdlib -mcpu=cortex-m3 -Os -mcpu=cortex-m3 -mthumb -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing --specs=nano.specs --specs=nosys.specs -MMD -MP -fmax-errors=5 -g -ggdb -DF_CPU=100000000L -DPLATFORMIO=30501 -DTARGET_LPC1768 -DU8G_HAL_LINKS -IMarlin/src/HAL/HAL_LPC1768/include -IMarlin/src/HAL/HAL_LPC1768/u8g -I.piolibdeps/TMC26XStepper -Iframeworks/CMSIS/LPC1768/include -Iframeworks/CMSIS/LPC1768/lib -Iframeworks/CMSIS -I.piolibdeps/TMC2130Stepper_ID1493/src -I.piolibdeps/U8glib-HAL_ID1932/src .piolibdeps/TMC26XStepper/TMC26XStepper.cpp
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp: In member function 'void TMC26XStepper::start()':
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:175:9: error: 'class SPIClass' has no member named 'setBitOrder'
SPI.setBitOrder(MSBFIRST);
^~~~~~~~~~~
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:176:6: error: 'class SPIClass' has no member named 'setClockDivider'
SPI.setClockDivider(SPI_CLOCK_DIV8);
^~~~~~~~~~~~~~~
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:176:22: error: 'SPI_CLOCK_DIV8' was not declared in this scope
SPI.setClockDivider(SPI_CLOCK_DIV8);
^~~~~~~~~~~~~~
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:176:22: note: suggested alternative: '_CLOCK_T_'
SPI.setClockDivider(SPI_CLOCK_DIV8);
^~~~~~~~~~~~~~
_CLOCK_T_
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp: In member function 'char TMC26XStepper::move()':
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:245:28: error: 'micros' was not declared in this scope
unsigned long time = micros();
^~~~~~
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:245:28: note: suggested alternative: 'millis'
unsigned long time = micros();
^~~~~~
millis
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp: In member function 'void TMC26XStepper::send262(long unsigned int)':
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:952:30: error: 'SPCR' was not declared in this scope
unsigned char oldMode = SPCR & SPI_MODE_MASK;
^~~~
.piolibdeps/TMC26XStepper/TMC26XStepper.cpp:952:30: note: suggested alternative: 'SPI'
unsigned char oldMode = SPCR & SPI_MODE_MASK;
^~~~
SPI
compilation terminated due to -fmax-errors=5.
*** [.pioenvs/LPC1768/libf3e/TMC26XStepper/TMC26XStepper.o] Error 1
@alexxy — If you discover that changes to the library are needed, check to see if the original author will apply the changes to their library on GitHub so everyone can benefit. If they're unresponsive, then send us the updated library and we'll just host it under the MarlinFirmware
organization or let @teemuatlut host it with his other TMCxxxxStepper
libraries.
https://github.com/teemuatlut/Marlin/tree/bf2_tmc2660 https://github.com/teemuatlut/TMCStepper/blob/master/src/TMCStepper.h#L475
This is what I've been working on for the past week.
Cool =)
So does TMC2660 are usable with Marlin?
@teemuatlut with some minor changes seems works on Azteeg X5 GT. But steppers are quite hot...
Looking forward to test this as soon as i can get my timers fixed again, lol :)
Thank you @teemuatlut !!
Seems like current control doesnt work, as well as TMC_DEBUG and MONITOR_DRIVER_STATUS
I made a complete rewrite last week with no access to the hardware. I haven't tested anything.
The additional features likely definitely don't work yet.
But steppers are quite hot
It's possible the current calculation formula needs some attention. Or the SPI command was wrong. Or...
Did you remember to change the sense resistor value?
No. I didnt change it.
Smoothie uses that value
motor_driver_control.beta.sense_resistor 100 # set the sense resistor used
So does Marlin use same units?
I changed value of sense resistor to 100, stepper still quickly became very hot....
m501
SENDING:M501
V54 stored settings retrieved (673 bytes; crc 974)
G21 ; Units in mm
M149 C ; Units in Celsius
M200 D3.000000
M200 T1 D3.000000
M200 D0
M92 X80.000000 Y80.000000 Z4000.000000 E500.000000
M203 X300.000000 Y300.000000 Z5.000000 E25.000000
M201 X3000 Y3000 Z100 E10000
M204 P3000.000000 R3000.000000 T3000.000000
M205 S0.000000 T0.000000 B20000 X10.000000 Y10.000000 Z0.300000 E5.000000
M206 X0.000000 Y0.000000 Z0.000000
M218 T1 X0.000000 Y0.000000
M145 S0 H180 B70 F0
M145 S1 H240 B110 F0
M301 E0 P22.200001 I1.080000 D114.000000
M301 E1 P22.200001 I1.080000 D114.000000
M304 P10.000000 I0.023000 D305.399994
M250 C140
M906 X800
M906 Y800
M906 Z800
M906 T0 E800
M906 T1 E800
Hi all!
I have a Azteeg X5 GT board with TMC2660 (Bigfoot BSD2660), and seems like Marlin has support for some types of TMC drivers. How to enable TMC2660?