Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
hello,
I installed on my Voron 2.4r2 the can-bus-system with U2C and SB2240. My Octopus board is connected via USB to the pi4B+. Everything is working fine now except the ADXL sensor. When I try a “accelerometer_query” I get the error: Invalid adxl345 id (got 0 vs e5). Yes, I tried it several times. Normally this results after a bad cable connection but in my case there is no cable and the rest of the bus-systems works fine.
Thanks a lot für your suggestions!
When I try version 1 (spi2) then the error: “pin PB13 is reserved for spi2” occurs.
Version 2 is the standard version with no error but also not working ADXL345.
But with checking all the pin definitions I saw that in the standard-config from BTT the pins for the adxl and the extruder are the same. Is this possible?
Just looking at the Schematics for the SB2240 and cross referencing them to the STM32G0B1 datasheet.
On the schematic, the following pins are defined for the SPI bus:
PB10 - CLK
PB11 - MOSI
PB2 - MISO
PA15 - “EO NSS” (Actually CS)
Which matches in your configuration information.
Now, on the STM32G0B1 datasheet, (the primary use of SPI2) is defined as:
PB13 - CLK
PB15 - MOSI
PB14 - MISO
PB12 - Default CS pin for SPI2 (This is required for the built in bootloader and not required for general operations)
So, it looks like the board designer didn’t get the primary SPI2 pins right for the STM32G0B1 - I’ve worked through this and you need to reference more than just the pin mux table in the datasheet; you need to look at the DFU Guide as well as the Klipper docs. I’ve just spent a half hour going through documents to verify the information here.
To net things out, you can’t use the spi_bus = spi2 command in your config - you have to use the software SPI.
Now, what do you mean when you say “also no working ADXL345”? Going over the schematic, your specification of:
Looks correct - some more information here would be helpful (ie your klippy.log and any error messages that you get).
Yes, the same SPI bus pins (spi_software_sclk_pin, spi_software_mosi_pin & spi_software_miso_pin) will be the same for both the TMC2240 and the ADXL345 - the important difference is that the Chip Select (CS for the ADXL345 and EO-NSS for the TMC2240) pins are different.
Thank you very much, that’s very kind!
I’m very sorry, but I described the problem with the adxl and attached the klippy.log in my first post of this thread:
"hello,
I installed on my Voron 2.4r2 the can-bus-system with U2C and SB2240. My Octopus board is connected via USB to the pi4B+. Everything is working fine now except the ADXL sensor. When I try a “accelerometer_query” I get the error: Invalid adxl345 id (got 0 vs e5). Yes, I tried it several times. Normally this results after a bad cable connection but in my case there is no cable and the rest of the bus-systems works fine.
Yes, everthing works like a charme except the ADXL which never worked.
I had a closer look to the pcb with a magnifiying glass and couldn’t see any damage. Till now I didn’t solder anything but I thougt about changing the chip on the board because I have an old standalone adxl345 board lying around.
Maybe I have to consider that the chip is faulty. But unfortunately the SB2240 is not available at the moment and I’m very satisfied with it. The extruder motor is so silent - you can hardly hear it working…
Sorry, I wish I had something better than to suggest than the ADXL345 chip or its soldering onto the board is bad. It’s the last place I want to be but it looks like you’ve done everything right and if everything else is working correctly…
If you’ve never soldered anything before then the LGA (Land Grid Array) package of the ADXL345BCCZ is not a good place to start.
I don’t know where you’re located but on AliExpress, the “BIQU Store” has 11 of them available at the moment:
If you’re fine spending a bit more, FYSETC sells an ADXL345 built into an RP2040 (called a portable input shaper), which you can plug in with a USB-C to your Klipper host. It has mounting holes for the SB, too.