forked from Klipper3d/klipper
-
Notifications
You must be signed in to change notification settings - Fork 6
/
printer-makerbot-replicator2-2012.cfg
255 lines (226 loc) · 6.22 KB
/
printer-makerbot-replicator2-2012.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# This file contains common pin mappings for the Makerbot
# Mightyboard. To use this config, the firmware should be compiled for
# the Atmel atmega1280, 16mhz, uart0
# See docs/Config_Reference.md for a description of parameters.
[stepper_x]
step_pin: PD6
dir_pin: !PD7
enable_pin: !PD4
microsteps: 16
rotation_distance: 36
endstop_pin: ^!PC7
position_endstop: 300
position_min: 0
position_max: 300
homing_speed: 50
[stepper_y]
step_pin: PL5
dir_pin: !PL7
enable_pin: !PL4
microsteps: 16
rotation_distance: 36
endstop_pin: ^!PC6
position_endstop: 150
position_min: 0
position_max: 150
homing_speed: 50
[stepper_z]
step_pin: PL1
dir_pin: !PL2
enable_pin: !PL0
microsteps: 16
rotation_distance: 8
endstop_pin: !PC5
position_endstop: 0
position_max: 165
position_min: 0
[ads1118]
sensor_pin: PE6
spi_software_miso_pin: PE7
spi_software_sclk_pin: PE2
spi_software_mosi_pin: PH2
[extruder]
step_pin: PA3
dir_pin: !PA2
enable_pin: !PA5
microsteps: 16
rotation_distance: 33.0168
nozzle_diameter: 0.400
filament_diameter: 1.750
heater_pin: PE5
sensor_type: ads1118_typek
sensor_pin: ads1118:pin_0
min_temp: 0
max_temp: 260
control: pid
pid_kp: 27.746
pid_ki: 1.666
pid_kd: 115.493
[bed_screws]
screw1: 150, 141
screw2: 101, 3
screw3: 197, 3
[heater_fan extruder_fan]
pin: PH4
heater: extruder
[fan]
pin: PG5
[heater_bed]
heater_pin: PH5
sensor_type: Generic 3950
sensor_pin: PF3
control: pid
pid_Kp: 70.037
pid_Ki: 1.710
pid_Kd: 717.000
min_temp: -250
max_temp: 250
[mcu]
serial: /dev/serial/by-id/usb-MakerBot_Industries_The_Replicator_A413936383135181D010-if00
restart_method: mightyboard
baud: 250000
[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 5
max_z_accel: 100
# Makerbot firmware sets x, y, a and b to 118 and z to 40 via eeprom defaults. Their software
# sets x, y, a and b to 20 while preheating and then to 127 for printing (via G130). This
# was done to reduce power when preheating and prevent the motors from overheating when in a
# stationary holding position. This needs to be set in the print start macro using the G130 command.
# An example can be seen in the PRINT_START macro below.
[mcp4018 x_axis_pot]
scl_pin: PA6
sda_pin: PD5
wiper: 1.0
scale: 1.0
[mcp4018 y_axis_pot]
scl_pin: PA6
sda_pin: PL6
wiper: 1.0
scale: 1.0
[mcp4018 z_axis_pot]
scl_pin: PA6
sda_pin: PL3
wiper: 0.315
scale: 1.0
[mcp4018 a_axis_pot]
scl_pin: PA6
sda_pin: PA4
wiper: 1.0
scale: 1.0
[mcp4018 b_axis_pot]
scl_pin: PA6
sda_pin: PJ7
wiper: 1.0
scale: 1.0
[display]
lcd_type: hd44780_spi
spi_software_mosi_pin: PC0
spi_software_sclk_pin: PC1
#miso not used, dummy pin
#spi_software_miso_pin: PC4
latch_pin: PC3
click_pin: PG2
back_pin: PJ6,PJ3
up_pin: PJ5
down_pin: PJ4
[output_pin lcd_power]
pin: PA7
[output_pin lcd_led1]
pin: PC2
value: 1
[pca9632 led]
color_order: BGRW
initial_BLUE: 1.0
initial_GREEN: 0.0
initial_RED: 0.0
[output_pin BEEPER_pin]
pin: PH3
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1000
[gcode_macro M300]
gcode:
{% set S = params.S|default(1000)|int %}
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE=0.5 CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
[gcode_macro START_PRINT]
gcode:
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Use absolute coordinates
G90
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Lower Stepper Vrefs while heating
G130 X20 Y20 Z20 A20 B20
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
# Set Default Stepper Vrefs
G130 X127 Y127 Z40 A127 B127
# Move the nozzle very close to the bed
G1 Z0.3 F300
[gcode_macro END_PRINT]
gcode:
# Turn off extruder, and fan
M104 S0
M106 S0
# Move nozzle away from print while retracting
G91
G1 X-2 Y-2 E-3 F300
# Raise nozzle by 10mm
G1 Z10 F3000
G90
# Disable steppers
M84
######################################################################
# G130: Set digital potentiometer value
######################################################################
# The macro below uses the MCP4018 SET_DIGIPOT command to implement
# a `G130` as used on classic Mightyboard-based printers such as
# The Makerbot Replicator 2/2X.
#
# The `G130` command can be used to lower the stepper current
# during preheating and raise the current again prior to starting
# the print. This is necessary for printers with smaller power
# supplies that needed all the power to heat the bed.
#
# This macro requires one or more [mcp4018] configuration sections:
# (x_axis_pot, y_axis_pot, z_axis_pot, a_axis_pot, b_axis_pot)
#
# Example: G130 X20 Y20 Z20 A20 B20 ; Lower stepper Vrefs while heating
[gcode_macro G130]
gcode:
M400
{% if ('X' in params) and ('mcp4018 x_axis_pot' in printer.configfile.config) %}
{% set x_value = params['X']|float %}
{% set x_axis_pot_scale = printer.configfile.config["mcp4018 x_axis_pot"].scale|float %}
SET_DIGIPOT DIGIPOT=x_axis_pot WIPER={ x_axis_pot_scale * (x_value / 127.0)}
{% endif %}
{% if ('Y' in params) and ('mcp4018 y_axis_pot' in printer.configfile.config) %}
{% set y_value = params['Y']|float %}
{% set y_axis_pot_scale = printer.configfile.config["mcp4018 y_axis_pot"].scale|float %}
SET_DIGIPOT DIGIPOT=y_axis_pot WIPER={ y_axis_pot_scale * (y_value / 127.0)}
{% endif %}
{% if ('Z' in params) and ('mcp4018 z_axis_pot' in printer.configfile.config) %}
{% set z_value = params['Z']|float %}
{% set z_axis_pot_scale = printer.configfile.config["mcp4018 z_axis_pot"].scale|float %}
SET_DIGIPOT DIGIPOT=z_axis_pot WIPER={ z_axis_pot_scale * (z_value / 127.0)}
{% endif %}
{% if ('A' in params) and ('mcp4018 a_axis_pot' in printer.configfile.config) %}
{% set a_value = params['A']|float %}
{% set a_axis_pot_scale = printer.configfile.config["mcp4018 a_axis_pot"].scale|float %}
SET_DIGIPOT DIGIPOT=a_axis_pot WIPER={ a_axis_pot_scale * (a_value / 127.0)}
{% endif %}
{% if ('B' in params) and ('mcp4018 b_axis_pot' in printer.configfile.config) %}
{% set b_value = params['B']|float %}
{% set b_axis_pot_scale = printer.configfile.config["mcp4018 b_axis_pot"].scale|float %}
SET_DIGIPOT DIGIPOT=b_axis_pot WIPER={ b_axis_pot_scale * (b_value / 127.0)}
{% endif %}