diff --git a/artillery-sidewinder-x2/README.md b/artillery-sidewinder-x2/README.md index a8ded30..aae2e24 100644 --- a/artillery-sidewinder-x2/README.md +++ b/artillery-sidewinder-x2/README.md @@ -5,7 +5,7 @@ 3. [Ultimaker Cura configuration](#ultimaker-cura-configuration) 4. [Octoprint specific configuration](#octoprint-specific-configuration) 5. [Filament set up](#filament-set-up) -6. [Klipper firmware update](#klipper-firmware-update) +6. [Klipper firmware update](#klipper-firmware-update) (Printer & ADXL345 accelorometer) 7. [Resources / Links](#resources--links) # Octoprint backup archive @@ -90,7 +90,8 @@ BED_MESH_OUTPUT | Geeetech | -- | -- | -- | -- | # Klipper firmware update -## Printer preparation +## Printer +### Printer preparation 1. Power off the printer 2. Unplug the electrical wall socket @@ -103,43 +104,43 @@ BED_MESH_OUTPUT 5. Plug the USB cable labelled `UPDATE` to the printer -## Firmware build and update +### Firmware build and update 1. SSH to the ASWX2 Raspberry 2. Stop Klipper service ``` -#> sudo service klipper stop +sudo service klipper stop ``` 3. Browse to Klipper directory: ``` -#> cd ~/klipper +cd ~/klipper ``` 4. Pull the last version of the Klipper firmware from Github: ``` -#> git pull +git pull ``` 5. Clean up working directory before building firmware ``` -#> make clean +make clean ``` 6. Check the firmware build configuration ``` -#> make menuconfig +make menuconfig ``` ![Klipper firmaware build configuration](images/aswx2-klipper-firmware-config.png) 7. Build the firmaware: ``` -#> make +make ``` 8. Check printer's Ruby board is in DFU mode and can be updated ``` -#> lsusb +lsusb ``` ![Ruby board in DFU mode](images/aswx2-ruby-board-DFU-mode-USB.png) @@ -147,22 +148,22 @@ BED_MESH_OUTPUT 10. Flash the new firmware to the printer's Ruby board using the above device ID: ``` -#> make flash FLASH_DEVICE=0483:df11 +make flash FLASH_DEVICE=0483:df11 ``` ![Klipper firmware flash outputs](images/aswx2-klipper-flash-output.png) 11. Restart Klipper service ``` -#> sudo service klipper start +sudo service klipper start ``` 12. Check Klipper service is properly restarted ``` -#> sudo service klipper status +sudo service klipper status ``` ![Klipper service status check](images/awsx2-klipper-service-started.png) -## Switch back printer to operation mode +### Switch back printer to operation mode 1. Unplug the USB cable labelled `UPDATE` from printer 2. Set the top switch to `OPERATION` position \ @@ -172,6 +173,47 @@ BED_MESH_OUTPUT 4. Plug the electrical wall socket +## ADXL345 accelorometer + +### Software prereqiusites +Note that resonance measurements and shaper auto-calibration require additional software dependencies not installed by default. First, run on your Raspberry Pi the following commands: +``` +sudo apt update +sudo apt install python3-numpy python3-matplotlib libatlas-base-dev libopenblas-base +``` + +Details on Klipper [documentation](https://www.klipper3d.org/Measuring_Resonances.html#software-installation) + +### Firmware configuration and build +1. Configure the firmaware: +``` +cd ~/klipper +make clean +make menuconfig +``` +![ADXL345 Firmare config](images/aswx2-adxl345-firmware-config.png) + +2. Build the firmware: +``` +make +``` + +### Firmware flash +1. Set the ADXL345 board in DFU mode by plugin it to the USB cable while maintaining the switch down + +2. Check that the board is actually in DFU mode +``` +lsusb +``` +![ADXL345 board in DFU mode](images/aswx2-adxl345-dfu-mode.png) + +3. Flash the firmware +``` +make flash FLASH_DEVICE=2e8a:0003 +``` + +Once flashed, the board will automatically reboot and goes back in operation mode. + # Resources / Links * [Runout sensor bracket SIDEWINDER X2 by LeLudoLAb - Thingiverse](https://www.thingiverse.com/thing:5027268) diff --git a/artillery-sidewinder-x2/images/aswx2-adxl345-dfu-mode.png b/artillery-sidewinder-x2/images/aswx2-adxl345-dfu-mode.png new file mode 100644 index 0000000..d0477a2 Binary files /dev/null and b/artillery-sidewinder-x2/images/aswx2-adxl345-dfu-mode.png differ diff --git a/artillery-sidewinder-x2/images/aswx2-adxl345-firmware-config.png b/artillery-sidewinder-x2/images/aswx2-adxl345-firmware-config.png new file mode 100644 index 0000000..26260e7 Binary files /dev/null and b/artillery-sidewinder-x2/images/aswx2-adxl345-firmware-config.png differ diff --git a/artillery-sidewinder-x2/klipper-cfg-files/adxl345.cfg b/artillery-sidewinder-x2/klipper-cfg-files/adxl345.cfg new file mode 100644 index 0000000..174bd2c --- /dev/null +++ b/artillery-sidewinder-x2/klipper-cfg-files/adxl345.cfg @@ -0,0 +1,23 @@ +[mcu no_name_adxl] +# Change to whatever you found above. For example, +# usb-Klipper_rp2040_E661640843545B2E-if00 +serial: /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.1:1.0 + + + +[adxl345] +cs_pin: no_name_adxl:gpio9 +spi_software_sclk_pin: no_name_adxl:gpio10 +spi_software_mosi_pin: no_name_adxl:gpio11 +spi_software_miso_pin: no_name_adxl:gpio12 + +axes_map: x,z,y + +[resonance_tester] +accel_chip: adxl345 +probe_points: + # Somewhere slightly above the middle of your print bed + 100,100, 20 + +#[output_pin power_mode] # Improve power stability +#pin: adxl:gpio23 \ No newline at end of file diff --git a/artillery-sidewinder-x2/klipper-cfg-files/printer.cfg b/artillery-sidewinder-x2/klipper-cfg-files/printer.cfg index 80bd25e..2caf284 100644 --- a/artillery-sidewinder-x2/klipper-cfg-files/printer.cfg +++ b/artillery-sidewinder-x2/klipper-cfg-files/printer.cfg @@ -10,6 +10,8 @@ # See more description here: https://blog.freakydu.de/posts/2022-10-01-klipper_with_artillery_sidewinderx2/ # See docs/Config_Reference.md for a description of parameters. +[include adxl345.cfg] + [include macros.cfg] [mcu] @@ -183,6 +185,9 @@ runout_gcode: M117 Filament runout # Optional insert_gcode: M117 Filament insert # Optional switch_pin: PA0 # the z-endstop pin +# Support for M117 gcode (message display) +[display_status] + # Support for gcode arc (G2/G3) commands. [gcode_arcs] #resolution: 1.0