Signed-off-by: Sgr A* VMT <1611902585@qq.com>
This commit is contained in:
Sgr A* VMT
2024-01-30 13:17:40 +00:00
committed by Gitee
parent a2c3d85aae
commit b89a9c576f
3 changed files with 131 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
## CAN Frequency Switching
First, connect to the host computer.
Recompile the firmware for the CAN communication device (U2C or Can Bridge) directly connected to the host computer and set the frequency to 1M to communicate with IDM.
Use the following command to query IDM's UUID:
```bash
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -q
```
Download the required frequency IDM firmware and canboot overlay firmware from the cloud drive.
Execute the following command:
```bash
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <path to canboot update firmware> -u <UUID obtained>
```
For example, `<path to canboot update firmware>` could be ~/Canboot 1M.bin. Fill in your data and remember to remove the `< >` brackets.
Wait for the execution to complete, then enter:
```bash
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <path to new frequency IDM firmware> -u <UUID obtained>
```
For example, `<path to new frequency IDM firmware>` could be ~/IDM_CAN_8kib_offset_1M.bin. Fill in your data and remember to remove the `< >` brackets.
If you want to switch to USB communication, you can flash firmware with the USB label using the same method and solder the mode-setting jumper on the back of IDM to the side with USB.
## If you are currently using USB firmware and want to update or switch to CAN mode:
```bash
cd ~/klipper/scripts
~/klippy-env/bin/python -c 'import flash_usb as u; u.enter_bootloader("<your device serial port address>")'
cd ~
~/klippy-env/bin/python ~/klipper/lib/canboot/flash_can.py -f <firmware path> -d <your device serial port address>
```
The device serial port address refers to the address in the format /dev/serial/by-id/****. Please note that the serial port number for the second time should be different. Re-query it.
Fill in your data and remember to remove the `< >` brackets.

View File

@@ -0,0 +1,9 @@
**Q1: I encountered an "Internal error during connect: IDM model convergence" error. What does it mean, and how can I resolve it?**
**A:** If you encounter this error, it indicates that the Z-offset value is too large. Please set the `model_offset` in the configuration file to 0 and readjust the Z-offset. If you are unable to control the Z-offset to within 1mm, redo the `idm_calibrate` calibration process.
**Q2: I received an error message at the bottom with content similar to the image below. What should I do?**
![error1](/imgs/error1.png)
**A:** If you see this error, it suggests that you need to update the IDM firmware to the latest version available on the provided cloud storage.

View File

@@ -0,0 +1,83 @@
**Optimizing Temperature Compensation Parameters Tutorial**
This tutorial aims to optimize temperature compensation parameters to reduce temperature drift. The optimization process is time-consuming (over 1 hour). If your printer's temperature compensation meets your requirements, this operation may not be necessary.
**Step 1:** Paste the following macro into your configuration file:
```ini
[gcode_macro DATA_SAMPLE]
gcode:
M106 S255
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MAXIMUM=40
M106 S0
G28
G0 Z1
M104 S250
M140 S95
G4 P1000
IDM_STREAM FILENAME=data1
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MINIMUM=70
IDM_STREAM FILENAME=data1
M104 S0
M140 S0
M106 S255
G0 Z80
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MAXIMUM=40
M106 S0
G28 Z0
G0 Z2
M104 S250
M140 S95
G4 P1000
IDM_STREAM FILENAME=data2
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MINIMUM=70
IDM_STREAM FILENAME=data2
M104 S0
M140 S0
M106 S255
G0 Z80
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MAXIMUM=40
M106 S0
G28 Z0
G0 Z3
M104 S250
M140 S95
G4 P1000
IDM_STREAM FILENAME=data3
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MINIMUM=70
IDM_STREAM FILENAME=data3
M104 S0
M140 S0
M106 S255
G0 Z80
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MAXIMUM=40
M106 S0
G28 Z0
G0 Z5
M104 S250
M140 S95
G4 P1000
IDM_STREAM FILENAME=data4
TEMPERATURE_WAIT SENSOR='temperature_sensor IDM_coil' MINIMUM=70
IDM_STREAM FILENAME=data4
M104 S0
M140 S0
```
**Step 2:** Execute the macro. This will generate four files (data1, data2, data3, data4) in the klipper folder. This process takes a long time.
**Step 3:** Move the four generated files to the IDM folder in your user directory.
**Step 4:** Execute the following commands:
```bash
cd ~/IDM
~/klippy-env/bin/python arg_fit.py
```
(Ensure that you are using the latest script package before running. If not, git clone again.)
This will generate three parameters and an image named fit_result.png in the IDM folder. Note that this process requires significant computational power and time.
**Step 5:** Check the fit_result.png image for the fitting result. The first row shows the original data, and the second row shows the data after temperature compensation. Ensure that the fit is effective, and the offsets are controlled within a reasonable range.
**Step 6:** Copy the generated parameters to the [IDM] block in your configuration file. See the example below:
![Example](/imgs/example.jpg)