Problem configuring ADS1220 LOAD_CELL_PROBE

Basic Information:

Printer Model: Custom designed delta printer, loosely similar to FLSUN-V400
MCU / Printerboard: RAMPS 1.4 + ATMega256
Host / SBC: RPi 4
klippy.log: Attached

config-20250910-171723.zip (3.5 KB)

klippy.log (498.8 KB)

Describe your issue:

I’ve built this head with a loadcell embedded in it so I can use the nozzle as a probe. I’m getting some strange behaviours with it:

Once fitted, I can configure the loadcell without any problems. After taring the loadcell, I get accurate measurements for pressure on the nozzle, to within a gram.

But as soon as I energise the steppers, however, I get “Sensor reported xxxx errors while sampling” if I try to tare or read the sensor. However, LOAD_CELL_DIAGNOSTIC does not report any errors and the values all look good.

If I de-energise the steppers, the problem doesn’t go away. I get the same error message for any read or tare operation (making it impossible to calibrate it, too). I have to do a restart (not firmware restart - just Klipper) to clear the error and recover functionality of the probe. Regardless whether I try to read anything from the ADS, I get the same error after a G28 followed by M84.

I tried doing a LOAD_CELL_TEST_TAP without engaging the steppers, and it didn’t pick up the taps at all. It raises an error when the force exceeds the safety tolerance, so it is definitely reading, but it is not picking up the taps. I assumed this was because the steppers weren’t engaged, and that’s when I ran into the sampling error problem.

My initial thoughts were around noise on the 5v line or EMI from the steppers. Here’s what I’ve tried:

  • Unplugged the extruder from the MCU, so it has nothing to drive
  • Made sure the rest of the stepper wires are well out of the way.
  • Checked the AC component of the 5v supply. It is clean.
  • Ensured that the connections are all solid
  • Swapped out the ADC.

Note that even though I get this error on Read or Tare, LOAD_CELL_DIAGNOSTIC returns useful information, even with the steppers energised.

Any thoughts about how I can troubleshoot this? I’m flailing around in the dark.

Thanks

Peter

I’ve made good progress on this. There were all sorts of things wrong: Software instead of hardware spi, low baudrate on the spi, and not enough mcu headroom to drive the steppers and pick up ADC reads at the same time. I’ve pushed up the baudrate to 1M now and lowered the sample rate, and at least I’m able to maintain comms with the ADC, to a degree.

I’ve decided to fit a secondary mcu - a tiny Pi 2040 Zero - on the head itself, since this is very easy to do with Klipper, it seems. This will be a dedicated mcu for the ADC, with a clean hardware interrupt on DRDY and plenty of headroom for the high sample rate and edge detection.

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.