mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-05 04:54:11 -06:00
hx71x: Load Cell Skeleton and HX71x bulk ADC
* Create the load_cell host module skeleton to create the sensors and start taking samples. * Add support for the HX717 and HX711 ADC sensors. Signed-off-by: Gareth Farrington <gareth@waves.ky>
This commit is contained in:
parent
0844388d70
commit
c0095812ff
9 changed files with 534 additions and 1 deletions
|
@ -364,6 +364,21 @@ and might later produce asynchronous messages such as:
|
|||
The "header" field in the initial query response is used to describe
|
||||
the fields found in later "data" responses.
|
||||
|
||||
### hx71x/dump_hx71x
|
||||
|
||||
This endpoint is used to subscribe to raw HX711 and HX717 ADC data.
|
||||
Obtaining these low-level ADC updates may be useful for diagnostic
|
||||
and debugging purposes. Using this endpoint may increase Klipper's
|
||||
system load.
|
||||
|
||||
A request may look like:
|
||||
`{"id": 123, "method":"hx71x/dump_hx71x",
|
||||
"params": {"sensor": "load_cell", "response_template": {}}}`
|
||||
and might return:
|
||||
`{"id": 123,"result":{"header":["time","counts"]}}`
|
||||
and might later produce asynchronous messages such as:
|
||||
`{"params":{"data":[[3292.432935, 562534], [3292.4394937, 5625322]]}}`
|
||||
|
||||
### pause_resume/cancel
|
||||
|
||||
This endpoint is similar to running the "PRINT_CANCEL" G-Code command.
|
||||
|
|
|
@ -4645,6 +4645,63 @@ adc2:
|
|||
# above parameters.
|
||||
```
|
||||
|
||||
## Load Cells
|
||||
|
||||
### [load_cell]
|
||||
Load Cell. Uses an ADC sensor attached to a load cell to create a digital
|
||||
scale.
|
||||
|
||||
```
|
||||
[load_cell]
|
||||
sensor_type:
|
||||
# This must be one of the supported Sensor types, see `Load Cell Sensors`
|
||||
```
|
||||
|
||||
### Load Cell Sensors
|
||||
|
||||
Load Cell supports dedicated Analog to Digital Converter (ADC) chips that sample
|
||||
at a high data rate.
|
||||
|
||||
#### XH711
|
||||
This is a 24 bit low sample rate chip using "bit-bang" communications. It is
|
||||
suitable for filament scales.
|
||||
```
|
||||
sensor_type: hx711
|
||||
sclk_pin:
|
||||
# The pin connected to the HX711 clock line. This parameter must be provided.
|
||||
dout_pin:
|
||||
# The pin connected to the HX711 data output line. This parameter must be
|
||||
# provided.
|
||||
#gain: A-128
|
||||
# Valid values for gain are: A-128, A-64, B-32. The default is A-128.
|
||||
# 'A' denotes the input channel and the number denotes the gain. Only the 3
|
||||
# listed combinations are supported by the chip. Note that changing the gain
|
||||
# setting also selects the channel being read.
|
||||
#sample_rate: 80
|
||||
# Valid values for sample_rate are 80 or 10. The default value is 80.
|
||||
# This must match the wiring of the chip. The sample rate cannot be changed
|
||||
# in software.
|
||||
```
|
||||
|
||||
### HX717
|
||||
This is the 4x higher sample rate version of the HX711, suitable for probing.
|
||||
```
|
||||
sensor_type: hx717
|
||||
sclk_pin:
|
||||
# The pin connected to the HX717 clock line. This parameter must be provided.
|
||||
dout_pin:
|
||||
# The pin connected to the HX717 data output line. This parameter must be
|
||||
# provided.
|
||||
#gain: A-128
|
||||
# Valid values for gain are A-128, B-64, A-64, B-8.
|
||||
# 'A' denotes the input channel and the number denotes the gain setting.
|
||||
# Only the 4 listed combinations are supported by the chip. Note that
|
||||
# changing the gain setting also selects the channel being read.
|
||||
#sample_rate: 320
|
||||
# Valid values for sample_rate are: 10, 20, 80, 320. The default is 320.
|
||||
# This must match the wiring of the chip. The sample rate cannot be changed
|
||||
# in software.
|
||||
```
|
||||
## Board specific hardware support
|
||||
|
||||
### [sx1509]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue