- Joined
- Apr 4, 2013
- Messages
- 884
After the lively conversations about the relative merits of TouchDRO when used with iGaging EZ-View scales. That whole discussion "triggered" me a bit, so I decided to experiment more with the code. I'm working on a new version of an improved version of the adapter for iGaging EZ-View scales that is based on a much more powerful processor (ESP32). One of the benefits is that it has gobs of extra processing power, compared to the previous adapter model [and the EZ-View display]. After two evenings on the laptop, I think I have a decent fix. In short, here is what's happening:
Now I need to figure out if I can cram any of this into the old MSP430 firmware...
Regards
Yuriy
- The code oversamples the scale on each reading and averages the values (the whole thing takes about 80 milliseconds).
- If the delta between the old value and the new average is within 1 encoder tick, the code then checks to see if 75% of samples are at least 1 tick away from the old value. If they are, this means that the scale has likely moved by 0.01mm, so the value is updated. Otherwise, the new average is ignored and the old one is used. I could've gone for 100%, but that felt a bit weird on very small movements. The DRO felt sticky.
- If the delta is larger than the "max reasonable distance a scale can move in 0.1s", the code "suspects" a jump. It then checks the samples and if there is only one outlier, it is removed and the position is recalculated.
Now I need to figure out if I can cram any of this into the old MSP430 firmware...
Regards
Yuriy