ADXL345 Stops working after being connected for a few seconds

Basic Information:

Printer Model: SOVOL SV06
MCU / Printerboard: Whatever the factory mainbord for the sovolSV06 is + Rpi pico for accelerometer
klippy.log
klippy.log (4.0 MB)

Describe your issue:

I have connected an ADXL 345 to my RPI Pico as shown in the documentation and flashed the firmware with the method showcased in this video https://youtu.be/W_VHbT_tsZw as well as setup klipper (Running on a Touchscreen laptop alongside klipperscreen (Linux mint)) to recognize the Rpi Pico as an MCU and the input for the accelerometer.

When the accelerometer is first connected to the Rpi Pico running ACCELEROMETER_QUERY works returning "accelerometer values (x, y, z): 222.061783, 60368.325242, -2368.659014 " however after just a few seconds of being connected the accelerometer Stops functioning properly and running ACCELEROMETER_QUERY returns “Invalid adxl345 id (got 0 vs e5).”

Things I have already tried:

Testing connections: I used a multi-meter to ensure continuity with all of the wires and checked that there were no shorts
Checked that correct Pull up/down resistors were in place
Accelerometer works correctly: The accelerometer I ordered came in a 2-Pack and both of them share the same behavior.

API Dump Helper start callback error
...
gcode.CommandError: Invalid adxl345 id (got 0 vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
Invalid adxl345 id (got 0 vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
...
TMC 'stepper_z' reports DRV_STATUS: c0170101 otpw=1(OvertempWarning!) t120=1 cs_actual=23 stealth=1 stst=1
...
b'Got EOF when reading from device'
Timeout with MCU 'adxl' (eventtime=10674.997399)
Transition to shutdown state: Lost communication with MCU 'adxl'

You have errors like above in your log. This indicates some hardware issues:

  • Either multiple ones, i.e. the errors are independent OR
  • Consequential ones: One initial error is dragging other components into an error state, which is possible on faulty SPI buses.

See:

and
https://www.klipper3d.org/Measuring_Resonances.html#wiring
and
https://www.klipper3d.org/Measuring_Resonances.html#checking-the-setup
and
https://www.klipper3d.org/TMC_Drivers.html#tmc-reports-error-ot1overtemperror

You run high currents. On Z even 1A. If you do not have high efficient cooling for the drivers, you will get more issues like this:

TMC 'stepper_z' reports DRV_STATUS: c0170101 otpw=1(OvertempWarning!) t120=1 cs_actual=23 stealth=1 stst=1

Also, on every TMC driver you use

sense_resistor = 0.150

Have you special driver boards, changed the resistor or what is the reason?
Usually that value is 110 mOhms. Wrong values cause wrong calculations in the chip, and therefore faulty behaviour.

2 Likes

I downloaded my printer.cfg from a github repo linked in the description of a video about installing klipper on a sovol SV06 so all the values are from that and I asummed they would be correct as I have the exact same printer as shown in the video

Never trust the internet! :wink:
Use such configs as templates but check the respective settings/parameters as you never know how deep the creator of this is wired into this topic.

According to https://github.com/Klipper3d/klipper/blob/master/config/printer-sovol-sv06-2022.cfg the r-sense is indeed 0.15.
Some OEMs do not stick to the “unofficial” conventions.

Looking through the config you linked the resistor and current values i have in my config seem correct.

Still haven’t made any progress on fixing the accelerometer

Other than the links above, I cannot give you any more hints.The ADXL over SPI is very, very, very (did I mention very?) picky about the cable.
I strongly recommend a Cat 6e or higher Ethernet cable connected as described in the above documentation.

1 Like

I will try changing the cable as at the moment I’m using the ribbon cable that came with the sensor.

Connecting the ADXL using an Ethernet cable worked (I didn’t have cat 6e but cat 5e worked)

Thank you to @Sineos and everyone else who helped me with this issue.