Accelerometer - Failed to collect data, M955 parms ignored
-
I have connected my accelerometer board successfully but can't get a reading from it.
RRF Version: 3.4.1
Boards: Duet2 Wifi, Duex5
Accelerometer: type LIS3DSH 16-bit resolution, SPI frequency 2000000Configured it with
M955 P0 C"duex.cs6+spi.cs4" M955 P0 # Console: M955 P0 C"duex.cs6+spi.cs4" M955 P0 Accelerometer 0 type LIS3DSH with orientation 6 samples at 1600Hz with 16-bit resolution, SPI frequency 2000000
Issue #1: Can't get readings from accelerometer
Connected the CS with a separate wire toduex.cs6
to avoid interference. But when I tried testing it with:G90 G1 X130 G1 X180 G4 S2 M956 P0 S1000 A0 G4 P10 G1 X130 F20000
The resulting CSV is written as:
Sample,X,Y,Z Failed to collect data from accelerometer
Then I tried changing it's configuration to the recommended 10 bit resolution, 1344Hz sampling rate, which led me to the second issue...
Issue #2: The M955 R and S parameters are ignored
M955 P0 C"duex.cs6+spi.cs4" I06 S1344 R10 M955 P0 # Console: # Ignores the S and R new settings M955 P0 C"duex.cs6+spi.cs4" I06 S1344 R10 M955 P0 Accelerometer 0 type LIS3DSH with orientation 6 samples at 1600Hz with 16-bit resolution, SPI frequency 2000000
Then I tried changing the Q parameter and it's accepted:
M955 P0 C"duex.cs6+spi.cs4" I06 S1344 Q1000000 M955 P0 # Console: M955 P0 C"duex.cs6+spi.cs4" I06 S1344 Q1000000 M955 P0 Accelerometer 0 type LIS3DSH with orientation 6 samples at 1600Hz with 16-bit resolution, SPI frequency 1000000
I've already checked every connector for signal continuity and every pin source/destination twice. The cable 2m long sleeve with 10 cables in it.
-
Can you test with a much shorter cable?
-
@phaedrux I'll try that but the current cable length is just long enough for operation. I'll test with a cat5e ethernet cable.
-
Re issue 1, if the accelerometer is detected but doesn't collect data, the problem may be with the INT wire from the accelerometer to the Duet.
Re issue 2, the LIS3DSH doesn't support 1344Hz and it always returns 16-bit data. So the firmware is giving you the closest available configuration to the one you requested. The LIS3DH does support 1344Hz at reduced resolution.
-
Replaced the sleeve cable with a cat5e ethernet one and now it works.
Graph is all over the place but it works.