HX711 Interface for an arbitrary number of load cells with calibration support and realtime graphing.
By default, the firmware has been configured for 3 load cells, for use with a Forsentek F3N-1kN triaxial load cell unit.
-
Load up the
/firmware/hx711_electricui.ino
file with an Arduino compatible toolchain. -
Install the
bogde/HX711
library from Github or by searching for HX711 in the Arduino library manager and installing the option listed asHX711 Arduino Library by Bogdan Necula
. -
Install the Adafruit FRAM SPI library.
-
Select the relevant board, and flash to the microcontroller. This was written with a Feather M0, but the HX711 and FRAM are all using 'soft' IO and should port to pretty much all Arduino targets.
- Assumes you have a working Electric UI toolchain.
- In your shell, navigate to
/interface
, and runarc start
to launch the UI.- In some instances, you may need to run an
arc sacrifice
to clear caches and re-build the project.
- In some instances, you may need to run an
- The UI should have booted. Connect the hardware.
It may be desired to build executables of the UI rather than running the development environment.
This is pretty simple, just run
arc build
in the interface directory root, wait, then the standalone binary will be placed in the/interface/release
folder.
- Configure the number of load cells in use by modifying the
HX711Def_t
entries at the top of the firmware file. - Specify the data and clock pins in the
HX711HardwareConfiguration_t scale_config[]
, where the pin numbers are the Arduino-branded pin name.
The sampling, calibration, communications and UI code should adapt to the number of load cells specified at compile time.
The UI shows the 3 channels by default, and calibration controls are provided on the lower part of each load cell's card.
- Remove mass from the given axis to calibrate. Click the first calibration button.
- Add a test mass to the axis, and drag the calibration mass slider to specify the weight in kilograms.
- Click the second calibration button to commit the calibrated mass value. Remove the test mass, and the reading should zero.
- Check the calibration.
- Repeat for the other axis as needed.
- Once done, click "Save" to commit the calibration values for all load cells to storage. These values will be loaded at boot.
- The tare button just zeroes the reading, but doesn't change calibration.
- The firmware tares all axis at startup.
- Minor cosmetic improvements to the UI
- Add logging to CSV
- Expose analog readings for temperature/voltages to add additional test-bench functionality.