How to connect klipper to Makerbot Replicator 2X?

My Description:

  1. I have a Makerbot Replicator 2X,and it motherboard is Migthyboard RevH (same as RevG)
  2. I check Klipper Config Folder, there is the config file of Mightyboard RevE (using Makerbot Replicator 1 AND Flashforage Replicator Dual) GitHub: Klipper - MightyBoard RevE(mega1280)
  3. I found the Pins Files of these two motherboard pins in GitHub sailfish firmware.(GitHub: Sailfish Firmware)he good news is that they use the same set of pin definitions
  4. When comparing their pins, it seems that the working mode of the temperature sensor is different (Although they use the same type of sensor.

My Question:
Can I Change the Pins to become the Config File of Mightyboard RevH according to the Config File of Mightyboard RevE?

What else should I pay attention to if I want the Klipper firmware to RUN on the Mightyboard RevH?

Welcome to discuss together
Thank you very much!

Thingivers-Makerbot Mightyboard RevE

Makerbot Replicator 2X type K thermocouple is used,and I Find some information on the Klipper Official Web Klipper: MAXxxxxx-temperature-sensors
Maybe it helps me. I’m trying to get the firmware to read the temperature parameters!

I’m working on adding support for the rev g and rev h mightyboards. The display is now supported and I have the LED lights working and am close to having the extruder temp sensor working. Keep an eye on my fork dockterj/klipper: Adding support for MakerBot Replicator 2 (

1 Like

Thank you very much for your reply!I think I have another motivation for klipper to support mithyboard RevH / RevG!

I would also appreciate support for the replicator 2x!

@dockterj I realize I’m bumping an old thread here, but I see a commit in your repo as recent as March 2022. Is this working? Considering Klipperizing my old Rep2X and looking at options.


I’ve got my replicator 2 working. The thermocouple code is not great, and I don’t have a 2x (dual hotend) to test that. It’s been on my list for a couple of weeks to update github. I’ll get that done shortly and would be grateful for some testing help.

hello, I’ve got a replicator 2x, and i’m interested in installing the klipper firmware, is there any update on the topic, can I help in any way?

I have working code (not cleaned up and not ready for review) but it only works for a single hotend. Check out the code in github (dockterj/klipper) and let me know if you need help getting this set up. I do want to clean this up, get the second extruder working, and see if some of this can be pulled.

(post deleted by author)

i’m trying to prepare a config file for the 2X thanks to the reference provided by @henry_Gong plus other scouting work;

looks like that the Replicator 2X have a single chip that probes the temperature from both the type K termocouples, the chip appears to be a Texas Instruments (by the logo on top) with the text
lines are connected to port (label on the board) [pin number]
PE2 (SCK) [4]
PE6 (CS) [8]
PE7 (DO) [9]
PH2 (DIN) [14]

it is definitively not a MAX6675 also because in REV G board there are two 8 pins chip (one for probe)
while in the REVG there is a single 10 pins chip

the chip is A Texas Instrument ADS1118

fortunately there is the name in the source file of the original MakerBot firmware
( see github /makerbot/MightyBoardFirmware/blob/master/firmware/src/MightyBoard/Motherboard/boards/mighty_two/

thanks @Sineos i’ve also seen that @dockterj have already wrote a lot of code in his repo (see github dockterj/klipper/blob/master/src/thermocouple.c)

(post deleted by author)

See How long can a task run?

(post deleted by author)

Hello @dockterj I was able to install your firmware version but i need some help to configure the printer.cfg file for the ADS1118 sensor.
i’ve a Replicator 2X and i would like to perform the test you need.
also i can help in writing some code if necessary, but i need a little bootstrap on Klipper, as i’ve started watching at it just last week.
Please let me know how can i help.

i’ve seen your other posts where you discuss on how to implement the configuration of the ADS1118 sensor in the.cfg file but i’ve not understood which option was picked.
Also is there an idea already on how to configure both the sensor’s channel for the replicator 2X ?

I think you have done an excellent job already, it will be fantastic to have the PR merged.
At the end of the day, the replicator 2x is not that bad, giving it new life will be amazing.

I don’t know why I never checked in the printer.cfg file. I believe the attached file should work but the code in the repo doesn’t support the 2nd hotend. I’m on vacation for a week but will look at this more when I get back. Uncomment the heated bed section and that should work too. Let me know if you find a better sensor (I have a home built HBP so don’t know what sensor is accurate with a stock printer). Let me know if you run into any problems or have questions.

# 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/ for a description of parameters.

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

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

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

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

screw1: 150, 141
screw2: 101, 3
screw3: 197, 3

shaper_freq_x: 44.0
shaper_freq_y: 37.1
shaper_type: mzv

[heater_fan extruder_fan]
pin: PH4
heater: extruder

pin: PG5

#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

serial: /dev/serial/by-id/usb-MakerBot_Industries_The_Replicator_A413936383135181D010-if00
restart_method: stk500v1
baud: 250000

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

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]
    {% 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}

[gcode_macro START_PRINT]
    {% 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
    # Reset the G-Code Z offset (adjust Z offset if needed)
    # Home the printer
    # 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

[gcode_macro END_PRINT]
    # Turn off bed, extruder, and fan
    #M140 S0
    M104 S0
    M106 S0
    # Move nozzle away from print while retracting
    G1 X-2 Y-2 E-3 F300
    # Raise nozzle by 10mm
    G1 Z10 F3000
    # Disable steppers

#*# <---------------------- 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

wow! that’s great. Just a couple of things: from some doc i’ve found on internet seems that the direction pin of the stepper driver for the 2x is not reversed differently from the other replicators. I still have to try this out.
second, it seems that the hot bed temperature is not “read” via a spearate ADC chip but instead directly from an ADC on board on the atmega (PF3). also i still need to try this.
i’m looking at the code to see if i can help with the second channel of the ADS1118

That is correct - the heated bed is temp is read from pf3 (which is in the commented out heater_bed config above) - the only thing that should be looked at is the sensor_type (and obviously the pid tuning).

Please let me know what you find about the direction pin. I haven’t seen anything in the source code for the mightyboard that indicates there is a change from the rep2 to the rep2x, but I’m not 100% sure about that. The above config should work for you for a single hotend and a HBP.

The code above is not what I am running currently - I am working on getting the second channel working (I actually have it working but the code is a mess and needs some cleaning to get it PR worthy). When I am home from vacation I’ll get it checked in.