...specs may even ask for 12V... but heat / heat dissipation becomes an issue, that's why stepper drivers apply different currents at different times. Usually higher current on signal change, lowering towards the phase end, an lower on hold (when stopped).
2ms is about right... which also puts constraints on how much else code can be executed next to controlling the stepper phases, including the code 'in the loop' to determine when to cease stepping.
In my 2-dim 'mega' plotter I built - will pub later - all calculations are done beforehand and only simple decrement and 'falsy' checks are applied... (plus x/y ratio, whether the 'slower' moving axis has to step or not... For the very same performance reason - and repeatable, timing insensitive - 'precision', I have only one interval going...)
The experience made me seriously consider to apply slave devices - other than JS / Espruino controlled - MCS, one per axis... or 'hardware' PWM (timer directly controlling pin...)
I like the acceleration / deceleration approach, but as said, code has not to slow down rhe 'intervalled' stepping code execution.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
...specs may even ask for 12V... but heat / heat dissipation becomes an issue, that's why stepper drivers apply different currents at different times. Usually higher current on signal change, lowering towards the phase end, an lower on hold (when stopped).
2ms is about right... which also puts constraints on how much else code can be executed next to controlling the stepper phases, including the code 'in the loop' to determine when to cease stepping.
In my 2-dim 'mega' plotter I built - will pub later - all calculations are done beforehand and only simple decrement and 'falsy' checks are applied... (plus x/y ratio, whether the 'slower' moving axis has to step or not... For the very same performance reason - and repeatable, timing insensitive - 'precision', I have only one interval going...)
The experience made me seriously consider to apply slave devices - other than JS / Espruino controlled - MCS, one per axis... or 'hardware' PWM (timer directly controlling pin...)
I like the acceleration / deceleration approach, but as said, code has not to slow down rhe 'intervalled' stepping code execution.