Klipper: Request to use Filamnet Run Out Sensor

Created on 21 Mar 2018  路  13Comments  路  Source: KevinOConnor/klipper

Can you add RunOut sensor? its connected to Servo1 (D6) on Ramps, I like this from Repetier Firmware.

It would be great that's make pause and filament change when trigger the senor

Most helpful comment

Basic filament sensor support is now in Klipper.

-Kevin

All 13 comments

yes, it is very important, please add,thx!!!

I guess this could be thought of as a request to implement M600 as done in marlin / smoothieware: http://reprap.org/wiki/Gcodes#M600:_Filament_change_pause

M600 It Will be great.

OK. I Have connect the Runout sensor to Orange PI and its finaly works, thaks to arhi (Bogdan Kecman) and his Octoprint-Filament-Reloaded-OrangePi.

Now the sensor Trigger the pause,
and do GCODE
After pause:
G91
G1 Z50
G1 E-40 F500
M104 S0
M140 S0

I change the filamnet

and after resume do gcode
G91
G1 Z50
G1 E-40 F500
M104 S0
M140 S0

When printer start printing its give

Your printer's firmware reported an error. Due to that the ongoing print job will be cancelled. Reported error: Move exceeds maximum extrusion (4.937mm^2 vs 0.640mm^2)

If we can after triger to pause remember all position XYZE, ten switch to relative, make some moves home XY, park in position to change fimalent, retract 4mm material, then after resume extract 3-4 mm material and then go to XYZE where pause whas trigered, than switch to abloute shold do the trick.

On Sat, May 19, 2018 at 01:01:39AM -0700, MarcinKnD wrote:

When printer start printing its give

Your printer's firmware reported an error. Due to that the ongoing print job will be cancelled. Reported error: Move exceeds maximum extrusion (4.937mm^2 vs 0.640mm^2)

It's not clear to me if you are reporting a problem with Klipper. If
you are, you should open a separate issue and attach the Klipper log
file as described at:

https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md

OK I got That and it works. You misunderstood me. I did not report a problem with Klipper, I was just looking for a solution for changing the filament because Repetier and Marlin use the M600 for this.

In the klipper which does not implement the M600, you can make it stop and park the heads after detecting the lack of filamnet, and then resurrect the print where it interrupted

Now You may use na filament sensor with Octoprint Filament Sensor Reloaded attached to RPI https://plugins.octoprint.org/plugins/filament_sensor_reloaded/

Or

Octoprint filament sensor reloaded Orange pi https://github.com/arhi/Octoprint-Filament-Reloaded-OrangePi (witch some patch of opi.gpio)

and use this scirpt i Gcode settings in octoprint.

pause:

{% if pause_position.x is not none %}
; relative XYZE
G91
M83

; retract filament, move Z slightly upwards
G1 Z+5 E-5 F4500

; absolute XYZE
M82
G90

; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}
M104 S0
M140 S0

resume:

{% if pause_temperature[0] and pause_temperature[0]['target'] is not none %}
M109 S{{ pause_temperature[0]['target'] }}
{% else %}
M104 S0
{% endif %}

{% if pause_temperature['b'] and pause_temperature['b']['target'] is not none %}
M190 S{{ pause_temperature['b']['target'] }}
{% else %}
M140 S0
{% endif %}
{% if pause_position.x is not none %}
; relative extruder
M83

; prime nozzle
G1 E-5 F500
G1 E5 F500
G1 E5 F500

; absolute E
M82

; absolute XYZ
G90

; reset E
G92 E{{ pause_position.e }}

; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500

; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}

http://docs.octoprint.org/en/master/features/gcode_scripts.html

it only works when you print from local space, not from virtuell SD!

With the addition of "buttons" support (commit 38d7b9ad) it should now be possible to put together a klipper host python "module" to support filament runout sensors. I don't have one of these sensors, but if someone with the sensor is up for doing some development work, it should be possible.

-Kevin

An example in the example-extras.cfg would be perfect. I'm trying to figure out how to do it and can't seem to find a way.

Something like this?
Still have to support multiple runout sensors and actually have a state (not repeat messages).
Config is for eg:

[filament_runout_sensor 0]
pin = ^ar4

So that there can be more than one sensor.

@mamoit - That code looks like a valid way to use the buttons module. Please submit a pull request if you would like me to do a full review and you want to include it in mainline.

-Kevin

PR created #545 still needs a ton of work, but I want your input.

Basic filament sensor support is now in Klipper.

-Kevin

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KevinOConnor picture KevinOConnor  路  5Comments

speendo picture speendo  路  3Comments

Hywelmartin picture Hywelmartin  路  6Comments

smokez89 picture smokez89  路  4Comments

TronskiFPV picture TronskiFPV  路  5Comments