Measure resonances with FLSUN ADXL - Guilouz/Klipper-Flsun-Speeder-Pad GitHub Wiki
You can use FLSUN ADXL with FLSUN Speeder Pad for measuring Resonances via USB.
Needed:
- FLSUN ADXL
- USB cable
-
Some dependencies are required to use this accelerometer, install them with this following commands (one at a time):
sudo apt updatesudo apt install python3-numpy python3-matplotlib libatlas-base-dev -
Followed by this command to install Numpy in Klipper's environment:
~/klippy-env/bin/pip install -v numpy -
If you have an error when installing Numpy, follow this steps, if not continue:
Show / Hide
- Enter the following commands (one at a time):
sudo apt updatesudo apt full-upgrade -ysudo apt install --reinstall python2* -ysudo service klipper stopcd ~ && mv klippy-env klippy-env.bakcd ~ && virtualenv -p python2 klippy-envcd ~/klippy-envbin/pip install -r ../klipper/scripts/klippy-requirements.txt~/klippy-env/bin/pip install -v numpysudo service klipper start - Numpy should install correctly.
- Enter the following commands (one at a time):
-
When it's done, plug FLSUN ADXL into one of the Speeder Pad's USB ports.
-
Then, type this command to retrieve the serial:
ls /dev/serial/by-id/* -
You should see 2 serials appear, one is your printer serial an other is the FLSUN ADXL, the one with the mention
Klipper_stm32f103xe:
-
Go to your Mainsail Web interface then click on
Machinetab. -
Open
adxl345_flsun.cfgfile and edit following line with serial you have just obtained:serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_A83331333634120136343231-if00 -
Click on
SAVE & RESTARTat the top right to save the file. -
Then uncomment (remove the #) to the following line in the
printer.cfgfile to enable ADXL support:[include adxl345_flsun.cfg] -
Click on
SAVE & RESTARTat the top right to save the file. -
You should see the
mcu adxlconnecting to Klipper. -
You can test accelerometer by entering this command:
ACCELEROMETER_QUERY -
Something like this must be returned:
accelerometer values (x, y, z): 5551.544565, 7048.078582, -1924.535449 -
Enter this command to measure the noise of the accelerometer for each axis:
MEASURE_AXES_NOISE -
You should get some baseline numbers for the noise of accelerometer on the axes (should be somewhere in the range of ~1-100). Too high axes noise (e.g. 1000 and more) can be indicative of the sensor issues, problems with its power, or too noisy imbalanced fans.
-
To measure the resonances on X axis run
ADXL_AXE_Xmacro. -
To measure the resonances on Y axis run
ADXL_AXE_Ymacro.
โ If you encounter an error while measuring the resonances. Replace microsteps to 16 in printer.cfg file just for the duration of the test.
Note: After tests, it's better to disable the ADXL by commenting out the [include adxl345_pico.cfg] line again.
See more documentation here: Measuring Resonances | Klipper
