|
|
|
|
|
by rkagerer
2275 days ago
|
|
Starting about 7:09 he talked about why the Arduino wasn't a good fit and explained his choice of the TI board (including speed, single-cycle floating point hardware, responsive interrupts and dedicated peripherals to latch consistent, jitter-free reads of the quadrature encoder counts). Note it's a 4096 step encoder, mounted on a different shaft than the one he's driving, that can run upwards of 2500rpm. His motor control loop (not the complete end-to-end, but the bit that maintains output position to that desired) takes under a microsecond. His code works with either a Nema 24 stepper or Nema 23 servo, and he demonstrated both. In the second video he maths out some projections for error/drift (factoring in floating point representation error) and its ultimate impact on thread accuracy (which provides some motivation for what you might initially consider "overkill" hardware). 10hz is just the refresh rate for the tachometer calculation. |
|
Thinking about dealing with an encoder, let's say it has 8k counts per revolution, and the motor can do 10 revolutions per second, which is pretty fast for a stepping motor. Then the encoder steps are coming in at an 80 kHz rate, but an 180 MHz MCU can execute a couple thousand instructions in that time period, so it's not even breathing hard.