Skip to content

Commit

Permalink
docs: Add how to configure LIS2DW instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Alan.Ma from BigTreeTech [email protected]
  • Loading branch information
bigtreetech committed Aug 18, 2023
1 parent c160f9e commit 5342689
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
21 changes: 21 additions & 0 deletions docs/Config_Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1646,6 +1646,27 @@ cs_pin:
# measurements.
```

### [lis2dw]

Support for LIS2DW accelerometers.

```
[lis2dw]
cs_pin:
# The SPI enable pin for the sensor. This parameter must be provided.
#spi_speed: 5000000
# The SPI speed (in hz) to use when communicating with the chip.
# The default is 5000000.
#spi_bus:
#spi_software_sclk_pin:
#spi_software_mosi_pin:
#spi_software_miso_pin:
# See the "common SPI settings" section for a description of the
# above parameters.
#axes_map: x, y, z
# See the "adxl345" section for information on this parameter.
```

### [mpu9250]

Support for MPU-9250, MPU-9255, MPU-6515, MPU-6050, and MPU-6500
Expand Down
28 changes: 24 additions & 4 deletions docs/Measuring_Resonances.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Measuring Resonances

Klipper has built-in support for the ADXL345 and MPU-9250 compatible
Klipper has built-in support for the ADXL345, MPU-9250 and LIS2DW compatible
accelerometers which can be used to measure resonance frequencies of the printer
for different axes, and auto-tune [input shapers](Resonance_Compensation.md) to
compensate for resonances. Note that using accelerometers requires some
soldering and crimping. The ADXL345 can be connected to the SPI interface of a
Raspberry Pi or MCU board (it needs to be reasonably fast). The MPU family can
soldering and crimping. The ADXL345/LIS2DW can be connected to the SPI interface
of a Raspberry Pi or MCU board (it needs to be reasonably fast). The MPU family can
be connected to the I2C interface of a Raspberry Pi directly, or to an I2C
interface of an MCU board that supports 400kbit/s *fast mode* in Klipper.

When sourcing accelerometers, be aware that there are a variety of different PCB
board designs and different clones of them. If it is going to be connected to a
5V printer MCU ensure it has a voltage regulator and level shifters.

For ADXL345s, make sure that the board supports SPI mode (a small number of
For ADXL345s/LIS2DWs, make sure that the board supports SPI mode (a small number of
boards appear to be hard-configured for I2C by pulling SDO to GND).

For MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500s there are also a variety of
Expand Down Expand Up @@ -305,6 +305,26 @@ you'll also want to modify your `printer.cfg` file to include this:

Restart Klipper via the `RESTART` command.

#### Configure LIS2DW series

```
[mcu lis]
# Change <mySerial> to whatever you found above. For example,
# usb-Klipper_rp2040_E661640843545B2E-if00
serial: /dev/serial/by-id/usb-Klipper_rp2040_<mySerial>
[lis2dw]
cs_pin: lis:gpio1
spi_bus: spi0a
axes_map: x,z,y
[resonance_tester]
accel_chip: lis2dw
probe_points:
# Somewhere slightly above the middle of your print bed
147,154, 20
```

#### Configure MPU-6000/9000 series With RPi

Make sure the Linux I2C driver is enabled and the baud rate is
Expand Down

0 comments on commit 5342689

Please sign in to comment.