Skip to content

Instantly share code, notes, and snippets.

@vguttmann
Created April 26, 2023 10:45
Show Gist options
  • Select an option

  • Save vguttmann/72cd93e1f086998e7b1d39cd766592c3 to your computer and use it in GitHub Desktop.

Select an option

Save vguttmann/72cd93e1f086998e7b1d39cd766592c3 to your computer and use it in GitHub Desktop.
makerbot repl 2x cfg
# This file contains common pin mappings for the Makerbot
# Mightyboard. To use this config, the firmware should be compiled for
# the Atmel atmega1280.
# 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
[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
sensor_pin: PE6
spi_software_miso_pin: PE7
spi_software_sclk_pin: PE2
spi_software_mosi_pin: PH2
#control: pid
#pid_Kp: 30.255
#pid_Ki: 1.834
#pid_Kd: 124.801
min_temp: 0
max_temp: 260
pressure_advance = .055
[bed_screws]
screw1: 150, 141
screw2: 101, 3
screw3: 197, 3
[input_shaper]
shaper_freq_x: 44.0
shaper_freq_y: 37.1
shaper_type: mzv
[heater_fan extruder_fan]
pin: PH4
heater: extruder
[fan]
pin: PG5
#[heater_bed]
#heater_pin: PH5
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: PF3
#control: pid
#pid_Kp: 70.037
#pid_Ki: 1.710
#pid_Kd: 717.000
#min_temp: 0
#max_temp: 130
[mcu]
serial: /dev/serial/by-id/usb-MakerBot_Industries_The_Replicator_A413936383135181D010-if00
restart_method: stk500v1
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
# apparently was done to reduce power when preheating and may be a concern for Replicator2X
# with heated bed and dual extruders? Need to see if this functionality is needed and implement
# a command to set the digipots (currently can only be set via printer.cfg)
[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
up_pin: PJ5
down_pin: PJ4
[output_pin lcd_power]
#has to be low for Rep2 low=5v, high=3.3v?
pin: PA7
static_value: 0
[output_pin lcd_led1]
pin: PC2
static_value: 1
[pca9632 led]
color_order: BGR
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 BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(190)|float %}
# Start bed heating
M140 S{BED_TEMP}
# Use absolute coordinates
G90
# Reset the G-Code Z offset (adjust Z offset if needed)
SET_GCODE_OFFSET Z=0.0
# Home the printer
G28
# Move the nozzle near the bed
G1 Z5 F3000
# Move the nozzle very close to the bed
G1 Z0.15 F300
# Wait for bed to reach temperature
#M190 S{BED_TEMP}
# Set and wait for nozzle to reach temperature
M109 S{EXTRUDER_TEMP}
[gcode_macro END_PRINT]
gcode:
# Turn off bed, extruder, and fan
#M140 S0
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
#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 27.746
#*# pid_ki = 1.666
#*# pid_kd = 115.493
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment