A: 

Hi,

I think your proposal to change one digit at a time is strange, because it actually provides the user with misinformation... what I would consider would be actually to add much MORE state changes, and implement it so that whenever the signal changes, they gauge moves towards the new value in increments of one. This would provide an analog-gauge like experience and "animation" of the change; the operator would very soon recognize subconsciously that digits rotating in sequence 0,1,2... denote increasing speed and 9,8,7,... decreasing speed.

E.g.:

Filtered signal      Display
0000                 0000
2345                 0001
                     0002
                     ...
                     2345

Hysteresis, which you have implemented, is of course very good for the stable state.

antti.huima
I like your creative thinking, but I'm not sure I agree with your reasoning. In your example, it would take almost 40 seconds for the display to count from 0000 to 2345, assuming a 60 Hz refresh rate, which is (approximately) the highest frequency that the human eye can process.
e.James
A: 

This is a delicate question, and my answer does not cover the algorithmic aspect.

I believe that the behaviour that you represent in the table at the beginning of your posting is a very bad idea. Lines 2 and 5 display data points that are and never were in the data, i.e. wrong data, for the sake of user experience. This could be a poor choice in the domain of machine operation.

A lower update rate may "feel sluggish" but is well defined (only "real" data and at most n milliseconds old). A faster update rate will display many intermediate values, but the most significant digits shouldn't change to quickly. Both are easier to test than any pretty false value generation.

Christoph
A: 

This will incorporate more or less slowly the sensor value into the displayed value:

display = ( K * sensor + (256 - K) * display ) >> 8

Choose K between 0 (display never updated) and 256 (display always equal to sensor).

Eric Bainville
+1  A: 

If you do not need the data expressed by the 4th digit, and are strictly bound to a 4 digit display, have you considered using the 4th digit as an increase/decrease indicator? Flash some portion of the top or bottom of the zero at 2Hz* to indicate that the next change of the gauge will be an increase or decrease.

I think you could also do well to make a good model of the response of your device, whatever it is, to adjustments, and use that model to extrapolate the target number based on the first half second of the two second stabilization process.

*this assumes that you have the two updates per second you posited. Most 4 digit displays are multiplexed, so you could probably flash it at a much higher frequency with a little driver tweaking.

Sparr