| ??? 07/26/03 03:39 Read: times |
#51486 - stepper motor ramp up problem |
In a thread from 2000 called "Stepper Motor Speed Routines", a guy named Cory Spackman wrote:
"Use a timer in 16-bit mode with a variable preload to vary the interval of overflow. Enable the timer's interrupt. In this timer's interrupt service routine place a state machine that sends the proper control signals to the stepper motor." That's exactly what I'm doing for my stepper motor ramp up. I have a table of timer reload values. Each time the interrupt occurs, I index the next place in the table to reload the timer until I reach the final reload value at maximum speed. The ramp up looks perfect. Here's the catch: I am using 3 stepper motors to turn the three reels of a machine much like a slot machine. The ramp up works great because they all start spinning at exactly the same time, but as each reel approaches its stop, it needs to ramp down. The problem is, though they all ramp up at the same time, they all ramp down at different times. I'm all out of timers since I've dedicated them to other things. I tried to do a linear ramp down based on the max speed by just doing N X Interrupt for N = 1 to about 4, but it was so jerky that I always lost my position. I think that my approach would be great if I were only turning a single stepper motor, but I'm beginning to think that its an inappropriate solution when I need to turn multiple motors. I'm thinking of disabling the serial port during the spin to use the baud rate generator as a ramp down timer. I was also thinking that since my interrupt fires only about once every 1.8ms that I could crank it up and have all the motors spinning at N X Interrupt instead of once for every interrupt. This would be an attempt at making the "linear" ramp down less jerky. I'm having trouble seeing what is the better solution, or if Has anyneither is very good. one had a problem similar to this? Thanks for looking at this. -Chris |
| Topic | Author | Date |
| stepper motor ramp up problem | 01/01/70 00:00 | |
| RE: stepper motor ramp up problem | 01/01/70 00:00 | |
| RE: stepper motor ramp up problem | 01/01/70 00:00 | |
| RE: stepper motor ramp up problem | 01/01/70 00:00 | |
| RE: stepper motor ramp up problem | 01/01/70 00:00 | |
| RE: stepper motor ramp up problem | 01/01/70 00:00 | |
RE: stepper motor ramp up problem | 01/01/70 00:00 |



