docs: Add how to configure LIS2DW instructions

Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
This commit is contained in:
bigtreetech 2023-08-07 15:58:48 +08:00 committed by KevinOConnor
parent ec1dcf3bd2
commit 073665cebb
2 changed files with 45 additions and 4 deletions

View File

@ -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

View File

@ -1,11 +1,11 @@
# 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.
@ -13,7 +13,7 @@ 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
@ -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