Catching missed steps and stopping

With the Jackpot board, and the supplied drivers, is it possible to catch missed steps and stop the cutting process? Imagine like a Prusa does, no need to correct the steps, just stop, and home all axes. Trimac drivers can do that right, but what need set up?

This is not my area of expertise, but my understanding is you can only do that with closed loop stepper motors, which would require different drivers. I’m not certain I’ve seen anyone do that with a Jackpot (yet).

While there is some interest around closed loop steppers around here, it’s still rather rare. It’s easier to maintain the machine and learn proper feeds and speeds to prevent skipped steps.

I’m guessing you are referring to StallGuard? I think that’s only used for sensorless homing which we don’t use on V1 machines.
http://wiki.fluidnc.com/en/support/stallguard_tuning

1 Like

You should be able to do step skip detection without closed loop using the TMC drivers. You just won’t know what and how many were skipped like you would with closed loop. It might need a higher end driver though then the 2209’s? And something would have to be built into FluidNC to detect the skips and stop. I’m just tired of ruining a 4x8 sheet of plywood because of a skipped step. Just detect so many bad steps, and stop, so it can be fixed and started again.

I’m still not convinced it’s possible for the hardware/firmware, but like I said, not my area of expertise. What I can say with reasonable confidence is that it is unlikely to be added to FluidNC unless you have the development skills to implement such a feature. The FluidNC developers have a lot on their plate supporting the features they already have. I saw you created a FluidNC github issue for this. I hope I’m wrong.

I haven’t seen any details on your machine. If you are skipping steps, something is wrong. That could be wrong bit, wrong feeds and speeds, poor quality material, loose bit, an issue with the Lowrider itself, the list goes on and on. I would suggest we tackle the problem from that direction. What material, what bit, how new is it, what spindle speed and feedrate are you using? What axis is skipping steps? Is this an LR3 or LR4? Do you have any pictures or video to share. This forum has helped a ton of people, myself included, work through issues like this.

2 Likes

Cool. Seems like I may have been wrong about not being able to use Stallguard for this purpose. I still think you should work out your skipped step issues without this first. But maybe this is ok as an extra safeguard. I imagine there may be some experimentation required to set a reasonable threshold.

Connect the TMC diag output to a GPIO and assign it as fault_pin. Configure for stallguard mode and set the threshold pretty high.


The diag pin is the one in the middle next to the potentiometer.

I’d have to look to see what input to use on the Jackpot as a fault pin. You can only define a single fault_pin. Not sure if you can just connect all the fault pins together or if something more advanced is required. It looks like you could also use a separate estop_pin which has the same effect.

While the stallguard link I posted earlier was more related to sensorless homing, it still talks about the changes you would need to make to your config.yaml.

Maybe I’ll try this later if I find some time. Based on what I’ve seen in the forum, skipping X steps is more common than Y since it’s 1 stepper vs 2. Usually skipping Z steps is a lubrication issue. So, I would try this on X first. Note that if you are only/mostly skipping X steps, some have bumped the run_amps on that stepper to 0.900 from 0.800 to help.

1 Like

It’s a brand new feature being added to FluidNC.

It isn’t clear yet what the implementation will be. There aren’t enough free GPIO on Jackpot or other existing boards to allow FluidNC to track all 6 drivers independently. Diode OR would only get you the ability to pause the machine on error, not to know which stepper it is.

It most likely is NOT a good idea to automatically re-home a 3 axis machine that likely needed a touch plate to fully find home.

At best, I suspect this would be an error condition halt which allows the machine to not destroy a work pieice when stepps are being missed.

It may be possible when missed steps are detected to use the UART to query the drivers and further discern status. It will be interesting to watch what Mitch comes up with.

2 Likes

Yes, just plain stopping would be good enough. Z seems unnecessary, I would just want X and Y. Pausing is fine. Better than continuing on with a bad cut at the wrong location. Don’t really need to know which stepper it was either

Here is the Wiki from the (closed) feature request

http://wiki.fluidnc.com/en/support/stallguard_tuning

No offense to Ryan, but if buying some other $50 board makes it possible that is fine as well if it saves $120 sheets of plywood

It’s done I believe, he just added support for a couple more drivers in the latest release

I am at .9 already. Doesn’t matter to me if the fault pins are all connected, I don’t need to know which stepper is skipping. If you figure out the input post here please

1 Like

LR4, I’ll create a different post for it. Figuring out accuracy issues as well. A .75in slot shouldn’t come out as .73, .72, .74 all on the same sheet cut. Bit is exactly .250, grubs are tight, but anyways I’m getting into a new topic

1 Like

The configuration side of it makes sense to me, but I’m uncertain how to wire this (at least safely). I’d like to try connecting the diag pin from the X driver to gpio 39. It would be nice to use that one so you’d get an LED indicator when triggered. I’m not sure whether it would go to the signal or ground pin. I’m not currently using anything in the expansion socket so those gpios are available as well.

I’m guessing diodes would only be needed if connecting all of the diag pins to a single input? So, it would prevent the output from one diag pin from feeding into other diag pins?

I’m also guessing that the Jackpot docs say “No Stallguard” only because the diag pins aren’t connecting to anything (which I’m guessing is at least partly because there aren’t enough input pins).

intresting topic 4 real, but i belive the cl steppers phillip shared are the better option

But also more expensive, new hardware and modified parts.

Having a job pause when it detects a problem using existing hardware sounds great.

2 Likes

Something something closed loop Estlcam… :sweat_smile:

1 Like

Sure thing. Hope they figure out about this soon before money get spend

You’d have to modify the mounts and such. And change boards. And change to Marlin. With a CNC I don’t think most people need the steppers to correct themselves while cutting. Once the stepper drops steps, just stop whatever it is doing and wait for manual repair. I’ve had wires stuck, vac hose stuck, router dropping out of the mount due to heat. Too aggressive feed for a different material. All ruining a cut and yes partially my fault. Cutting 4x8 back and forth and back and forth means hundreds of chances for a wire to go wild and get stuck. My cable management and hose management is good 99% of the time but that isn’t good enough. That means over 100 moves something goes wrong once, and that means once per job, which is bad.

Technically, even closed loop steppers should be connected to a fault pin in case it can’t recover.

I think this is worth pursuing. I have concerns about setting the threshold properly. We don’t want false positives but we want to trigger as soon as possible. When used for homing, that would be using the same feedrate and such. When used for this purpose, we can have different feedrates and different materials so I don’t know if one setting can properly handle those variations or not. But, you don’t know until you try.

My current plan is to connect the diag pin from the X driver to the gnd of gpio 39. I verified that has an external pullup resistor. I also have an input board for the expansion slot which has some extra protection than connecting wires directly. Don’t trust me on the wiring part.

I’m not opposed to soldering tiny wires or something if need be. I’ve soldered straight to STM chips before on other boards. Maybe Ryan will chip in on the Jackpot board. Not sure how to tag him here.

You can always tag Ryan via @vicious1 .

At present there isn’t anything to do on Jackpot for this change.

Testing at this point is just soldering a header on the TMC2209, and then wiring that to a GPIO as Jason is doing above.

I’d still do a wire OR tree for the drivers, but that’s me.

There are already pins so I was just going to do a short female to female dupont wire in between. I was going to test with just X before going further. I hope to try this over the weekend.

1 Like