Welcome! Log In Create A New Profile

Advanced

Filament detection and user pause button

Posted by PRZ 
PRZ
Filament detection and user pause button
May 29, 2016 09:43AM
Following the implementation of M581/M582 in DC42 V1.13 version, I implemented a filament presence detection, which I paralleled with a push button to allow user stopping a print from the machine itself.

I added simple hardware to my direct drive extruder tensioner [rouzeau.net] (I will published this part and a more generic one in another message). The switch tab was slightly bent for proper operation.







The detection switch is normally closed, so circuit is closed while there is no filament. A pushbutton which close circuit was paralelled, so pressing this button have the same effect as a lack of filament.
It is connected to the E1 end stop between signal and ground pins, so switch closing lower the signal. So the trigger is on falling edge.

I have created/modified a full set of macros to operate the system.

; /sys/start.g  To be executed at print start (add 'M98 P/sys/start.g' in your slicer
		; print start code)
M581 E1 S0 T2 ; Trigger 2 rised if filament is missing. Switch on E1 connect
		; signal and ground pin when there is no filament, so trigger 
		; on falling edge.  Other extruder switch or user accessible
		; pushbutton (closed on action) can be paralleled 
M582 T2  	; Check if the Filament absence is detected NOW
; M581 E0 S0 T3	; If endstop 0 is available (no probe), trigger resume print
		; on E0 activation 

; /sys/cancel.g
M581 S-1 T2 ; neutralise trigger 2  while stopping print
M581 S-1 T3 ; neutralise trigger 3  while stopping print
; Next is non standard and unrelated to filament detection
M140 S55 	; Set the bed temperature and don't wait for it
M104 S155	; set the current hotend temperature to 155 and don't wait for it

; /sys/stop.g
M581 S-1 T2 ; neutralise trigger 2  while stopping print
M581 S-1 T3 ; neutralise trigger 3  while stopping print

; /sys/trigger2.g  
M300 S300 P500    ; Beep 
M300 S1000 P1000 ; Beep 
M117 No filament or User pause ; Message on DWC or Panel
;M84 E0:1  ; Turn extruders motors off - Don't work
M25 ; Pause print (and run pause.g before)

; /sys/trigger3.g  Option for a 'resume' button
M24 ; Resume print (and run resume.g before)

; /sys/pause.g
M581 S-1 T2 ; neutralise trigger 2  while pausing print - to avoid multiple triggers
G1 E-4 F2500    ; retract 4mm
M84 E0:1        ; Turn extruders motors off
G91	        ; relative moves
G1 Z50 F5000    ; raise nozzle 50mm
G90             ; absolute moves
G1 X0 Y85 F5000 ; move head out of the way of the print

; /sys/resume.g
M581 E1 S0 T2   ; Reactivate trigger 2 
M582 T2         ; Check again there is filament 
G1 R1 Z2 F5000  ; move to 2mm above resume point
G1 R1           ; lower nozzle to resume point
G1 E4 F2500     ; undo the retraction

You shall not use this code ‘as is’ but adapt it to your existing pause/resume/stop macros.

It works properly, with bips and message on DWC, but I have not tested on PanelDue, as I haven’t one.

Comments :
  • It might be nice to always run the macro ‘start.g’ while starting a print, instead of setting the macro run in the slicer start code
  • For any reason, the extruder motor off don’t work in the trigger macro routine, so I deactivate extruder motors in the pause macro (for manual feed).
  • Instead of what I previously written, the message sent to DWC open a window which will be only closed on user action.
  • The action on the switch is not taken into account immediately (wait the end of a move ?), and if the button is not maintained, the trigger may not always be taken into account.
  • It can be interesting to use the E0 to install a ‘resume’ button, but on my machines, the E0 is used for the Z-probe, as the Z-probe connector only accept analog probe. It might be interesting to add an option to use AD12 or PC10 (connector probe pins) for a digital Z probing on rising edge with pull-up resistors. Or alternatively to accept trigger on M581/M582 from these pins (or both).

Edited 4 time(s). Last edit at 05/29/2016 09:54AM by PRZ.

Pierre

- Embedded help system for Duet and RepRap Firmware [forums.reprap.org]
- Enclosed delta printers Lily [rouzeau.net] and Lily Big [rouzeau.net]
- OpenScad delta printer simulator [github.com]
- 3D printing on my site [www.rouzeau.net]

Re: Filament detection and user pause button
May 31, 2016 04:30PM
Interesting!

That extruder design is something unique. I think the dual extrusion portion is particularly cool.
I've been thinking about replacing the airtrippers on one of my printers, and will have to look more closely at that.

And I can see where detecting the last bit of filament in a print could be useful for swapping in a new spool.

I'll definitely be thinking about this one.
Re: Filament detection and user pause button
July 22, 2016 03:59AM
Just an idea:

Hotwire a old mouse, to close the left mouse button switch with the filament detector.

Now, after starting the print, position the mouse above the pause button of your controller.... see what happens :-)

Thomas


www.3daybreaker.blogspot.com

Orca V4.4 rebuild to Ramps with Mk8 and E3D, as well as a Rostock Delta Mini and an OLO in backorder :-)
Re: Filament detection and user pause button
August 02, 2017 07:42AM
This is a great idea!!

But one of the biggest problems is also when the filament gets stuck and no movement happens.

Can it be done that the movement of the filament is detected and in the absence of movement when the extruder gears are working it will also pause the print?
Re: Filament detection and user pause button
August 02, 2017 12:04PM
Quote
Karoo Klong
This is a great idea!!

But one of the biggest problems is also when the filament gets stuck and no movement happens.

Can it be done that the movement of the filament is detected and in the absence of movement when the extruder gears are working it will also pause the print?

I'm currently adding support for the Duet3D filament sensor to RRF. This sensor reports filament movement and the firmware correlates it with commanded extrusion, so it is able to detect stuck filament.


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet [www.duet3d.com].
Re: Filament detection and user pause button
September 24, 2017 06:30AM
Quote
dc42
I'm currently adding support for the Duet3D filament sensor to RRF. This sensor reports filament movement and the firmware correlates it with commanded extrusion, so it is able to detect stuck filament.

David i am waiting for a filament width sensor . I know marlin supports is . How difficult is for 0.85 and 0.6 to support this extension ?


RePrapPro Mendel 3
Duet 0.6 firmware 1.19
RePrapPro Mendel 3
Duet 0.8.5 firmware 1.19
Re: Filament detection and user pause button
September 24, 2017 09:51AM
RRF doesn't currently support filament width sensors. It's been asked for occasionally, but unless you buy very cheap filament or extrude your own without good enough control, varying filament widths are not a significant problem these days. If you want to compensate for filament with a non-uniform cross section, you should measure the width in 2 or 3 directions, not just one.

To implement a filament width sensor in RRF you would need to:

- Define a protocol for how the width sensor sends the width (or the cross sectional area) of the filament to the Duet
- Design and implement a GCode mechanism to define how the output of the width sensor is interpreted, and to specify the filament length between the width sensor and the nozzle
- Implement a software shift register (e.g. using a ring buffer) to account for the length of filament between the width sensor and the nozzle
- 'Clock' the shift register (by feeding new data into it and discarding the oldest data) every time a certain length of extrusion (e.g. 5mm) has been commanded
- Adjust the extrusion ratio according to the oldest data in the shift register


Delta printer calibration calculator, mini IR Z probe, and colour touch screen control panel: [escher3d.com]

Large delta printer, and other 3D printer blog postings: [miscsolutions.wordpress.com]

Disclosure: I have a financial interest in sales of the Panel Due, Mini IR height sensor, and Duet WiFi/Duet Ethernet [www.duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login