Whelp - got my DC servo motion controller working OK, with thanks to several forum members for their advice.
Interrupt driven at 2KHz, handles its own buffering, announces its capabilities (well, the motor's) to the Mac so I've got sort of plug and play, and it's doing some sexy interpolation on the trajectory too. Made you guys a video - I figured you'd like nothing more than listening to two and a bit minutes of some tit waffling, so here you go:
https://youtu.be/DIOxSClVAMk
So, next I've got to make two more motion controllers - a lens one (shouldn't be a problem thanks to other people's hard work deciphering the Canon EF protocol) and more trickily, a stepper motor driver.
Same protocol, buffering, interpolation (if necessary - but I don't think it'll be as critical as the DC servo) but very different control loop.
Hmm. Step timing. While doing my other jobs too.
Any suggestions, thoughts, info appreciated. I've used the AccelStepper library in the past, but that doesn't lend itself to my needs - I have a list of positions, one for every 25th of a second, coming from the Mac, and I need the stepper to get there as smoothly as possible. It's buffered, so I don't just know where I want the stepper to be in 1/25th of a second's time, I can also work out what velocity it should be at when it hits the mark too.
But I'm a bit nervous about timings.
What sort of frequency steppers have people played with here? (I mean, almost all my motors are 200steps/rev, but the drivers can handle ridiculous levels of microstepping which don't half help at slower speeds).
Probably need to sit down with a napkin and a pen and work some figures out, but I thought I'd see what other people have achieved too
PS Paul, thanks for making all my bloody arduinos and drawers full of atmegas and attinys and AVR programmers instantly feel slow and crap. Thanks, man. Real nice of you. Grrr. (yeah, so I've got 5 Teensy LCs on order now. I hope you're bloody happy)
Interrupt driven at 2KHz, handles its own buffering, announces its capabilities (well, the motor's) to the Mac so I've got sort of plug and play, and it's doing some sexy interpolation on the trajectory too. Made you guys a video - I figured you'd like nothing more than listening to two and a bit minutes of some tit waffling, so here you go:
https://youtu.be/DIOxSClVAMk
So, next I've got to make two more motion controllers - a lens one (shouldn't be a problem thanks to other people's hard work deciphering the Canon EF protocol) and more trickily, a stepper motor driver.
Same protocol, buffering, interpolation (if necessary - but I don't think it'll be as critical as the DC servo) but very different control loop.
Hmm. Step timing. While doing my other jobs too.
Any suggestions, thoughts, info appreciated. I've used the AccelStepper library in the past, but that doesn't lend itself to my needs - I have a list of positions, one for every 25th of a second, coming from the Mac, and I need the stepper to get there as smoothly as possible. It's buffered, so I don't just know where I want the stepper to be in 1/25th of a second's time, I can also work out what velocity it should be at when it hits the mark too.
But I'm a bit nervous about timings.
What sort of frequency steppers have people played with here? (I mean, almost all my motors are 200steps/rev, but the drivers can handle ridiculous levels of microstepping which don't half help at slower speeds).
Probably need to sit down with a napkin and a pen and work some figures out, but I thought I'd see what other people have achieved too
PS Paul, thanks for making all my bloody arduinos and drawers full of atmegas and attinys and AVR programmers instantly feel slow and crap. Thanks, man. Real nice of you. Grrr. (yeah, so I've got 5 Teensy LCs on order now. I hope you're bloody happy)