Replies: 3 comments
-
It is not optimized for showing a stable RPM - I do not think that is really needed. What is important is that the reported angular position is accurate. Both uses data from the encoder. Currently RPM is calculated from the time elapsed for a few number of pulses from the encoder, this could be increased - or a running average calculated. BTW reasons for the instability is likely both interrupt latency and how many pulses are used for the calulation. And one source could be the pulses coming from the Arduino not beeing 100% stable, again due to interrupt latency? BTW which driver are you using and what is your PPR setting? |
Beta Was this translation helpful? Give feedback.
-
here you go
|
Beta Was this translation helpful? Give feedback.
-
With that configuration I time 32 encoder pulses for calculating the RPM. When I feed the pulse input from a PWM generated signal it is generally very stable - displaying most RPMs the same for minutes on end (or perhaps as for long as I feed the pulse input), So most likely most of the instability is due to jitter in the input. I could add a running average to smooth out the readings, but why would I do that? Do you have a technical reason for it? |
Beta Was this translation helpful? Give feedback.
-
The encoder that I use on my CNC lathe spindle cannot display a stable value.
I also did simple testing on my controller board by making a simple encoder simulation using an Arduino nano. here is a simple program
after that I saw the encoder value that appeared in the verbose output. this is the result.
Is this unstable value caused by firmware that has not been optimized?
Beta Was this translation helpful? Give feedback.
All reactions