TMC2130Stepper icon indicating copy to clipboard operation
TMC2130Stepper copied to clipboard

stallguard2 & AccelStepper library

Open csurf opened this issue 4 years ago • 2 comments

I'm trying to use the TMC2130Stepper library along with the AccelStepper library in order to drive the stepper motor. The AccelStepper library requires making a function call stepper.run() for each step that the motor must make, which means that the motor is technically idle/stopped in between each call to the run() function. So, does this also mean that I won't be able to get a valid stallguard value during the off period between the calls to stepper.run()? Or, is it possible to get the last reading of sg_result even though the motor has just stopped? I simply need some confirmation/further explanation on how this works...

I'm thinking I'm going to need to look into using an interrupt-driven strategy to drive the motor in order to measure the load simultaneously while the motor is actually running. Any feedback/advice on getting this to work?

csurf avatar Aug 24 '19 21:08 csurf

Working on the same thing right now. Did you find a soloution?

MilanVDB avatar Mar 29 '20 11:03 MilanVDB

I am working in the same thing, trying avoid using the accelstepper library. Did you sovled it @MilanVDB ?

edwardocano avatar May 01 '20 17:05 edwardocano