How to connect klipper to Makerbot Replicator 2X?

Thanks for the reply. I think I got the pin all mapped in my printer.cfg now.

There s another thread with all this info. But i deleted the display part as I struggled with this.

I’m now trying to make a .bin file. But the make menuconfig does not let me choose 64 for my mcu. On that other thread the person said he made it, but I’m not that knowledgeable to achieve this. After I get this .bin file I will try to use the flash system in use by the marlin port for the Dreamer.

Hello! I’m new here, and wanted to say HUGE thanks to @dockterj and others for all the work they have put into getting klipper to work with this printer. I got a Replicator 2X from my last job when they decided it was not worth the trouble to mess with it. I played with it in the past with varied levels of success. I just recently started getting into 3d printing with a P1S and wanted to use the R2X as my fool around printer to really learn about 3d printing. I’ve been upgrading it to make it more consistent (glass bed, extruder fans for pla printing etc) and was looking at a way to use modern slicers to help improve quality and use their features. I was able to get it working pretty well with cura, but I’d really like to use Orca. One way to do that would be to set up a klipper printer. Which brings me here.

Sorry for the book, but I am JUST TODAY starting my journey down the klipper rabbit hole. I have two questions to get me going. I’ll preface this by I’m not a progammer.

Does it matter what Raspberry Pi I use? Is there a recommended one?

And has anyone tried using Orca after setting up klipper?

Once I have the Pi I’ll download all the files and work my way through the setup.

edit Or do I need a Pi or does this get flashed directly to the board on the printer?

Thank you again for everyone’s hard work!

-Josh

So, I got klipper installed on the raspberry pi. I’m just nervous to flash it to the makerbot haha. Is it a “there’s no going back type of thing”?

You can always flash back to the makerbot firmware if you have the file and the makerbot software (I haven’t looked on their website lately to see if those are both still there).

@dockterj: I am trying to convert a Dremel 3D40 to Klipper and found your code for the ADS1118. I did play with it several months ago and cannot remember thought it was working, but now the MCU firmware will always shut down, with a “Thermocouple reader fault”. I have tried with the original thermocouple, no thermocouple and some other K-Type thermocouple (not intended for this printer) and always get this result today. Any ideas ?

I did a bit more testing and I am currently not sure, whether SPI communication on that board works correct or not. All motor drivers tmc5160 and the ADS1118 use the same SPI, just different CS pins. That motherboard only has one Thermocouple connecte to AN0 and AN1. Regardless of what I connect, the result always seems to be constand. However I just tested reading pin_1 instead of pin_0 and that delivers completely different results. Nothing is connected to those pins. Here the output from the klippy log file:

sensor_pin: ads1118:pin_0

Receive: 89 26085.008320 26085.008105 11: seq: 1f, clock clock=397481608

Receive: 90 26085.685095 26085.008105 15: seq: 1f, analog_in_state oid=19 next_clock=467280000 value=13670

Receive: 91 26085.739826 26085.008105 10: seq: 1f, buttons_state oid=25 ack_count=0 state=b’\x01’

Receive: 92 26085.985017 26085.740129 15: seq: 10, analog_in_state oid=19 next_clock=488880000 value=13655

Receive: 93 26085.993371 26085.993108 11: seq: 11, clock clock=468404806

Receive: 94 26086.127821 26085.993108 18: seq: 11, ads1118_result oid=17 next_clock=499680000 adc_mv=32767 cj_temp=788 fault=0

Receive: 95 26086.284953 26085.993108 15: seq: 11, analog_in_state oid=19 next_clock=510480000 value=13662

Receive: 96 26086.427799 26085.993108 18: seq: 11, ads1118_result oid=17 next_clock=521280000 adc_mv=32767 cj_temp=788 fault=0

Receive: 97 26086.585113 26085.993108 15: seq: 11, analog_in_state oid=19 next_clock=532080000 value=13666

Receive: 98 26086.728021 26085.993108 18: seq: 11, ads1118_result oid=17 next_clock=542880000 adc_mv=32767 cj_temp=788 fault=0

Receive: 99 26086.728041 26085.993108 12: seq: 11, shutdown clock=521283118 static_string_id=Thermocouple reader fault

Transition to shutdown state: MCU ‘mcu’ shutdown: Thermocouple reader fault

sensor_pin: ads1118:pin_1

Receive: 89 31319.592822 31319.592615 11: seq: 13, clock clock=396918636

Receive: 90 31320.237472 31319.592615 15: seq: 13, analog_in_state oid=15 next_clock=464400000 value=13663

Receive: 91 31320.292154 31319.592615 10: seq: 13, buttons_state oid=21 ack_count=0 state=b’\x01’

Receive: 92 31320.537285 31320.292653 15: seq: 14, analog_in_state oid=15 next_clock=486000000 value=13666

Receive: 93 31320.577815 31320.577526 11: seq: 15, clock clock=467835132

Receive: 94 31320.690161 31320.577526 17: seq: 15, ads1118_result oid=13 next_clock=497520000 adc_mv=-1698 cj_temp=-942 fault=0

Receive: 95 31320.837340 31320.577526 15: seq: 15, analog_in_state oid=15 next_clock=507600000 value=13674

Receive: 96 31320.990130 31320.577526 17: seq: 15, ads1118_result oid=0 next_clock=519120000 adc_mv=-3770 cj_temp=-942 fault=0

Receive: 97 31321.137423 31320.577526 15: seq: 15, analog_in_state oid=15 next_clock=529200000 value=13664

Receive: 98 31321.290397 31320.577526 17: seq: 15, ads1118_result oid=13 next_clock=540720000 adc_mv=-3746 cj_temp=-942 fault=0

Receive: 99 31321.290427 31320.577526 12: seq: 15, shutdown clock=519123024 static_string_id=Thermocouple reader fault

Transition to shutdown state: MCU ‘mcu’ shutdown: Thermocouple reader fault

Please always attach the complete klippy.log

1 Like

Attached please find the full log. Lowering the SPI speed chaged the value, that is read back. Also, I am not confident, that the SPI communication to the TMC5130 (not 5160 as I wrote before) works. So SPI in general does not seem to be the problem.

klippy.log (68.4 KB)

Kevin, perhaps recent merges from upstream have broken it? I’ll look at spi changes and see if anything obvious stands out.

That fault can come when a thermocouple is disconnnected as well. Can you send me your config and log files?

If the SPI communication to the TMC5130 is not working either then it may be a general SPI issue. What speed did you lower the bus to and what readings did you get? I see several places I can put debugging code in. I will change that and ask you to test again.

I believe by now the steppers work perfectly, so I am almost confident, that SPI communication works fine with the TMC5130.
I did send you my config and log file per email.

Any chance you guys have a “how to get to here” written up?

Just ran across your thread as ive got klipper running on 3 other machines and i realized, hey, wait… dont I also have a makerbot X2 that i … love? (that might be the right word if i strip out all the frustrating moments)…

Anyway, i also like to poke around and break things and would love to contribute if i can…

I have a short video showing how to flash klipper firmware on to a Mightyboard. My board is from a Flashforge Creator Pro.

Instructions are on the readme in my github repo - GitHub - dockterj/klipper: Adding support for MakerBot Replicator 2

Let me know if you need any help.

Is there a way to easily tell if i have the atmega2560 or atmega1280?

FYI, documentation for Mainsail setup has "

Edit src/svr/Makefile and change the line that sets FLASH_DEVICE to point to your mcu (the same /dev/serial/by-id that you changed in printer.cfg). Save your changes."

Specifically: src/svr/Makefile should read: src/avr/Makefile

Ran into the following roadblock:

when trying to flash the makerbot, using stk500v1 i get:
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x84
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xf9
(it fails after 10)

and running with stk500v2 gets me nothing but timeouts.
(im at 57600 baud)

Make sure Klipper isn’t running when trying to flash. The only way I know of to tell what mcu is on the board is to pull the bottom cover and look at the numbers on the chip.