So i am moving a stepper while logging data over serial! Every time I am logging Data the Stepper stops, because the logging needs a bit longer then the Stepdelay. Now the stepper makes a "clack" sound every 0.5 seconds. It doesnt really bother me, but i am concerned that it might damge the steppers.
My programm is pretty long, but it basicly gives every 10 microseconds an Highpulse to the stepperdriver Step pin. But when I log data it takes longer than 10 microseconds so there is a "longer" stepp Interval, which stops the motor. I know I could drive the Stepper with Interupts, but I didnt found a good library and I didnt find a simple way to implement a "slelfmade" Interupt function.
If somebody knows a library for this purpose or a simple way I would be really thankfull!
Oh! I simplified the function because it was emeded in another bigger oney and made an mistake...
My microstepping settings is 1/16 and the step pulses are 10 microseconds...
I dont have acceleration in my code... what would be the advantage of it? (It isnt really a Problem if the Stepper misses a few Steps)
probierer:
Oh! I simplified the function because it was emeded in another bigger oney and made an mistake...
My microstepping settings is 1/16 and the step pulses are 10 microseconds...
I'll repeat my question: what frequency are you expecting to drive step pulses - do you understand "frequency"?
I dont have acceleration in my code... what would be the advantage of it? (It isnt really a Problem if the Stepper misses a few Steps)
It depends what step-rate you are trying to move the motor at, and what the motor is, but normally without acceleration a stepper will stall or misbehave.
As I said I am sending every 10microseconds 1 puls so the frequenzy would be 100Hz. I would like to keep this frequency! I dont think I need acceleration since everything works fine when using the Stepper wihout Serial.println....
What is your desired interval between steps (in millisecs or microsecs) ?
10 microseconds
How long does a single call to CalcLoadValue() take (in microsecs)?