ADXL345 Raspberry pi4 multi SPI

i have no error anymore if in klipper i change in printer.cfg the spi buslike this:

[adxl345 hotend]

hotend spi5

cs_pin: rpi:None
spi_bus: spidev5.0

[adxl345 bed]

bed spi6

cs_pin: rpi:None
spi_bus: spidev6.0

That’s the right way to do it. The symlinks were a work around. The update @koconnor mentioned on 9/15 removed the need for them. You don’t need symlinks, and you should reference spi 5 & 6 devices directly.

1 Like

Thank you, I’ve got it working

1 Like

Hello i have been trying to follow you guys but i keep getting
Send: ACCELEROMETER_QUERY
Recv: !! Failed to set ADXL345 register [0x2d] to 0x0: got 0xff. This is generally indicative of connection problems (e.g. faulty wiring) or a faulty adxl345 chip.

[adxl345]
cs_pin: rpi:None
spi_bus: spidev3.0

[resonance_tester]
accel_chip: adxl345
probe_points:
100,100,20 # an example

and
in my rpi4 config file i use
dtparam=spi=off
dtoverlay=spi3-1cs
since i get pi@octopi:~ $ ls -l /dev/spidev*
crw-rw---- 1 root spi 153, 0 Dec 29 19:52 /dev/spidev3.0
have any other had this issue
my wiring is like this
image

The ADXL is known to be very susceptible to the connection cable:

okay because i have the same problem when trying to do it on RPI3b

Right now I’m using 10 cm of cable

what board do you use ?

Not the best colors but tried to reproduce your setup or close to it before running it myself.

@koconnor happy to send the fritzing if you want it.

Thanks for the thread.

Cheers
Manu

1 Like

Thanks got i working using another cable and the wiring shown above by Manu :slight_smile:

because the bed has two moving parts independent so we need one for the printer head and one for the bed.

Hi @Semsam

I understand that you have this working with rp3b what changes di you made aside from below:

did you use this:

or did you use spidev5.0 and 6.0 ?

Will this also work for a RPI3b?

Yes, the Pi’s pin headers are compatible

hmm, I tied, but can’t activate spidev5.0 and spidev6.0 on my rpi3.

However do they have to be connected this way? From my understanding I should be able to connect two ADXL by connecting everything in parralel except for the CS Pin of the second ADXL which would go to GPIO 7 (SPI_CE1) on the rpi (marked in violet).

[adxl345 hotend]
cs_pin: rpi:None
spi_bus: spidev0.0

[adxl345 bed]
cs_pin: rpi:None
spi_bus: spidev0.1

[resonance_tester]
# Assuming the typical setup of the bed slinger printer
accel_chip_x: adxl345 hotend
accel_chip_y: adxl345 bed
probe_points:
    90, 90, 20  # an example

I tried it this way and get readings from both sensor but I’m not a 100% sure if this will give correct readings. Can someone config this to be correct?

Well, if you get readings and no error messages, I’d assume it is working.
Just simply compare a run with only one sensor to one where you have both connected. If they line up, then it is safe to assume that it is working.

1 Like

Hello, I am more than new to this; I have been searching the internet if there is any way to connect 2 ADXL345 to CB1 in a Mantae3EZ and I have not found anything. Can you? As I said, I am more than a novice and uneducated in this field, if possible, a diagram could be made with the wiring and the settings to be established. Thanks in advance. Best regards.