pause when no more material

Ask the MakerGear community for assistance...
sonra
Posts: 116
Joined: Sat Aug 22, 2015 3:44 pm
Location: Israel

pause when no more material

Post by sonra » Sat May 16, 2020 5:29 pm

Hi guys
I don't know if the problem was issued in this forums but I tried to find with not much success
The idea is to pause the print when there is no more raw material .To my opinion there are some printers with this kind of sensor ( but may be I am wrong) . from the electronic view can think of light source and photo electric sensor . I don't know much about the possibility to attach this to the Arudino board of the printer ( from electric and software point ) but if you guys can give my a clue(go/no_go) I can dive in .
I think that it is a nice feature specially if you print for long and can not be with the printer
My printer is M2 V4
regards Doron

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: pause when no more material

Post by ednisley » Sun May 17, 2020 12:34 pm

sonra wrote:
Sat May 16, 2020 5:29 pm
light source and photo electric sensor
This is a solved problem, at least for the switch hardware:

https://www.amazon.com/s?k=filament+sensor

Mechanical switches seem more reliable than optical, if only because of the usual fuzz.

It plugs into one of the unused limit switch jacks, although the connectors may not match.

Configuring the firmware to use the switch depends on which version you have, but for 1.1.0 (obsolete, but on my M2) you uncomment one line in Configuration.h:

Code: Select all

//#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
Set the sensor pin to match the input you're using, most likely in pins.h:

Code: Select all

#if ENABLED(FILAMENT_RUNOUT_SENSOR)
  // define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
  #define FILRUNOUT_PIN     4
#endif
Then make sure there's a script to do whatever you want; the default seems to be "M600".

sonra
Posts: 116
Joined: Sat Aug 22, 2015 3:44 pm
Location: Israel

Re: pause when no more material

Post by sonra » Sun May 17, 2020 1:06 pm

thanks
Did you mean to this one
"TriangleLab Filament Runout Sensor Detector for 3D Printer 1.75mm Filament
by GO-3D PRINT "
( you know this works with our type of printer ) because there are some types to sensors in the page

User avatar
ednisley
Posts: 1188
Joined: Fri Apr 11, 2014 5:34 pm
Location: Halfway up the Hudson
Contact:

Re: pause when no more material

Post by ednisley » Mon May 18, 2020 2:01 pm

sonra wrote:
Sun May 17, 2020 1:06 pm
Did you mean to this one
I just aimed you in the direction of buying something, rather than building it from scratch.

They're pretty much generic and, because I have zero experience with any of them, I can't recommend anything in particular.

sonra
Posts: 116
Joined: Sat Aug 22, 2015 3:44 pm
Location: Israel

Re: pause when no more material

Post by sonra » Mon May 18, 2020 2:33 pm

thanks
Doron

Low-Fer
Posts: 14
Joined: Tue Apr 18, 2017 5:30 am

Re: pause when no more material

Post by Low-Fer » Mon Jul 06, 2020 7:09 am

OK - I got an error when compiling and uploading the reconfigured firmware
Here is the code..


#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
//#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
#define FILAMENT_RUNOUT_SCRIPT "M600"
#define FIL_RUNOUT_PIN 23
#endif

Here is the error

In file included from /Configuration.h:795,
from /Marlin.h:22,
from BlinkM.cpp:5:
/Configuration_adv.h:289:12: error: missing binary operator before token "("

The code and the runout sensor design are derived from http://www.thingiverse.com/thing:3638968

For those that code you may see the issue easily - I'm not seeing it.

I really like what I ended up with as far as the whole device and will post it and instructions when I have it complete. This is the last step - I have it wired into the X MAX endstop.

Lowell

Low-Fer
Posts: 14
Joined: Tue Apr 18, 2017 5:30 am

Re: pause when no more material

Post by Low-Fer » Mon Jul 06, 2020 6:03 pm

OK - figured that challenge out and the code compiled and uploaded - now time to test. Wanted to drop the code and the working notes here as I may not be able to for a few more days. Note lots of comments - just to keep my thoughts working.

//=======Runout Sensor work==================================================
#define FILAMENT_RUNOUT_SENSOR // Uncomment for defining a filament runout sensor such as a mechanical or opto endstop to check the existence of filament
#ifdef FILAMENT_RUNOUT_SENSOR
// define digital pin 4 for the filament runout sensor. Use the RAMPS 1.4 digital input 4 on the servos connector
#define FILRUNOUT_PIN 24
#define FILAMENT_RUNOUT_SCRIPT "M600"
#endif
//#define FILAMENT_RUNOUT_SENSOR
//#ifdef(FILAMENT_RUNOUT_SENSOR)
//#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
//#define FIL_RUNOUT_INVERTING false // set to true to invert the logic of the sensor.
//#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
//#define FILAMENT_RUNOUT_SCRIPT "M600"
//#define FIL_RUNOUT_PIN 24
//#endif
//===============

Again I'll test sometime today and hopefully, we'll be golden.

I'd love some input from you'all..


Lowell

sonra
Posts: 116
Joined: Sat Aug 22, 2015 3:44 pm
Location: Israel

Re: pause when no more material

Post by sonra » Thu Jul 30, 2020 12:17 am

Hi guys
I try to use the runout switch so I can use my filament till end so i got the hardware when I try to modify the Marlin software I notice that I can not use the M600 command to pause the print because ( to my opinion ) i have an old Marlin ver that don't support it ( try to dig in the software )
My printer is M2 i don't know what revision but as i find in the MakerGear site it use ver called "M2Marlin-01-14-2016-OriginalZMotor"
Do you know if I am right and what can I do about , modify the current software or use newer ver ?
Regards Doron

Low-Fer
Posts: 14
Joined: Tue Apr 18, 2017 5:30 am

Re: pause when no more material

Post by Low-Fer » Sat Aug 01, 2020 5:52 am

Still trying to find the answer to my run-out sensor that doesn't trigger my Rambo board for a filament change out - see my above posts.

Any help would be highly appreciated.

Lowell

Low-Fer
Posts: 14
Joined: Tue Apr 18, 2017 5:30 am

Re: pause when no more material

Post by Low-Fer » Sat Aug 01, 2020 5:52 am

Still trying to find the answer to my run-out sensor that doesn't trigger my Rambo board for a filament change out - see my above posts.

Any help would be highly appreciated.

Lowell

Post Reply