Tracking algorithms and speed change.
Hi,
I've been pretty quiet, occupied elsewhere for a while, but I'm back, and keen to get going again. For those who don't know, I decided at the beginning of this 2009 year to design up a new machine using an ST Microelectronics ARM 100 pin 72MHz microcontroller. I got 15 boards built, and they are useable after a few jumper placements to correct a bad edit I made designing the board.
The topic question,
At the moment, I've got an interrupt running 5 channels PWM, 5 channels servo motor or brushless ESC, and 4 on-board bipolar stepper motor drivers. (L298 with some feedback)
At the moment, I've got the steppers running as fast as possible without speed ramping, and with decent drive waveforms. I can (theoretically) bump the speed up to 16 x faster, but that wouldn't work without some speed ramping and other finessing. However, it promises some room for granularity in acceleration.
I haven't done any g-code parsing code yet, but I was thinking to convert each G-code as it comes, into a start to finish coordinate array in 4 axis. This processor has 20k RAM. I could be non economical and allow 4 bytes per axis per point stamp (16 bytes), but if I have a long, detailed move, then this translates to... say 256mm x 1/256mm accuracy, = 2^16 x 4 bytes x 4 axis. Nasty !
So, I think I'll have to calculate mostly on the fly, with a short lookahead buffer for speed profiling. That way, I can do coordinate calculations and acceleration, deceleration calcs in the main loop, with results available in the buffer, for the interrupt.
To complicate this, I'm still a relative C novice
Acceleration and Deceleration can be pre-calculated, assuming that the mechanical power and inertia at each axis is OK.
Have I got anything here really wrong ?
Any other things I've missed ?
My CNC/extruder creation: [
grael-minifactory.blogspot.com]
Edited 1 time(s). Last edit at 11/04/2009 10:34PM by grael.