From 055f07c6389fdae1be0ecafbe5b114ab08813fdd Mon Sep 17 00:00:00 2001 From: Gareth Farrington Date: Sun, 2 Jun 2024 22:33:45 -0700 Subject: ads1220: Add ADS1220 bulk sensor to load_cell Add support for the ADS1220 as an alternative to HX71x that supports SPI and higher sample rates. Signed-off-by: Gareth Farrington --- docs/API_Server.md | 15 +++++++++++++++ docs/Config_Reference.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) (limited to 'docs') diff --git a/docs/API_Server.md b/docs/API_Server.md index 36d67b1a..f29bbeba 100644 --- a/docs/API_Server.md +++ b/docs/API_Server.md @@ -379,6 +379,21 @@ and might return: and might later produce asynchronous messages such as: `{"params":{"data":[[3292.432935, 562534], [3292.4394937, 5625322]]}}` +### ads1220/dump_ads1220 + +This endpoint is used to subscribe to raw ADS1220 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":"ads1220/dump_ads1220", +"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. diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 03b10da1..63779df9 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -4702,6 +4702,40 @@ dout_pin: # This must match the wiring of the chip. The sample rate cannot be changed # in software. ``` + +### ADS1220 +The ADS1220 is a 24 bit ADC supporting up to a 2Khz sample rate configurable in +software. +``` +sensor_type: ads1220 +cs_pin: +# The pin connected to the ADS1220 chip select line. This parameter must +# be provided. +#spi_speed: 512000 +# This chip supports 2 speeds: 256000 or 512000. The faster speed is only +# enabled when one of the Turbo sample rates is used. The correct spi_speed +# is selected based on the sample rate. +#spi_bus: +#spi_software_sclk_pin: +#spi_software_mosi_pin: +#spi_software_miso_pin: +# See the "common SPI settings" section for a description of the +# above parameters. +data_ready_pin: +# Pin connected to the ADS1220 data ready line. This parameter must be +# provided. +#gain: 128 +# Valid gain values are 128, 64, 32, 16, 8, 4, 2, 1 +# The default is 128 +#sample_rate: 660 +# This chip supports two ranges of sample rates, Normal and Turbo. In turbo +# mode the chips c internal clock runs twice as fast and the SPI communication +# speed is also doubled. +# Normal sample rates: 20, 45, 90, 175, 330, 600, 1000 +# Turbo sample rates: 40, 90, 180, 350, 660, 1200, 2000 +# The default is 660 +``` + ## Board specific hardware support ### [sx1509] -- cgit v1.2.3-70-g09d2