Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Cell Autocalibration #39

Open
ztnel opened this issue Feb 4, 2024 · 0 comments
Open

Load Cell Autocalibration #39

ztnel opened this issue Feb 4, 2024 · 0 comments
Assignees
Labels
driver Firmware driver firmware embedded software development

Comments

@ztnel
Copy link
Contributor

ztnel commented Feb 4, 2024

Description

The raptor firmware must provide built-in load cell autocalibration capability. The autocalibration sequence must be interactive since it requires instruction for Taring (removing weight) and calculating scaling factor (Adding calibrated weight)
. The system will use LEDs to instruct the user to perform the next action:

  1. Before autocalibration starts remove all weights from load cell
  2. Calibration offset stage - Red LED calculating Offset (Tare)
  3. Calibration gain stage - Orange LED add calibrated weight (1Kg)
  4. Calibration complete - Green LED remove weight

Load cell calibration follows the linear formula:

$$ W=(V_{ADC}-V_{offset})*A $$

Where:
W - measured weight
Vadc - ADC raw
Voffset - Tared offset
A - Gain (scaling factor)

The firmware will need the following function for performing autocalibration:

hx711_status_t hx711_autocalibration(hx711_setttings_t *settings, uint16_timeout_ms);

It will be responsible for populating the gain and offset parameters as part of the settings struct. The autocalibration procedure should use a settling algorithm using a windowed buffer and perform noise rejection to calibrate a value close to the mean. The timeout will specify a maximum time frame to wait for calibration to complete.

The HX711 driver will need permissions to use the status LEDs on the Nucleo (LED1,2,3) to perform the calibration feedback to the user.

@ztnel ztnel added firmware embedded software development driver Firmware driver labels Feb 4, 2024
@ztnel ztnel self-assigned this Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver Firmware driver firmware embedded software development
Projects
None yet
Development

No branches or pull requests

1 participant