Ruminating a bit here, but I've been playing with the LED&Key module as a possible stepper RPM display.
The fastest library I've found for this is Tom Almy's TM1638 SPI lib. It can update the digits and LEDs at about 250 microseconds (on my Nano Every) maybe a bit faster if I tweak the code and update only 4 digits (haven't tried it yet).
However, with a 200 RPM stepper, 200 steps and 8X micro-stepping, step intervals will be about 180 microseconds. This doesn't leave much time for anything else (button reads and other general processing) or higher RPM.
I am assuming that this is a task for dual processor boards, or a much faster display (is there such an animal??).
Yeah, I considered that, but even if it's only every 200 ms or so, it has the potential of interrupting motor steps depending on what ever other processing is happening between step intervals. Not clear what that is yet.
Unless I can juggle and schedule those other activities against display updates.
Yes, but if it takes 250 microseconds to update the display, then it will interrupt (delay) the stepper pulses no matter how infrequently the 'other' things are done.
You mean like a timer interrupt? Then the timer would interrupt the display updates (not a problem) if they happened at same time? Might give this a try.
Hi,
How are you controlling the stepper motor?
How are you measuring the speed?
What model Arduino are you using?
Please post your code.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.