Connecting a specific Accelerometer to Duet 2 Wifi
-
Hello, I plan on installing this accelerometer to my 3D printer with a Duet 2 Wifi. I was wondering if this specific one would work and if it would be possible to use the in-built temp sensor and if the DSH version is worth it compared to sparkfuns DH, I plan on using it for input shaping. Also, in the docs, a ribbon cable is used, however, I though ribbon cables can really only be used for short distances and I have a Ender 5 Plus (500mm^2) and if there is any way to get around that.
-
Hi TRATOON, I am using a ribbon cable to an Adafruit LIS3DH module with no issues. However, my Duet is in the back upper left corner (as seen from the front) on my Ender 5 Plus.
Total cable length is 85cm. I ran the ribbon cable along the same run as all the other hotend wires.
It works well.
-
@tas Could you post your wiring on both accelerometer and Duet and also what are you using for accelerometer for? Input shaping? If so, do you know if the Duet takes live input from the accelerometer and changes input shaping for each movement, also do you notice a significant improvement in print quality? Also, what is the boards orientation and what is your I value (for input shaping if you are using it, as mentioned here https://docs.duet3d.com/User_manual/Connecting_hardware/Sensors_Accelerometer)
-
@TRATOON Yes I use the accelerometer for input shaping along with the DWC Input Shaping Plugin. Yes the Duet Wifi (standalone, no Pi) takes live input from that during the shaping moves and plots a graph.
The orientation does not matter. As long as you match the 'I' value to the board orientation the results will be the same. I tried two different orientations to check this and got the same graphs.
In my config example below the board was mounted such that the text on the top of the board (with the Adafruit symbol and XYZ marker on it) was the right way up and faced the front of the printer.
Here is the accelerometer section from my config:
;Create Accelerometer: M955 P0 C"spi.cs4+spi.cs3" ;Indicate chip orientation (Z faces -Y (5), X faces + X(0)). M955 P0 I50 S5000 R10 ; S5000 is 5000Hz sample rate. R10 is 10 bit resolution for LIS3DH. ;The first digit specifies which machine direction the Z axis of the accelerometer chip (the top face) ;faces, as follows: 0 = +X, 1 = +Y, 2 = +Z, 4 = -X, 5 = -Y, 6 = -Z. ;The second digit expresses which direction the X axis of the accelerometer chip faces, using the same code ;Using Input Shaping:(Use External PlugIn to collect data) ;Before adding Surface Block Mass at bottom: ;M593 P"mzv" F44.8 S0.1 ; use MZV to avoid rounding corners. 44.8 +/- 0.7 Hz. ;After adding Surface Block mass: M593 P"mzv" F42.0 S0.1 ; use MZV to avoid rounding corners. 42.0 +/- 0.7 Hz.
Here is the wiring: Note: I stripped the CS and ground wires away from the ribbon cable as a pair so they are separate as per the instructions to avoid noise on CS. I tie wrapped these cables to the rest of my hotend wiring.
I used the Temp Daughterboard 10 pin connector on the Duet.Duet2 Wifi --------------> Adafruit LIS3DH
1 SPI_CS2 --------------> N/C
2 GND ------------------> GND
3 SPI_CS1 --------------> N/C
4 SPI_SCK --------------> SCL
5 SPI_MOSI ------------> SDA
6 SPI_MISO ------------> SDO
7 SPI_CS3 --------------> INT
8 +3.3V -----------------> VIN
9 SPI_CS4 --------------> CS
10 N/C ------------------> N/CAgain pins 2 and 9 were split off from the main ribbon cable as a pair to reduce noise. I did not try this without splitting off the two wires so I can't say if that would have worked too. Some people recommend using a shielded USB3 cable instead but that is heavier and stiffer than ribbon cable.
Notice that I added a granite surface block to the bottom of the printer for stability and it changed the frequency significantly. I noted the two values in my config so if I decide to remove the surface block I won't have to re-find the input shaping frequency.
Does it work? Yes it does with a few caveats. Any changes to printer hardware requires the input shaping to be redone. Like adding or removing mass on the printer, tightening or loosening belts, changing motors.
There are also many types of input shaping to experiment with. I arrived at MZV as my best. There are tradeoffs as always.
Does it eliminate VFAs? No. Does it improve walls? Yes but they are still not perfect.
Can you print faster? Yes. Faster, much more acceleration, more jerk. However, I like quality over speed so I reduced my max print speed to 80mm/s. Also there is definitely more wear and tear on the printer components at crazy speeds so I dialed it way back. I am happy with 80mm/s. 60mm/s was my previous fastest speed (for good quality) but I can now print at 80mm/s with better quality than that. Note that you should dial in your input shaping at the speed you will use most.
A LOT of testing is required to dial things in. I used over a kilogram of filament in the end and I would not say I have it perfectly dialed in. I could not get Pressure Advance and input shaping to work well together so I disabled Pressure Advance. If you want to use PA do input shaping first then retune your Pressure Advance from scratch. Honestly I got fed up with all the testing so I didn't bother with PA.
Once you start printing actual parts and not calibration parts you may find even more tweaking is needed.
Is it worth it? YES. A cheap upgrade that makes a big difference in speed and quality. Definitely the best bang for your buck upgrade you can do.
-
@tas Thank you very much.
-
-