Accelerometer Usage
-
@ccs86 it's probably a wiring issue. A few days go I updated the wiring instructions at https://duet3d.dozuki.com/Wiki/Accelerometers#Section_Direct_SPI_connection_to_a_Duet_main_board. The first photo in that section is the 1m long cable that I used successfully to connect the Adafruit board to the Maestro.
You might like to try connecting the accelerometer to the Duet first using short jumper wires. When you have that working, you can try the same connections with a longer cable, taking care to keep the CS wire away from the other signal wires.
-
@dc42 said in Accelerometer Usage:
@ccs86 it's probably a wiring issue. A few days go I updated the wiring instructions at https://duet3d.dozuki.com/Wiki/Accelerometers#Section_Direct_SPI_connection_to_a_Duet_main_board. The first photo in that section is the 1m long cable that I used successfully to connect the Adafruit board to the Maestro.
You might like to try connecting the accelerometer to the Duet first using short jumper wires. When you have that working, you can try the same connections with a longer cable, taking care to keep the CS wire away from the other signal wires.
Could you tell us what wires are considered signal wires?
I can try short jumpers, but I feel very good about my wiring. This was a fresh piece of CAT6 off the spool, all terminals crimped with a proper tool (EDM jaws), and it is the minimum length needed (shorter than 1 m).
Is the 1k resistor still benefiting my setup?
-
is there any reason to use VIN instead of the 3V pin on the LIs3DH module?
-
@tekstyle said in Accelerometer Usage:
is there any reason to use VIN instead of the 3V pin on the LIs3DH module?
Yes, because that is a 3V output.
The V_in pin can take a 3-5V input.
-
All re-wired with short jumpers... same issue.
-
@ccs86 please connect all the jumpers to the appropriate pins on top of the temperature daughter board.
-
@dc42 said in Accelerometer Usage:
@ccs86 please connect all the jumpers to the appropriate pins on top of the temperature daughter board.
I would need that pinout, since it does not match the mainboard pinout.
-
@ccs86 the pilot is the same as on the main board except for TWCK and TWD.
-
@dc42 said in Accelerometer Usage:
@ccs86 the pilot is the same as on the main board except for TWCK and TWD.
@dc42 Do I have this right? The error persists.
-
@ccs86 I'll try that configuration here.
-
@ccs86 this arrangement is working for me, using the following command:
m955 p0 c"twck0+twd0"
I tried without enabling the PT100 channels, and also after enabling both channels. I normally connect the 3.3V wire to the 3.3V pin on the accelerometer, but I tried connecting it to the accelerometer VIN pin to match your setup, and it still works.
-
@dc42 Thank you.
I'm having trouble making out some of your wire colors. Is this correct?
-
@ccs86 yes, the wiring is as you have indicated.
-
@dc42 said in Accelerometer Usage:
@ccs86 yes, the wiring is as you have indicated.
Thanks for sticking with me, I finally got it working! Not sure if it had more to do with connecting to both the main board and the daughterboard, or if I had made an error somewhere.
I am running into quite a few overflow errors now, but don't see the rhyme or reason. Reducing the collection call to one axis and 500 samples still reported overflows. But after adding the S parameter to the M955 command, I got it to log all 3 axis for 1000 samples without an issue. That M955 S parameter behaves differently than I expected:
Sometimes I get overflow errors at 400 Hz, but not at 1344 Hz
-
Also, is there anything I can do to reduce apparent noise in the accelerometer signal? These peaks seem like anomolies. This is with the printer at rest and steppers disabled. The peaks look very periodic.
-
@ccs86 could those peaks be from your fan?
-
About the overflows - I was getting these at first. Turned out the write speed of my SD card was abysmal (0.8MB/s). I got a new SD card and all is good now.
Try running an SD read/write test ( M122 P104 S[file size in MB] ) and get a new card if write speeds are under 1.5MB/s
-
@ajdtreyd said in Accelerometer Usage:
About the overflows - I was getting these at first. Turned out the write speed of my SD card was abysmal (0.8MB/s). I got a new SD card and all is good now.
Try running an SD read/write test ( M122 P104 S[file size in MB] ) and get a new card if write speeds are under 1.5MB/s
Good call!
Not terrible, not amazing:
SD write speed for 5.0Mbyte file was 1.95Mbytes/sec
I'll probably pop a new one in for good measure,
-
@t3p3tony said in Accelerometer Usage:
@ccs86 could those peaks be from your fan?
All fans were off during this test.
Interestingly, every single one of these peaks falls on an even 20 sample interval (#20, #40, #60, #80, #100, #120, etc).
There are a few places (like #320) where the value appears normal.
1330 Hz / 20 = 66.5 Hz. I'm not sure if that frequency coincides with anything computational on the main board.
-
@ccs86
All the time reading about the accel sensorboard, I was worried about feeding the Vin pin with 3.3V.
The sensorboard sure uses an LowDrop voltage regulator, but does it work reliable with such low voltage?
@dc42 uses the 3V (out) pin to feed 3.3V backwards into the board, which makes more sense to me.Maybe worth trying to either feed 5V through Vin or in Davids way and repeat the test.