Skip to main content

ADXL345

Wiring

  • The connection method of the accelerometer is shown in the following figure

Reference Configuration

[adxl345]
cs_pin: PB12
spi_bus: spi2 # hard spi, choose between hard spi and soft spi. Default is hard spi
# spi_software_mosi_pin: PB15 # soft spi, choose between hard spi and 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 # Usually the center of the heated bed, please modify according to the actual situation of your machine

Usage Tutorial

Install Dependencies

warning
  • No need to execute for FLY host computer, as it already comes with the accelerometer dependency package
  • Must execute for non-FLY host computers! It is recommended to operate using SSH tools such as MobaXterm_Personal
  • Please execute the commands below in order to install dependencies

  • Note that depending on the CPU performance, this may take a long time, up to 10-20 minutes. Please wait patiently for the installation to complete. In some cases, installation may fail if the motherboard has too little RAM.

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

Test Accelerometer

  • Homing must be performed before execution
  • Execute ACCELEROMETER_QUERY in the console
  • For multiple accelerometers, you can specify which one to test using ACCELEROMETER_QUERY CHIP=<ADXL>, where <ADXL> should be replaced with the corresponding accelerometer name
  • If an error occurs, please check wiring and configuration
  • A normal output will look like the image below
  • With this, you can proceed with measuring and compensating for resonance

Calibrate Accelerometer

  • Home the printer
  • Enter the command below in the console to begin automatic calibration of X and Y axes
SHAPER_CALIBRATE
  • After calibration completes, run the command below to save the data
SAVE_CONFIG
  • The calibration process might take a while, please be patient
  • If you wish to calibrate only one axis, you may use the command below
SHAPER_CALIBRATE AXIS=X
tip

Note! If the printer vibrates excessively during testing, please press the emergency stop or send M112 to stop immediately

  • Excessively high accel_per_hz can cause strong vibrations, you may appropriately reduce it

    [resonance_tester]
    accel_per_hz: 50 # Default value is 75
Loading...
- 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 -