After having the force plate's load cells modified so that they sample at a higher rate, force plate codes that used to work are now broken.
Possible Solution
Modify hx711.py with a looser (higher) standard deviation:
Open hx711-multi/src/hx711-multi/hx711.py
Find (Ctrl+F) self._max_stdev (line 585 - here is what it should look like)
Change the hard-coded self._max_stdev value from 100 to something much higher (e.g. 1000000)
For sanity, place a temporary print("modified code is running") line below your modification so that, when you test your code, you can be certain that your code uses the modified library code (rather than the hx711 that is installed system-wide).
Modify readings_to_average in your code to a higher value, to reduce noise in your data.
Run your scripts. They should print "modified code is running", so you know for sure that your modifications are being ran.
Remove print("modified code is running") from the script - it was only temporary
Troubleshooting this Solution
Weight Values are Incorrect
Your force plate was calibrated in one hardware mode, but the hardware modification changed that mode. This may affect the raw readings that are produced by the force plate. If you find that the raw values you read are now very different from previous measurements, you may need to recalibrate:
Temporarily re-add the print("modified code is running") snippet to hx711.py to ensure that the calibrate.py script uses your modified hx711.py script.
Modify the calibrate.py script in your (modified) copy of hx711-multi to take a larger number of readings_to_average, if you want to ensure the now-noisier load cells don't cause calibration issues
Run your modified calibrate.py:
# example of running your modified calibrate.py in a terminal
# don't use /opt/hx711-multi/tests/calibrate.py - that's the unmodified version
cd /home/pbl/Desktop/hx711-multi
python3 tests/calibrate.py
The calibration script should print modified code is running (our temporary sanity check) and then continue as normal.
Remove the print("modified code is running") after you're finished (it's only there to check if your modification is running).
It Still Produces None Values Everywhere
Try a higher self._max_stdev
Try a different number for readings_to_average
Otherwise, you have another--yet to be fixed--issue
If this Solution Doesn't Work
The issue might be deeper in hx711-multi, or a hardware issue. We are investigating the library but, if in doubt, reverse the hardware change. The electrical engineer can do this. The procedure involves placing a bead of solder back over the connection.
We will try and investigate each issue with this hardware change but some variables are out of out control (specifically, the hardware and the library code). If we cannot fix your sampling rate (e.g. with this hardware change), the measurement will have to be done on the lower sample rate (10Hz). In this case, it is important to note this in the method section of your abstract and how you dealt with this (e.g. right filtering) and to discuss in the discussion section of your abstract what the effect is of this low sample frequency on your results and conclusions.
The Bug
After having the force plate's load cells modified so that they sample at a higher rate, force plate codes that used to work are now broken.
Possible Solution
Modify
hx711.py
with a looser (higher) standard deviation:hx711-multi/src/hx711-multi/hx711.py
Ctrl+F
)self._max_stdev
(line 585 - here is what it should look like)self._max_stdev
value from100
to something much higher (e.g.1000000
)print("modified code is running")
line below your modification so that, when you test your code, you can be certain that your code uses the modified library code (rather than thehx711
that is installed system-wide).readings_to_average
in your code to a higher value, to reduce noise in your data."modified code is running"
, so you know for sure that your modifications are being ran.print("modified code is running")
from the script - it was only temporaryTroubleshooting this Solution
Weight Values are Incorrect
Your force plate was calibrated in one hardware mode, but the hardware modification changed that mode. This may affect the raw readings that are produced by the force plate. If you find that the raw values you read are now very different from previous measurements, you may need to recalibrate:
print("modified code is running")
snippet tohx711.py
to ensure that thecalibrate.py
script uses your modifiedhx711.py
script.calibrate.py
script in your (modified) copy ofhx711-multi
to take a larger number ofreadings_to_average
, if you want to ensure the now-noisier load cells don't cause calibration issuescalibrate.py
:modified code is running
(our temporary sanity check) and then continue as normal.print("modified code is running")
after you're finished (it's only there to check if your modification is running).It Still Produces
None
Values Everywhereself._max_stdev
readings_to_average
If this Solution Doesn't Work
The issue might be deeper in
hx711-multi
, or a hardware issue. We are investigating the library but, if in doubt, reverse the hardware change. The electrical engineer can do this. The procedure involves placing a bead of solder back over the connection.We will try and investigate each issue with this hardware change but some variables are out of out control (specifically, the hardware and the library code). If we cannot fix your sampling rate (e.g. with this hardware change), the measurement will have to be done on the lower sample rate (10Hz). In this case, it is important to note this in the method section of your abstract and how you dealt with this (e.g. right filtering) and to discuss in the discussion section of your abstract what the effect is of this low sample frequency on your results and conclusions.