Skip to content

Add support for CS1237 ADC driver/loadcell with tap interface for bed probing - #7

Open
pdscomp wants to merge 5 commits into
rpmsg-with-new-hx71xfrom
paul/add-cc2-loadcell
Open

pdscomp wants to merge 5 commits into
rpmsg-with-new-hx71xfrom
paul/add-cc2-loadcell

Conversation

@pdscomp

@pdscomp pdscomp commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Add native CS1237 load-cell support for Elegoo Centauri Carbon 2 via Kalico tap interface.

  • Add CS1237 host and MCU drivers with direct [load_cell] sensor_type: cs1237 support.
  • Support the existing load-cell probe path, configuration readback, and fault reporting.
  • Add documentation plus STM32F405 compile and Klippy smoke coverage.

Testing

  • test/test_cs1237.py + test/test_imports.py — 10 passed
  • STM32F405 firmware build with CONFIG_WANT_CS1237=y
  • Direct CS1237 Klippy smoke test

Notes

Hardware/logic-analyzer validation on CC2 is still needed.

Credit

The CS1237 MCU implementation was adapted from MisterSheikh/Qidi_Q2_Mainline_Klipper (main), then integrated with Kalico's load-cell and probe interfaces based on the work by @jamesturton on the hx711 tap driver for Centauri Carbon 1.

@pdscomp pdscomp self-assigned this Sep 12, 2026
@pdscomp
pdscomp requested a review from jamesturton September 12, 2026 23:58
@pdscomp
pdscomp force-pushed the paul/add-cc2-loadcell branch 2 times, most recently from 6a4f3f5 to 641f0dc Compare September 13, 2026 00:26
Ports sensor_cs1237.c from Qidi_Q2_Mainline_Klipper and implements
a matching cs1237.py host driver following the same LoadCellSensor
tap interface as hx71x.py, making it a drop-in config swap alternative.

CS1237 features: 10/40/640/1280 SPS, four PGA gains (1x/2x/64x/128x),
24-bit signed output, and a half-duplex DRDY/DOUT data line plus SCLK.

Base adaptation for rpmsg-with-new-hx71x: register cs1237 in
klippy/extras/load_cell/__init__.py, this lineage's sensor registry.

Co-authored-by: MisterSheikh (sensor_cs1237.c source)
- Add cs1237 to the sensor_type list and link it to CS1237 Notes
- Document pin naming and the HX711 configuration-swap example
- Document MCU firmware opt-in and automatic DRDY pull-up behavior
Implement the CS1237 MCU wire protocol, including its 46-clock
configuration transaction. The direction-change pulse between the command
and configuration register payload is required; without it the transaction
contains only 45 clocks. Cross-checked against the Qidi CS1237 driver.
@pdscomp
pdscomp force-pushed the paul/add-cc2-loadcell branch from 641f0dc to 303790e Compare September 13, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant