Accelerometer Usage
-
@diy-o-sphere Ok it now it works,
Accelerometer 0:0 with orientation 20 samples at 1344Hz with 10-bit resolution
It worked until i tried to run a test. Then DWC timed out, and now im getting no connection anymore. Same wiring. Really weird.
-
@staticred said in Accelerometer Usage:
@diy-o-sphere Ok it now it works,
Accelerometer 0:0 with orientation 20 samples at 1344Hz with 10-bit resolution
It worked until i tried to run a test. Then DWC timed out, and now im getting no connection anymore. Same wiring. Really weird.
That suggests that something is wrong with the interrupt input. Check the connection between INT0 on the LIS3DH and io0.in, and perhaps try using a different IO port.
-
@dc42 Nope no chance. I wired it to io1. Same thing. I tested all connections with a multimeter and they work. But sadly my board cant build up a connection to the accelerometer. Is there something like a debug mode, which may teaches me more about what exactly the problem is?
-
@staticred seems like it still did record some data at some point.
But it does not make sense that that is the z axis. Because the board is mounted flat on the toolhead. Really strange
-
@staticred I will re-test accelerometer with Duet 3 Mini later today or tomorrow.
What did the raw data look like, before you clicked Analyse?
-
@dc42 Thank you alot!
This is what the raw data looked like -
@staticred the raw data looks OK except for the spikes and drops, assuming that you collected that data while the machine was stationary. My guess is that those spikes/drops were where the firmware was unable to extract the data from the accelerometer fast enough. You can check this by looking at the end of the .csv file to see if there is a message about this. I think the DWC accelerometer plugin may report it too. See the notes at https://duet3d.dozuki.com/Wiki/Accelerometers#Section_Retrieving_the_data to see what you can do about it; or just try re-running it a few times to see if you can get a clean run.
The analysis isn't valid if the data contains dropouts. To get a useful analysis you need to do a suitable move while the data is being collected as described at https://duet3d.dozuki.com/Wiki/Accelerometers#Section_Using_accelerometers.
-
@staticred I just connected a LIS3DH board to my Duet 3 Mini5+ WiFi and it is working as expected. I used connector IO2 to connect the CS and INT lines.
-
@dc42 thank you for all the infos. I will tomorrow (after upgrading to my new orbiter extruder) solder all the wires to the lis3DH and also make proper connections. Maybe just a faulty cable caused it.
-
For anyone having problems getting an SPI-connected accelerometer to work:
I have found that capacitive coupling between the SDO and CS signals in the cable can cause a glitch on CS when the accelerometer replied to a read register request, and this glitch stops the accelerometer sending any more data. This is especially likely if those two signals, which use adjacent pins on the Adafruit LIS3DH board, use adjacent conductors in a flat cable. I was able to work around this by putting a 1K resistor in series with SDO at the accelerometer end of the cable.
-
I'm having an issue with the connection. I used a CAT7 ethernet cable but nothing works. Every time I try to launch the command, the accelerator is not found. Any suggest about which cable I should use? Thankt you.
-
@ducati87 I use a USB3 cable and have no problems since then
https://forum.duet3d.com/topic/22878/software-package-3-3beta3-released/68?_=1624809172098 -
@siam Thank you Slam, I will try it
-
@ducati87 said in Accelerometer Usage:
I'm having an issue with the connection. I used a CAT7 ethernet cable but nothing works. Every time I try to launch the command, the accelerator is not found. Any suggest about which cable I should use? Thankt you.
See my reply immediately before your post.
-
@dc42 what do you mean for "in series with SDO at the accelerometer end of the cable"?
-
@ducati87 I mean connect the resistor between the SDO pin of the accelerometer board and the wire that goes to MISO on the Duet, instead of connecting the wire directly to the SDO pin.
-
@dc42 perfect thank you!
-
@dc42 i will definetly try that out. I had firstly swap my board because of that early production process. While doing that i also swapped my z axis, now need to reconfigure than, and then can test the lis3dh again.
-
@dc42 said in Accelerometer Usage:
@ducati87 I mean connect the resistor between the SDO pin of the accelerometer board and the wire that goes to MISO on the Duet, instead of connecting the wire directly to the SDO pin.
in spite of the 1K resistor, the accelerometer is not found. I checked the cable on my duet daughter board and everything seems to be ok. Any suggest? Thank you.
-
@ducati87 thanks for trying. I've no more suggestion yet, but I will get back to this when I have time. What sort of cable are you using, and how long is it? Photos of the two ends please.