Closed HWiese1980 closed 5 years ago
The driver register in question in DRV_STATUS which contains a lot of the current information about the driver, such as standstill flag or over temperature or motor load value.
You seem to have a problem where either the driver didn't get configured correctly or the reading failed for everything but the register retrieve. I'll try a vanilla branch tomorrow and test that nothing is broken.
Hey @teemuatlut, have you had a chance to take a look into this? I've double checked my wiring and I'm pretty certain everything's correct. All bridges of the drivers are open, motors connected. They still wouldn't move. I have no idea why it isn't working.
I checked the functionality with a single Y stepper and it seems to be working as intended. I'd recommend you first try to get the Simple example sketch in the library working. Since it's not software (or at least that's what it looks like) you need to start ruling out components. Use simple jumper wires for the SPI. Change the driver, Arduino, RAMPS, motor one at a time to see if one is failing. Basically simplify your setup as much as possible and build from there once something starts working.
I've tried the minimum example. The TMC2130 both do not work. If I replace them with the old TMC2100 and disable everything related to the TMC2130 in the code (so left with only toggling pins) those work. So it's neither the software nor the RAMPS/Arduino. Seems to either have to do with configuration or both TMC2130 are dead - which I certainly don't hope and also wouldn't be able to say why. They are brand new and I'm sure I've soldered/wired everything correctly.
No power to the steppers with the TMC2130s but all is well when using different drivers.
As I understand it the TMC2130s load a default config on power up. You should be able to just remove the old driver and drop in the 2130 and see stepper movement. Even if the default 2130 current setting is too low to move the stepper they should still have power to them.
I suspect that the ENABLE pins on the 2130s are not connected. Try re-soldering them. The enable pin is the single pin near the SPI pins.
I've found other people who had been experiencing the same issues. The solution is that somehow motor voltage has to be up before VCC of the driver. My individual problem was that my printer was configured to switch on/off VM on demand. That apparently doesn't work with the TMC2130 (should be mentioned in the FAQ somewhere). After rewiring my power supply so that VM is always on, the motors now move.
Now on to the next problem: stallGuard/sensorless homing doesn't work. Even with the minimal example. The DIAG1 pin is always at 0V/GND, no matter how much load I give to the motor (even when it eventually stalls).
I suppose though that it's better to open a different thread for this new issue...
motor voltage has to be up before VCC of the driver
@teemuatlut I remember we were talking about this w/r/t the configuration being accepted. Perhaps we can do something to ensure power is available before attempting to apply settings. Otherwise, a warning message would be the second best choice.
The DIAG1 pin is always at 0V/GND, no matter how much load I give to the motor
In the TMC2130 example sketch? I know we just recently made a change to the initialization of that pin in Marlin, and maybe this is related.
It's fine to apply the settings even before there is power. The library will cache the write commands and we can then use push()
to sync the settings into the driver.
The issue likely is that he's using AUTO_POWER_CONTROL
which may not take into account this requirement.
I feel like we did some additions for AUTO_POWER_CONTROL
at some point. Am I tripping?
If it uses Power::power_on()
then it should push the configs to the drivers. It's not a feature I personally use so I don't know how well it works.
Ah, right. It does use power_on
and that does call restore_stepper_drivers
after a 100ms delay.
I'm deeply ashamed to admit that I'm not using AUTO_POWER_CONTROL to control the PSU but an ordinary pin (D6) which I switch on through gcode. I don't know why, but when I first tried to use AUTO_POWER_CONTROL it wouldn't work either and I decided to go with this makeshift solution. And nothing lasts longer than a makeshift.
I'll probably try to use AUTO_POWER_CONTROL in the future if it helps to deal with the VM before VCC problem.
In the example sketch, yes. (@thinkyhead )
You should be able to leave the pin as-is and use AUTO_POWER_CONTROL
by adding #define PS_ON_PIN 6
to your Configuration.h
.
There is a tmc2130 driver on the x and y axes. But it does not move. please help. (mks gene v1.4 and tmc2130) error code 0x00000000
@StaurusN —
For best results getting help with configuration and troubleshooting, please use the following resources:
After seeking help from the community, if the consensus points to to a bug in Marlin, then you should post a bug report.
I have a similar problem using bugfix-2.0.x and TMCStepper v0.2.2 on an Arduino Due+Smart Ramps. Got SW SPI Working at least i am able to Debug the drivers and set current for example. But for some reason i cant get them to move. Is the problem that the TMCStepper library isnt compatible with the Arduino Due? Any chances for it to work?
For reinit tmc2130spi after psu return power to tmc you can Insert in top of startup g-code:
;poweron
M80
;M502 - factory reset to enable-steppers
M502
;M501 - Restore Settings to enable steppers
M501
or another way:
M80
M906 ... (from M501)
M569 ... (from M501 if exist)
M913 ... (from M501 if exist)
M914 ... (from M501 if exist)
it solved the problem in my case.
2DEV: For tmc2130spi requires modification code in restore_stepper_drivers. (called from power.cpp and M80_M81.cpp)
@HWiese1980
still having an issue when using latest bugfix 2.0?
@HWiese1980 still having an issue when using latest bugfix 2.0? Not working :( Need reinit TMC2130 via SPI or M502.
11,787 commits. branch is 3405 commits ahead, 1816 commits behind 1.1.x.
@boelle I'm sorry, I must admit I've switched to Klipper and TMC2208 in the meantime. Might be that I return to Marlin one day, but I'm pretty satisfied with how it works at the moment.
maybe we can close this one and open new issue if you get back to marlin?
unless others have this problem and can contribute to finding out what is wrong
Not sure. I'm okay with it if I'm the only one.
I was back reading trying to find a solution to my tmc2130 on a mks Gen L. The motors were working on the stock board (tronxy x5s), now after flashing bugfix 2 the motors buzz but won't turn, I was adjusting the current and added the tmc library in platformio, I'm a little lost with all what been said here
See the TMC troubleshooting steps at the Marlin website http://marlinfw.org/docs/hardware/tmc_drivers.html#troubleshooting
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.
I've just upgraded my printer with two TMC2130 and a new Marlin firmware. Current branch is bugfix-1.1.x because I read of some bugs regarding SPI communication with the drivers.
SPI seems to be working. I can M906 set/get, I can M122 debug. The following output is generated by M122. I don't know what all the values mean but maybe you can use it to diagnose my problem which is that the motors simply don't move. Even after a G28 X0 Y0 they remain powerless and I can easily move them by hand.
Here's M122 output before I initiate G28:
And here is M122 output after G28 X0 (only X axis for testing; Y behaves equally) is initiated:
And here's what I've changed in the configuration so far (only the changes and their neighborhood):
Configuration.h
Configuration_adv.h
pins_RAMPS.h
(because I usually have an LCD, which isn't currently connected, I reconfigured the CS pins - correctly, I've double checked these settings)
Aside from any help regarding this problem I'd like to know what the values and especially the driver registers exactly mean. They are probably documented in the datasheet of the TMC2130 but I couldn't figure out yet where they come from, like, which of the TMC's registers are meant by "Driver registers".
Thanks a lot, folks!
Cheers