-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TMC2130 not working sensorless mode #8480
Comments
Does any of the other TMC related commands give you an output? |
Yes, i successfully printed some models with it. Working autocurrent control, setting steps all is ok. |
Could you try my development branch? I've changed the code related to this a while back but I haven't made a pull request to upstream for an even longer while. It's quite possible that this is just a cosmetic bug with the serial communication. Btw, I've removed automatic current control in the form that it is here. It didn't work the way I wanted it to. |
I tryed yours fork. I changed a minimum settings. Now i can change, save the value of sensivity and motors run some seconds, but sensors not trigered when i try stop the motor spindel. Terminal log and configuration in attach
|
Try going lower, the range is from -64 to 63 with lower values meaning better sensitivity. So with a setting of 50, you'd likely not trigger at all. |
When i try set -19 value of sensity, output M914 is
M914 X-60 Y-60 is out:
But still not trigered. Also i try you sample code "StallGuard" from Arduino, result is 1 - motor lock and not rotate, 0 - motor unlock, on terminal output only "0 0". |
I'll try to find time to take a look at the example sketch. I think the best course of action is to get the StallGuard example working first so that we can verify the feature is working properly. |
I trying to understand how its work )) boolean toggle1 = 0;
ISR(TIMER1_COMPA_vect){
PORTF |= 1 << 0;
PORTF &= ~(1 << 0);
if (toggle1){
digitalWrite(STEP_PIN, HIGH);
toggle1 = 0;
}
else{
digitalWrite(STEP_PIN, LOW);
toggle1 = 1;
}
} and motor start rotate, also i set terminal speed to 115200, but sg_result() still put 0. |
I'm the author. The step pin is driven with direct port manipulation from an interrupt routine. Did you have to change pins for your application? I just tried the sketch it works quite nicely. |
The Stallguide example sketch should output two values on every line. Like 0 342 for example. The zero is because if you want to use the Arduino IDE plotter, the zero value will prevent the IDE from adjusting the minimum scale. |
I'm probably missing something obvious but ... please point me to the documentation on the SilentStick. I can't find anything on the mod you just did. I just picked up some kits via DigiKey for only $8 each. The headers need to be soldered on and you need to buy the heat sinks separately. |
Documentation you can find on https://github.com/watterott/SilentStepStick |
Missing the obvious is my specialty! Thanks |
Do not solder the jumper bridge on the Watterott drivers. This will put them in standalone mode that disables SPI communication. I have no information on the clone drivers. |
I'd be REALLY surprised if DigiKey was selling something that wasn't 100% compatible. I do know that the soldermask color is different. I really won't know for sure until I get my printer back up & running. |
Digikey sells the drivers that are made by Watterott. It should say "www.watterott.com" on the top side silkscreen. |
The silkscreen lettering is so small that it can't be read entirely. The letters that I can make out fit properly with "www.watterott.com". |
@teemuatlut, i mean other jumper bridge: |
Mine are configured the same way and I believe they come that way from Watterott. There's no way I could solder an SMD resistor that small. |
Little victory! I did that yours sketch from examples worked. Numbers in terminal change if i try to stop spindle. But if i try enable SENSORLESS_HOMING in your fork of Marlin, it still not working. This output from M122
|
All working! Main problems is: 1. chines drivers not properly ready for SPI mode 2. my fault with soldering pins |
Hi, could you give me some hint what you changed to make the chinese drivers work? I desoldered the spi 'bridge' but couldn't get stallguard to work. The stallguard demo just outputs 0 0 and the motor is completely fix in position. The spi config seems to work (drivers get recognized in Marlin). Stealthchop works super smooth. But I can't sensorless home. |
@govido , Hi! Yes, you right, you must doing little trick: you must solder two bridges as i show on the picture. |
Cool thanks for the quick reply. I was wondering if these two tiny pads need to be connected. I need to get a smaller soldering tip then... The first 'dirty' soldered chip is moving now with the stallguard demo |
i would love to try that with mine, but neither my hands are good enough for that nor seems my soldering iron to be. Should there be anyone near or in hamburg, germany, please message me. |
@lednicazar, yes, you right, chines driver it is 100% clones of watterott driver. |
Okay so got it figured out and it's a bit weird. When I plug my motor + driver on 12V and do the test it's fine and stallguard works perfect. When I connect the proper 24V supply of my printer then stallguard doesn't work ... I might try to lower the current or increase the sensitivity (i'm down to 8 already) anyway glad it's somehow working, just unfortunate that it's not working with my main power supply :) @lednicazar Yes remove the SPI bridge and do a solder bridge as show in @nightdemonx picture |
Okay it's all working now, thanks @nightdemonx. I'm amazed by the silence of the printer, with my DRV8825 it was very noisy, and now I barely hear anything (well I hear a lot the 30mm fan) So I increased the sensitivity to -30 just to see if stallguard was working then I decreased slowly until I found a good setting with my motors and a 24V PSU the good value is ~4. I was expecting for it to work but skip more steps with a lower sensitivity but at 8 it was never triggering at 24V. Anyway, hope it's helpful to someone, and I highly recommend the TMC2130, I got the FYSETC ones from aliexpress did the solder points @nightdemonx suggested and it's good. |
I'm writing documentation for the TMC drivers used with Marlin and I have a dedicated section for the FYSETC drivers. What should I write? If I refer to this image, the user should desolder the bridge near the chip corner, as well as bridge the two smaller pad selectors right from the sense resistor? Top bridges to right, bottom to the left. |
@teemuatlut yes, you right! Also need connect 4 pins to SPI. People it do different ways, some solder bridges on RAMS, but most remove pins and solder it on the other side. |
@teemuatlut might be worth noting that on the image you sent it's a solder bridge while on the ones I got it's a 0ohm resistor, not that it changes anything, just that it looks slightly different. |
Hi, please i really need your help again. I have the original Watterott TMC2130 running since the step loss fix from you is implemented since Marlin 1.1.7. Have now 1.1.8 installed. But when i activate sensorless homing it moves just a few mm everytime when i press Home X or Home Y. or Home. (wiring changed too from the diag to the ensop pin) I changed the endstop inverting to false which lets the axis move in homing direction but just a few mm each time i press homing... (with true it does not move in the direction a all) SPI is working fine, tried to change current or stealth chop and it accepts the changes. Wiring is correct. The Sensorless homing feature worked for me in Marlin 1.1.6 but then it had step loss like in this #8478 which i commented and got great help from you :) If i change the endstop wires from the X to the Y axis it starts homing put crashes into the endstop. So i guess it must be something with the stop signal comming to early or so. I tried already to raise the sensitivity to 190 in 10 increment steps. I use a MKS Gen board if that helps. I will upload later also a video from the beavior. I attach my config files for you. Thanks for your help in advance.... |
The sensitivity range is -64..63. |
SENDING:M119 And additional for you. It moves only in stealthchop in direction from the end stop, about 5mm every time i press home x In Spreadcycle it stands still all the time |
Video will be uploaded in about 18 min |
Ill try to figure out how to use the StallGuard sketch. Never did something like that before. |
StallGuard, which is used for sensorless homing, only works when in spreadCycle mode. When you have stealthChop enabled, Marlin will switch to spreadCycle for the homing procedure but not for normal operation. |
Sounds interesting, because the beavior is different. With Stealthchop activated it moves every time a bit and in Spread Cycle it stands still when i press X Homing. So there must be something different. |
I configured now the pins, how do i use the Stall guard example? |
here is the video for you :) this is in stealth chop. Sensitivity is 19 |
The example when uploaded will just start running the motor and reporting the stallGuard values back to the user. Your video looks like a too low sensitivity setting. Which you already tried increasing. |
echo:Stepper driver current:
|
looks like it does not handover the stall guard threshold. is saw that there is in the stepper_indirection.cpp the following part missing: #if ENABLED(SENSORLESS_HOMING) same for Y is not in the file anymore. Maybe moved somewhere else... |
Here is the video from the Stall Guard Example. |
Tried now to set the sensitivity with M914. So conclusion for me it that no value is given to the Board on init.... What do you think about it? |
Your sgt measurement values are quite low compared to what I've typically seen. I'm usually getting somewhere around 300-700. SGT values are set in |
I added now following lines which where present in Marlin 1.1.6 #define _TMC2130_INIT(ST, SPMM) tmc2130_init(stepper##ST, ST##_MICROSTEPS, ST##_HYBRID_THRESHOLD, SPMM) void tmc2130_init() {
|
The effect of that is that on every boot you will override the stored EEPROM setting with the default value from configuration_adv. |
Okay i got it. Do You have any idea how to fix the low sgt measurement readings. Thanks man! What could be the reason for those low sgt measurement readings? |
My understanding is that stallGaurd can be very hardware dependent and different setups will have different thresholds. I'm just surprised that the gap is that big. |
Great work on this!!! I figured now out that Stall guard sometimes works now and sometimes not. Guess i will use the old way with endstops for now until you've had success with the new way of sending the values what you are working on. With my SG Readings i guess the space from 2-5 is a bit to low if a axis becomes a bit heavier it would see a homing. Motor current is set to 800 Really appreciate your commitment to this project. THANKS |
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. |
Description: Step motors do not going to home and i think not save HOMING_SENSITIVITY, because if i send command M914 or M914 X19 Y19, terminal say only:
0:21:56.098: X driver homing sensitivity set to
0:21:56.101: Y driver homing sensitivity set to
For command M119 output always:
0:33:46.060: x_min: open
0:33:46.060: y_max: open
Steps to reproduce:
Install TMC2130 step drivers, wires to SPI and diag1 to S endstop pin on RAMPS.
Configuration.zip
The text was updated successfully, but these errors were encountered: