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
Capture dโ€™eฬcran 2023-04-17 aฬ€ 23 10 02
  • 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
    
  • 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 update
      
      sudo apt full-upgrade -y
      
      sudo apt install --reinstall python2* -y
      
      sudo service klipper stop
      
      cd ~ && mv klippy-env klippy-env.bak
      
      cd ~ && virtualenv -p python2 klippy-env
      
      cd ~/klippy-env
      
      bin/pip install -r ../klipper/scripts/klippy-requirements.txt
      
      ~/klippy-env/bin/pip install -v numpy
      
      sudo service klipper start
      
    • Numpy should install correctly.
  • 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 Machine tab.

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

    serial: /dev/serial/by-id/usb-Klipper_stm32f103xe_A83331333634120136343231-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_flsun.cfg]
    
  • Click on SAVE & RESTART at the top right to save the file.

  • You should see the mcu adxl connecting 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_X macro.

  • To measure the resonances on Y axis run ADXL_AXE_Y macro.


โš  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


โš ๏ธ **GitHub.com Fallback** โš ๏ธ