Hi,
After spending many days looking and hacking some sketches in arduino, I'm kind of hoping to get some advice how to implement a drive control system using a stepper motor.
I realize steppers aren't probably ideal for this application but there are reasons we are going with this approach.
The basic idea is this... I have a stepper motor that spends most of it's life running clockwise at a fairly slow speed to counter the motion of the earth.... precisely, it runs at 178.2943 PPS clockwise.
When in this state, the precise speed of the motor is important.
Now while running at this speed, the user may put a button to command the motor to run at a faster speed ("slewing"), which is about 3000 PPS...... after releasing the button the motor must resume at ~178 PPS clockwise.
The user can also reverse the direction of the motor to spin counter clockwise.
I obviously need to implement so sort of acceleration/deceleration curve(s) to achieve this.
The issues are... the accel/decel cannot block. Once that button is released... it must decel as quick as possible to the steady ~178 clockwise rate...
It must accelerate quickly on button press like coming up to 3000 PPS in like 500ms. When running at these faster rates, precision is not as important.
I've looked at a bunch of libraries. I thought AccelStepper was going to be my savior but that appears to not be the case.
What I've found is all the libraries are "position centric" that is, they will accel/decel to a specific position but not merely accel/decel to change constant speeds (this motor will be running for hours on end). e.g. I thought I could command the accel library to reach some far off position then when it got there, just use the "runspeed" to continuously run the motor at the new speed. But it accelerates, then when it gets close to that position it decelerates.... and then sets the speed to zero.
Before I start hacking an existing library or writing my own, wondering if anyone has done something similar? Namely, running at constant speed and accel/deceling to new speeds based upon a user command (button press)?
Hardware wise (if it matters) is the stepper is a 19:1 gearmotor turning a 4000:1 geartrain.
Using an ardiuno due (faster clock speed).
BTW, anyone know how I can figure out if my board is using crystals or ceramic resonators? On my board, the only thing stamped on them is the frequency..... crystals needed for precision as noted above.
Thanks for any insights or advice!