Closed rr2s closed 9 years ago
Has any progress been made on this feature? We're looking to repurpose an unused endstop and a roller/limit switch which would trigger an M226 "Gcode Initiated Pause" when open. D1 is a good thought but we're using an Azteeg X3. I'll have to check the mapping.
I wanted have advice, but I have not had any. I fend me. I use a optical detector fork. Command M226 is trigger when there no more filament. In ramps 1.4 we can use the AUX (D1 for example). Azteeg X3 also uses a Atmel ATMEGA2560 micro controller, you should find the auxiliary fairly easily. I also use a buzzer to warn me when there lack of filament M300. It's very simple to set up.
if you have fixed this then please fork the latest marlin, make the changes you made and submit a pull request
If you do, please make it multi-extruder compatible
I see there is now an option to enable a filament runout sensor in configuration.h. Where can I find documentation on this feature? I have such a switch already in use on my printer, set to normally-open, and held closed by the filament, triggering M300 when the filament end opens the switch.
Hi @AbuMaia. All you need to do is to uncomment the define FILAMENT_SENSOR
and then make sure your sensor's pin is set correctly. The default values are…
info here: http://www.thingiverse.com/thing:89044
and you can get one here: http://owi.storenvy.com/
That's the wrong sensor, Thinkyhead. I'm not talking about a filament width sensor, but an end-of-filament sensor. Configuration.h says it uses RAMPS servo pin 2, but there are options for pullups and inverting which I do not understand.
you can still use that sensor... if a 3mm filament is below 1mm then you are prob out
Den tirsdag den 24. marts 2015 skrev AbuMaia notifications@github.com:
That's the wrong sensor, Thinkyhead. I'm not talking about a filament width sensor, but an end-of-filament sensor. Configuration.h says it uses RAMPS servo pin 2, but there are options for pullups and inverting which I do not understand.
— Reply to this email directly or view it on GitHub https://github.com/MarlinFirmware/Marlin/issues/999#issuecomment-85455575 .
@boelle Yes. But there is a little difference between 60$ and 20€ cent.
As mentioned earlier, I don't have a width sensor, I have a filament runout sensor. I just need some additional info on how to set it up in Configuration.h.
If you have a normal mechanical switch you need a pullup, so the pin can reset. Inverting depends on your switch (normally close/normally open).
@AbuMaia Take a switch. Connect to pin and ground. Set FILRUNOUTPIN in your pins???.h. Define ENDSTOPPULLUP_FIL_RUNOUT. Play with FIL_RUNOUT_INVERTING until it works.
I have my switch connected to pin 57. Is there a pullup resistor associated with that pin?
@AbuMaia As fa i remember there are pullups for all pins.
Thanks for the help.
Oops, right, well, same general idea. Find the relevant pin, make sure it's set, enable the option. Etc.
Most of the functionality required for a filament "end" monitor and alarm are already in Marlin. The existing "filament Change" function (pause/resume) can be used if triggered by a digital pin going low to high. A simple filament end sensor can be made just using a micro switch which normally holds the pin low when filament is present.
http://community.robo3d.com/index.php?threads/filament-monitor.3335/page-2#post-42914
The mods below have been tested and work. The end of filament sense pin is 44. Obviously this pin needs to be a config parameter. The boolean FC_Flag also needs to be defined correctly (not just in line as in this mod)
The code changes required in the file marlin_main.cpp are :
lcd_init();
_delay_ms(1000); // wait 1sec to display the splash screen
#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
SET_OUTPUT(CONTROLLERFAN_PIN); //Set pin used for driver cooling fan
#endif
#ifdef DIGIPOT_I2C
digipot_i2c_init();
#endif
// filament monitor mod - 18/03/2015
// filament monitor pin set to input
SET_INPUT(44);
WRITE(44,HIGH); // enable pull up
}
// filament monitor mod - 18/03/2015
boolean FC_Flag = false; // initialise flag to enque M600 command once per alarm
void loop()
{
if(buflen < (BUFSIZE-1))
get_command();
And in the marlin_main.cpp loop() code
#else
process_commands();
#endif //SDSUPPORT
buflen = (buflen-1);
bufindr = (bufindr + 1)%BUFSIZE;
// filament monitor mod - Ziggy
//
// note FC_Flag variable must be global
//
if (digitalRead(44) == HIGH) { // check filament monitor alarm pin
if (!FC_Flag) { // not already triggered ?
enquecommand_P(PSTR("M600")); // trigger a filament change
FC_Flag = true; //
}
} else FC_Flag = false; // reset for next alarm
}
//check heater every n milliseconds
I see in the latest dev version this function has been implemented along the same lines using pin 4
Sounds like you have it in hand. I can see it will help to make better documentation for this, and for Marlin features generally. Keeping that in mind…
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I would like to implement a function that would put marlin break at the detection end of the filament. I would really contributed to this framework and understand how to do it properly.
Where and how can I create a function that triggers a pause if the pin D1 and high state (normally unused pin on the ramps 1.4).