-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinput_shaper.cfg
88 lines (78 loc) · 4.18 KB
/
input_shaper.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#####################################################################
# ADXL345 Resonance Setup
#####################################################################
[adxl345]
cs_pin: rpi:None
[resonance_tester]
accel_chip: adxl345
probe_points:
125, 125, 20 #approximately center of bed
[input_shaper]
shaper_freq_y: 55.4
shaper_type_y: zv # To avoid too much smoothing with 'zv', suggested max_accel <= 12000 mm/sec^2
shaper_freq_x: 104.8
shaper_type_x: 3hump_ei # To avoid too much smoothing with '3hump_ei', suggested max_accel <= 8000 mm/sec^2
## Input shaper notes
# Y axis
# // Fitted shaper 'zv' frequency = 55.4 Hz (vibrations = 0.6%, smoothing ~= 0.057)
# // To avoid too much smoothing with 'zv', suggested max_accel <= 12000 mm/sec^2
# // Fitted shaper 'mzv' frequency = 57.0 Hz (vibrations = 0.0%, smoothing ~= 0.063)
# // To avoid too much smoothing with 'mzv', suggested max_accel <= 9600 mm/sec^2
# // Fitted shaper 'ei' frequency = 68.0 Hz (vibrations = 0.0%, smoothing ~= 0.070)
# // To avoid too much smoothing with 'ei', suggested max_accel <= 8600 mm/sec^2
# // Fitted shaper '2hump_ei' frequency = 84.4 Hz (vibrations = 0.0%, smoothing ~= 0.076)
# // To avoid too much smoothing with '2hump_ei', suggested max_accel <= 7900 mm/sec^2
# // Fitted shaper '3hump_ei' frequency = 101.0 Hz (vibrations = 0.0%, smoothing ~= 0.080)
# // To avoid too much smoothing with '3hump_ei', suggested max_accel <= 7500 mm/sec^2
# // Recommended shaper is zv @ 55.4 Hz
# X Axis
# // Fitted shaper 'zv' frequency = 46.0 Hz (vibrations = 20.5%, smoothing ~= 0.078)
# // To avoid too much smoothing with 'zv', suggested max_accel <= 8200 mm/sec^2
# // Fitted shaper 'mzv' frequency = 34.4 Hz (vibrations = 2.9%, smoothing ~= 0.172)
# // To avoid too much smoothing with 'mzv', suggested max_accel <= 3500 mm/sec^2
# // Fitted shaper 'ei' frequency = 46.2 Hz (vibrations = 0.9%, smoothing ~= 0.151)
# // To avoid too much smoothing with 'ei', suggested max_accel <= 4000 mm/sec^2
# // Fitted shaper '2hump_ei' frequency = 50.0 Hz (vibrations = 0.0%, smoothing ~= 0.216)
# // To avoid too much smoothing with '2hump_ei', suggested max_accel <= 2800 mm/sec^2
# // Fitted shaper '3hump_ei' frequency = 104.8 Hz (vibrations = 0.0%, smoothing ~= 0.075)
# // To avoid too much smoothing with '3hump_ei', suggested max_accel <= 8000 mm/sec^2
# // Recommended shaper is 3hump_ei @ 104.8 Hz
#####################################################################
# Functions:
# - Generate folder if needed. Default path is IS_FOLDER=~/klipper_config/input_shaper
# - Store a defined number of results for the RESONANCES_TEST. Default is STORE_RESULTS=5
# - generate/store following files for RESONANCES_TEST:
# - resonances_x_YYYYMMDD_HHMMSS.csv
# - resonances_y_YYYYMMDD_HHMMSS.csv
# - resonances_x_YYYYMMDD_HHMMSS.png
# - resonances_y_YYYYMMDD_HHMMSS.png
# - generate/store following files for BELT_TEST:
# - raw_data_belt_a_YYYYMMDD_HHMMSS.csv
# - raw_data_belt_b_YYYYMMDD_HHMMSS.csv
# - resonances_belts_YYYYMMDD_HHMMSS.png
# - remove files from /tmp
#####################################################################
[gcode_shell_command plot_graph]
#command: bash /home/pi/klipper_config/script/plot_graph.sh
command: bash /home/pi/printer_data/config/script/plot_graph.sh
timeout: 60.
verbose: True
[gcode_macro RESONANCES_TEST]
description: Run input shaper test
gcode:
# {% set user = printer["gcode_macro _USERVARIABLE"] %}
_CG28 ; Home if needed
LED_INPUT_SHAPER
TURN_OFF_HEATERS ; Turn off heaters
M107 ; Turn off fans
RESPOND TYPE=command MSG="INPUT SHAPER: Noise values, check if sensor is installed."
MEASURE_AXES_NOISE ; Get noise value
RESPOND TYPE=command MSG="INPUT SHAPER: Resonance Tests starting."
RESPOND TYPE=command MSG="INPUT SHAPER: Measure X axis."
TEST_RESONANCES AXIS=X
RESPOND TYPE=command MSG="INPUT SHAPER: Measure Y axis."
TEST_RESONANCES AXIS=Y
RESPOND TYPE=command MSG="INPUT SHAPER: Resonance tests done."
RESPOND TYPE=command MSG="INPUT SHAPER: Generating graphs."
RUN_SHELL_COMMAND CMD=plot_graph PARAMS=SHAPER
LED_STANDBY