vedderb/vesc_tool

Rapidly fluxuating values (vin, power, battery % remaining) based on inaccurate voltage readings from the VESC

Closed this issue · 4 comments

Here is a video of the issue: https://www.youtube.com/watch?v=2YFcG_fOMn4

A quick summary: Voltage, power (wattage), and battery % remaining values rapidly jump up and down on my 12S board due to inaccurate VESC readings being rapidly reported.

While technically, this is a hardware bug/inadequacy, in my case exhibited on a Flipsky 6.6, the user experience should be relatively easy to rectify in the frontend. A rolling average of the v_in value could be used, to help smooth out other calculations that use vin. For example, Metr Pro has improved the issue using a smooth voltage option in their settings: https://forum.esk8.news/t/the-definitive-guide-to-metr-app-metr-pro/3109/21

Ideally input voltage shouldn't fluctuate that much from a battery unless something is seriously wrong.

Smoothing may be useful on the VESC firmware side too depending on what v_in is used for in the firmware, though at this point I'm extrapolating beyond the code that I've observed. I have only looked through the vesc_tool codebase.

Rolling average can be tracked at the following lines where values.v_in is assigned in commands.cpp:

values.v_in = vb.vbPopFrontDouble16(1e1);

values.v_in = vb.vbPopFrontDouble16(1e1);

In a perfect world this smoothing behavior could be toggle-able via the UI.

Can you give the development version a try?
https://vesc-project.com/node/2859

Silly question: just the vesc_tool app or do I need to update the firmware to the dev version as well?

You need to update the firmware too. That is where the filtering is done.

Updated to the test firmware, these are the results: https://youtu.be/r6_QU6wincY

Filtering seems to do the trick. A little fluctuation here and there, though it seems to be mostly close to the edge of a tenth of a volt. A lot more accurate display, with the readouts not bouncing as they were before.