New firmware (Klipper) on TAZ 6

Look here for custom firmware, networked 3D printer hosts like OctoPrint, and more!
clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

New firmware (Klipper) on TAZ 6

Post by clee » Fri Dec 29, 2017 5:29 pm

Here's something kind of cool: there's a new firmware for 3D printers that moves most of the processing into a host computer (like a Raspberry Pi 3 or ODROID), turning the ATmega2560 or equivalent chip on the RAMBO/RAMPS/etc control board into sort of a dumb minion for reading temperatures and propagating commands to the steppers/heaters/fans/etc.

https://github.com/KevinOConnor/klipper

I submitted this pull request to add TAZ 6 support:

https://github.com/KevinOConnor/klipper/pull/76

It doesn't support using the washers on the corners of the bed to probe for the bed mesh (because I'm pretty sure it doesn't know how to do a bed mesh yet), but it seems to work surprisingly well for me even without that. If anybody else gives this a shot, I'd be curious to hear how it works for you!

Note: You'll need to modify your start-gcode in Cura or whatever slicer you use, because the homing routine is a little more hands-on and doesn't support the G29 command yet. I have sample start and end gcode which I've used myself posted at this github gist: https://gist.github.com/clee/2f87d5180f ... d8667f96af

marcio
Aleph Objects | LulzBot
Posts: 49
Joined: Tue Jul 18, 2017 12:44 pm

Re: New firmware (Klipper) on TAZ 6

Post by marcio » Tue Jan 02, 2018 8:59 am

clee wrote:
Fri Dec 29, 2017 5:29 pm
Here's something kind of cool: there's a new firmware for 3D printers that moves most of the processing into a host computer (like a Raspberry Pi 3 or ODROID), turning the ATmega2560 or equivalent chip on the RAMBO/RAMPS/etc control board into sort of a dumb minion for reading temperatures and propagating commands to the steppers/heaters/fans/etc.
This is very interesting! I had independently come across Klipper a few weeks ago and had been thinking of evaluating it. It looks like you're gotten there first! :)

So I am curious, have you seen any improvements in print speed or quality with Klipper? One of the things that impressed me about Klipper was that the writeup mentioned using accurate physics models for accelerations. I assume this would allow for faster print speeds over Marlin. Have you seen anything of that nature?

More broadly, I guess the question is, other than it being something new, what advantages have you seen in moving from Marlin to Klipper?

Thank you!

-- Marcio

b-morgan
Posts: 302
Joined: Fri Aug 11, 2017 8:53 am

Re: New firmware (Klipper) on TAZ 6

Post by b-morgan » Tue Jan 02, 2018 9:23 am

I am also interested in experimenting with Klipper. How easy is it to switch back to Marlin? Can you detail the steps involved to do that?

clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

Re: New firmware (Klipper) on TAZ 6

Post by clee » Tue Jan 02, 2018 10:44 am

marcio wrote:
Tue Jan 02, 2018 8:59 am
This is very interesting! I had independently come across Klipper a few weeks ago and had been thinking of evaluating it. It looks like you're gotten there first! :)

So I am curious, have you seen any improvements in print speed or quality with Klipper? One of the things that impressed me about Klipper was that the writeup mentioned using accurate physics models for accelerations. I assume this would allow for faster print speeds over Marlin. Have you seen anything of that nature?

More broadly, I guess the question is, other than it being something new, what advantages have you seen in moving from Marlin to Klipper?

Thank you!

-- Marcio
Print speed: I need to do some more tests, but it certainly looks promising. I printed a benchy on Marlin, and it took about 1h:28m. On Klipper, using the exact same gcode, it took 1h:20m. The nozzle-wiping sequence on startup is also faster and a little quieter with Klipper than with Marlin, at least to my ears. I should record some videos and post them to YouTube or something to show the comparison.

The initial pin mapping I used did not have the part-cooling fan pin mapped correctly (this has been fixed in the pull request and thus the version of the klipper config you see at the link in my first post), but even so, it STILL ended up with cleaner bridges on benchy than Marlin, and Marlin was using the part-cooling fan actively throughout the print. I printed both benchy models at 0.3mm layer height. I'll edit this post to add some picture links later.

It's not all sunshine though. The lack of support for G29 probing is especially problematic on the TAZ6, because the TAZ doesn't really have any way to manually level the bed (at least not out of the box). So unless your print bed is unusually level, you won't be able to print anything large. At least, I couldn't, because one corner of my bed is slightly too close to the nozzle and the opposite corner is too far from it.
b-morgan wrote:
Tue Jan 02, 2018 9:23 am
I am also interested in experimenting with Klipper. How easy is it to switch back to Marlin? Can you detail the steps involved to do that?
Switching back to Marlin is pretty simple. I've gone back and forth a few times since starting this thread.

I cloned the klipper repository onto my Raspberry Pi (as the instructions direct you to do) and used scp to copy my Marlin image (1.1.5.64-6353ccb) to klipper/marlin.hex, and then I added a new target to the src/avr/Makefile called 'flashback' right under the 'flash' target. I replaced the references to $OUT/klipper.elf.hex in the 'flashback' target with references to marlin.hex, so I have a target that looks like this at the end of the src/avr/Makefile:

Code: Select all

flashback: marlin.hex
        @echo "  Flashing marlin.hex to $(FLASH_DEVICE) via avrdude"
        $(Q)if [ -z $(FLASH_DEVICE) ]; then echo "Please specify FLASH_DEVICE"; exit 1; fi
        $(Q)avrdude -p$(CONFIG_MCU) -cwiring -P"$(FLASH_DEVICE)" -D -U"flash:w:marlin.hex:i"
Make sure you have avrdude installed on your Pi (or whatever computer you have the printer plugged into over USB), make sure the printer is turned on and that no software, including Octoprint, is connected to the printer; then run 'make flash' from the klipper folder to flash Klipper to the printer, or run 'make flashback' to flash it back to Marlin.

clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

Re: New firmware (Klipper) on TAZ 6

Post by clee » Wed Jan 03, 2018 3:51 am

I uploaded two YouTube videos to try to show off the different movement speed and sounds from the steppers being driven via Marlin vs Klipper.

Marlin: https://www.youtube.com/watch?v=34FoXKF2ds4

Klipper: https://www.youtube.com/watch?v=SWyrn5jpuZI

clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

Re: New firmware (Klipper) on TAZ 6

Post by clee » Wed Jan 03, 2018 11:54 am

And now it's officially part of Klipper! https://github.com/KevinOConnor/klipper ... 048d0e05b6

User avatar
Orias
Aleph Objects | LulzBot
Posts: 1492
Joined: Wed Mar 27, 2013 1:24 pm
Location: US

Re: New firmware (Klipper) on TAZ 6

Post by Orias » Wed Jan 03, 2018 12:13 pm

Nice job!

You may want to update the extruder thermistor entry at line 48 from:

Code: Select all

+sensor_type: EPCOS 100K B57560G104F
to match the selection used in Marlin:

Code: Select all

ATC Semitec 104GT-2
You may also want to port over the standard tool head PID settings(lines 190, 193, 196):

Code: Select all

// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// LulzBot AO-Hexagon (24v)
      #define DEFAULT_Kp 28.79
      #define DEFAULT_Ki 1.91
      #define DEFAULT_Kd 108.51

clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

Re: New firmware (Klipper) on TAZ 6

Post by clee » Wed Jan 03, 2018 4:59 pm

Orias wrote:
Wed Jan 03, 2018 12:13 pm
Nice job!

You may want to update the extruder thermistor entry at line 48 from:

Code: Select all

+sensor_type: EPCOS 100K B57560G104F
to match the selection used in Marlin:

Code: Select all

ATC Semitec 104GT-2
You may also want to port over the standard tool head PID settings(lines 190, 193, 196):

Code: Select all

// If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
// LulzBot AO-Hexagon (24v)
      #define DEFAULT_Kp 28.79
      #define DEFAULT_Ki 1.91
      #define DEFAULT_Kd 108.51
Oh, damn, good call! It was working with the previous values, but I'll push a pull request later tonight to adjust to these instead. These values seem to work just fine and unless I'm crazy I think the hotend is heating up a little faster now, too.

I think my project for the weekend will be adding G29 support for the TAZ 6 to Klipper.

clee
Posts: 7
Joined: Fri Dec 29, 2017 10:51 am

Re: New firmware (Klipper) on TAZ 6

Post by clee » Fri Jan 05, 2018 2:50 pm

Orias and/or marcio:

Do either of you happen to know the Z-offset I should apply after probing the bed washers? I'm guessing I can measure it with my calipers or dig the value out of the Marlin code, but I figured if either of you happened to know already, it might save me some time.

marcio
Aleph Objects | LulzBot
Posts: 49
Joined: Tue Jul 18, 2017 12:44 pm

Re: New firmware (Klipper) on TAZ 6

Post by marcio » Fri Jan 05, 2018 4:17 pm

clee wrote:
Fri Jan 05, 2018 2:50 pm
Orias and/or marcio:

Do either of you happen to know the Z-offset I should apply after probing the bed washers? I'm guessing I can measure it with my calipers or dig the value out of the Marlin code, but I figured if either of you happened to know already, it might save me some time.
Hi Clee,

The Z_PROBE_OFFSET_FROM_EXTRUDER we use in Marlin is -1.377.

BTW, I downloaded Klipper today to my workstation and managed to hack Cura 2 to connect to it. The problem I immediately ran into is that Klipper does not let me move an axis without homing, but on the TAZ, it is necessary to lift the nozzle before homing otherwise the nozzle crashes on the homing button, which is exactly what happened when I did a G28. How did you get past that problem?

-- Marcio

Post Reply