Closed DragarX closed 3 weeks ago
Wire length plays a big role in getting this to work. I know this because of countless hours of struggling over the course of many weeks.
Not sure how wire length could come into play, the cable i'm using is shielded with twisted pairs and when I mention it working with "standard Arduino and micropython code" it is using the exact same cable, as well as when using it on my stm32. I'll try connecting it using different cables and a different SPI bus. If you have any other suggestions, let me know.
So I managed to fix the issue by connecting the power line to 5v rather than 3.3v I didn't think the Creality adxl345 was 5v tolerant but this was the only way to get a stable reading.
3:06 PM
accelerometer values (x, y, z): 1258.350101, -8882.471304, 3370.820191
3:06 PM
ACCELEROMETER_QUERY SENSOR=adxl345
3:06 PM
accelerometer values (x, y, z): 1480.411884, -8660.409521, 3753.867940
3:06 PM
ACCELEROMETER_QUERY SENSOR=adxl345
3:05 PM
Klipper state: Disconnect
3:05 PM
FIRMWARE_RESTART
3:00 PM
Klipper state: Shutdown
2:58 PM
Invalid adxl345 id (got 79 vs e5).
2:58 PM
Invalid adxl345 id (got 79 vs e5).
This is generally indicative of connection problems
(e.g. faulty wiring) or a faulty adxl345 chip.
2:58 PM
ACCELEROMETER_QUERY SENSOR=adxl345
2:57 PM
Klipper state: Disconnect
EDIT: I was wrong, this worked for about 2 minutes and then the adxl345 stopped responding entirely.
EDIT2: Using 2 different rp2040-zeros, both of them have busted voltage regulators, I think the cheaper non waveshare clones are not up to the task.
This can be closed. Killed 2 adxl345s trying to get this working. I would still like to figure out what caused the inconsistent readings, but I don't have anymore accelerometers to test.
Really not sure what's causing this, the accelerometer works fine using standard Arduino and micropython code but through klipper this is all i get.
my klipper config
Software SPI was tested and just gave me the standard 0xFF id indicating a bad connection.
I compiled Klipper myself and used your firmware but both give me this issue. Using my stm32 with the same accelerometer gets perfect readings, so I'm not sure why the rp2040-zero is having issues. Any help would be much appreciated.