Skip to main content

ADXL345

Wiring

  • The accelerometer is connected as shown in the following diagram

Reference Configuration

[adxl345]
cs_pin: PB12
spi_bus: spi2 # Hard SPI, choose one of hard SPI or soft SPI. Default is hard SPI
# spi_software_mosi_pin: PB15 # Soft SPI, choose one of hard SPI or soft SPI. Default is hard SPI
# spi_software_miso_pin: PB14
# spi_software_sclk_pin: PB13

[resonance_tester]
accel_chip: adxl345
#accel_chip_y: adxl345 bed
probe_points:
100, 100, 20 # Generally at the center of the heated bed, please modify according to your machine's actual situation

Usage Tutorial

Install Dependency Packages

warning
  • The FLY host machine does not need to execute this, as it already comes with the accelerometer dependency package.
  • Non-FLY host machines must execute this! It is recommended to use SSH tools such as MobaXterm_Personal for operation.
  • Please execute the following commands sequentially to install the dependency packages.

  • Please note that, depending on the CPU performance, it may take a lot of time, up to 10-20 minutes. Please wait patiently until installation is complete. In some cases, if the motherboard's RAM is too low, the installation may fail.

    sudo apt install python3-numpy python3-matplotlib libatlas-base-dev
    ~/klippy-env/bin/pip install matplotlib numpy

Test Accelerometer

  • You need to home first before executing.
  • Execute ACCELEROMETER_QUERY in the console.
  • For multiple accelerometers, specify testing one by using ACCELEROMETER_QUERY CHIP=<ADXL>, where <ADXL> needs to be modified to the corresponding accelerometer name.
  • If there is an error, please check the wiring and configuration.
  • Normal output is shown below:
  • This can then be used for resonance compensation measurement.

Calibrate Accelerometer

  • Home first.
  • Input SHAPER_CALIBRATE in the console, which will start automatic calibration for X and Y.
  • After calibration is completed, execute SAVE_CONFIG to save the data.
  • You can also use SHAPER_CALIBRATE AXIS=X to automatically calibrate one axis.
  • The calibration process may take a long time, so please be patient.
tip

Attention! If the printer vibrates too violently during the test, please press the emergency stop immediately or send M112 to stop.

  • A high accel_per_hz can make the vibration intense; you can appropriately reduce it.

    [resonance_tester]
    accel_per_hz: 50 # Default value is 75
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -
- 3D Mellow -