|
| 1 | +# Load Cells |
| 2 | + |
| 3 | +This document describes Klipper's support for load cells. Basic load cell |
| 4 | +functionality can be used to read force data and to weigh things like filament. |
| 5 | +A calibrated force sensor is an important part of a load cell based probe. |
| 6 | + |
| 7 | +## Related Documentation |
| 8 | + |
| 9 | +* [load_cell Config Reference](Config_Reference.md#load_cell) |
| 10 | +* [load_cell G-Code Commands](G-Codes.md#load_cell) |
| 11 | +* [load_cell Status Reference](Status_Reference.md#load_cell) |
| 12 | + |
| 13 | +## Using `LOAD_CELL_DIAGNOSTIC` |
| 14 | + |
| 15 | +When you first connect a load cell its good practice to check for issues by |
| 16 | +running `LOAD_CELL_DIAGNOSTIC`. This tool collects 10 seconds of data from the |
| 17 | +load cell and resport statistics: |
| 18 | + |
| 19 | +``` |
| 20 | +$ LOAD_CELL_DIAGNOSTIC |
| 21 | +// Collecting load cell data for 10 seconds... |
| 22 | +// Samples Collected: 3211 |
| 23 | +// Measured samples per second: 332.0 |
| 24 | +// Good samples: 3211, Saturated samples: 0, Unique values: 900 |
| 25 | +// Sample range: [4.01% to 4.02%] |
| 26 | +// Sample range / sensor capacity: 0.00524% |
| 27 | +``` |
| 28 | + |
| 29 | +Things you can check with this data: |
| 30 | +* The configured sample rate of the sensor should be close to the 'Measured |
| 31 | +samples per second' value. If it is not you may have a configuration or wiring |
| 32 | +issue. |
| 33 | +* 'Saturated samples' should be 0. If you have saturated samples it means the |
| 34 | +load sell is seeing more force than it can measure. |
| 35 | +* 'Unique values' should be a large percentage of the 'Samples |
| 36 | +Collected' value. If 'Unique values' is 1 it is very likely a wiring issue. |
| 37 | +* Tap or push on the sensor while `LOAD_CELL_DIAGNOSTIC` runs. If |
| 38 | +things are working correctly ths should increase the 'Sample range'. |
| 39 | + |
| 40 | +## Calibrating a Load Cell |
| 41 | + |
| 42 | +Load cells are calibrated using the `LOAD_CELL_CALIBRATE` command. This is an |
| 43 | +interactive calibration utility that walks you though a 3 step process: |
| 44 | +1. First use the `TARE` command to establish the zero force value. This is the |
| 45 | +`reference_tare_counts` config value. |
| 46 | +2. Next you apply a known load or force to the load cell and run the |
| 47 | +`CALIBRATE GRAMS=nnn` command. From this the `counts_per_gram` value is |
| 48 | +calculated. See [the next section](#applying-a-known-force-or-load) for some |
| 49 | +suggestions on how to do this. |
| 50 | +3. Finally, use the `ACCEPT` command to save the results. |
| 51 | + |
| 52 | +You can cancel the calibration process at any time with `ABORT`. |
| 53 | + |
| 54 | +### Applying a Known Force or Load |
| 55 | + |
| 56 | +The `CALIBRATE GRAMS=nnn` step can be accomplished in a number of ways. If your |
| 57 | +load cell is under a platform like a bed or filament holder it might be easiest |
| 58 | +to put a known mass on the platform. E.g. you could use a couple of 1KG filament |
| 59 | +spools. |
| 60 | + |
| 61 | +If your load cell is in the printer's toolhead a different approach is easier. |
| 62 | +Put a digital scale on the printers bed and gently lower the toolhead onto the |
| 63 | +scale (or raise the bed into the toolhead if your bed moves). You may be able to |
| 64 | +do this using the `FORCE_MOVE` command. But more likely you will have to |
| 65 | +manually moving the z axis with the motors off until the toolhead presses on the |
| 66 | +scale. |
| 67 | + |
| 68 | +A good calibration force would ideally be a large percentage of the load cell's |
| 69 | +rated capacity. E.g. if you have a 5Kg load cell you would ideally calibrate it |
| 70 | +with a 5kg mass. This might work well with under-bed sensors that have to |
| 71 | +support a lot of weight. For toolhead probes this may not be a load that your |
| 72 | +printer bed or toolhead can tolerate without damage. Do try to use at least 1Kg |
| 73 | +of force, most printers should tolerate this without issue. |
| 74 | + |
| 75 | +When calibrating make careful note of the values reported: |
| 76 | +``` |
| 77 | +$ CALIBRATE GRAMS=555 |
| 78 | +// Calibration value: -2.78% (-59803108), Counts/gram: 73039.78739, |
| 79 | +Total capacity: +/- 29.14Kg |
| 80 | +``` |
| 81 | +The `Total capacity` should be close to the theoretical rating of the load cell |
| 82 | +based on the sensor's capacity. If it is much larger you could have used a |
| 83 | +higher gain setting in the sensor or a more sensitive load cell. This isn't as |
| 84 | +critical for 32bit and 24bit sensors but is much more critical for low bit width |
| 85 | +sensors. |
| 86 | + |
| 87 | +## Reading Force Data |
| 88 | +Force data can be read with a GCode command: |
| 89 | + |
| 90 | +``` |
| 91 | +LOAD_CELL_READ |
| 92 | +// 10.6g (1.94%) |
| 93 | +``` |
| 94 | + |
| 95 | +Data is also continuously read and can be consumed from the load_cell printer |
| 96 | +object in a macro: |
| 97 | + |
| 98 | +``` |
| 99 | +{% set grams = printer.load_cell.force_g %} |
| 100 | +``` |
| 101 | + |
| 102 | +This provides an average force over the last 1 second, similar to how |
| 103 | +temperature sensors work. |
| 104 | + |
| 105 | +## Taring a Load Cell |
| 106 | +Taring, sometimes called zeroing, sets the current weight reported by the |
| 107 | +load_cell to 0. This is useful for measuring relative to a known weight. e.g. |
| 108 | +when measuring a filament spool, using `LOAD_CELL_TARE` sets the weight to 0. |
| 109 | +Then as filament is printed the load_cell will report the weight of the |
| 110 | +filament used. |
| 111 | + |
| 112 | +``` |
| 113 | +LOAD_CELL_TARE |
| 114 | +// Load cell tare value: 5.32% (445903) |
| 115 | +``` |
| 116 | + |
| 117 | +The current tare value is reported in the printers status and can be read in |
| 118 | +a macro: |
| 119 | + |
| 120 | +``` |
| 121 | +{% set tare_counts = printer.load_cell.tare_counts %} |
| 122 | +``` |
0 commit comments