Skip to content

Use ADXL345 with Fysetc Portable Input Shaper

You can use Fysetc Portable Input Shaper with FLSUN Speeder Pad for measuring Resonances via USB.

Requirements

  • Fysetc Portable Input Shaper accelerometer available: Here
  • USB-A/Male to USB-C/Male Cable

Note: You can cut the yellow edges to reduce the width

Capture d’écran 2022-10-27 à 21 40 08

Dependencies

Some dependencies are required to use this accelerometer, install them with this following commands (one at a time):

sudo apt update
sudo 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

Compile

It's also necessary to compile firmware for Fysetc Portable Input Shaper, enter the following commands (one at a time):

cd ~/klipper/
make menuconfig

Select these settings:

Capture d’écran 2022-12-12 à 03 17 31

Then on your keyboard press the Q key then Y to save configuration.

Enter the following commands to compile firmware (one at a time):

make clean
make

Flash

Plug Portable Input Shaper into one of the Speeder Pad's USB ports while holding down the button.

Type this commands to flash firmware (one at a time):

cd ~
sudo mount /dev/sda1 /mnt
sudo cp /home/pi/klipper/out/klipper.uf2 /mnt/
sudo umount /mnt

Config

And now, type this command to retrieve the serial:

ls /dev/serial/by-id/*

You should see 2 serials appear, that of the Fysetc Portable Input Shaper is the one with the mention Klipper_rp2040:

Capture d’écran 2022-09-03 à 18 48 39

Go to your Mainsail Web interface then click on Machine tab.

Open adxl345_fysetc.cfg file and edit following line with serial you have just obtained:

serial: /dev/serial/by-id/usb-Klipper_rp2040_E6605481DB318D34-if00

Click on SAVE & RESTART at the top right to save the file.

Then uncomment (remove the #) to the following line in the printer.cfg file to enable ADXL support:

[include adxl345_fysetc.cfg]

Click on SAVE & RESTART at the top right to save the file.

You should see the PIS MCU connecting to Klipper.

Test

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

Run

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, see here: https://www.klipper3d.org/Measuring_Resonances.html

Note: After tests, it's better to disable the ADXL by commenting out the [include adxl345_fysetc.cfg] line again.