Wire up filament sensor to MK2, use thermister circuit?
 
Benachrichtigungen
Alles löschen

[Geschlossen] Wire up filament sensor to MK2, use thermister circuit?  

Seite 1 / 3
  RSS
david.b14
(@david-b14)
Honorable Member
Wire up filament sensor to MK2, use thermister circuit?

Here is a nice filament sensor: https://blog.adafruit.com/2017/01/05/filmanent-sensor-switchbox-3dthursday-3dprinting/

Any thoughts on integrated it into the MK2 without changing the firmware? I'm thinking about using a normally close switch to the thermister connection circuit inline to the rambo board which would stop the print, but probably the octoprint plugin is a good way except not sure if it will turn off the hot end which would be needed to avoid a nozzle clog if not caught right away.

Veröffentlicht : 05/01/2017 9:56 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Wire up filament sensor to MK2, use thermister circuit?

So your idea is to set the temperature low when you run out of filament which will cause the extruder heater to be turned full on for a period of time until the "Thermal Runaway" warning occurs?

Methinks that is not such a good idea. Sorry...

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Veröffentlicht : 05/01/2017 10:35 pm
david.b14
(@david-b14)
Honorable Member
Themenstarter answered:
Re: Wire up filament sensor to MK2, use thermister circuit?

Good point. I was thinking that shorting or opening the thermister circuit would stop the print with in a few seconds but guess if it takes a while for the fault to happen then it is not a good option.

Probably a better option is to wire it up to the cancel button on the LCD panel, but would need to ensure the button press is one shot using a time delayed relay ( http://www.ebay.com/itm/12V-DC-Multifunction-Self-lock-Relay-PLC-Cycle-Timer-Module-Delay-Time-Switch-NJ-/252170243910?hash=item3ab6848f46:g:KTQAAOSwLzdWRpo1 ).

Veröffentlicht : 05/01/2017 10:58 pm
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Wire up filament sensor to MK2, use thermister circuit?

David

Looking at the firmware code, it is 45 seconds before the timeout occurs. Depending on filament, that is sufficient time to do damage.

You would be better off connecting the filament sensor to separate pins on the RAMBo and enabling the filament sensor in firmware (currently commented out).

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Veröffentlicht : 05/01/2017 11:10 pm
david.b14
(@david-b14)
Honorable Member
Themenstarter answered:
Re: Wire up filament sensor to MK2, use thermister circuit?

Hmmmm. After considering these points an easier route may be to use the Pi to issue commands to Octoprint using the REST API ( http://docs.octoprint.org/en/master/api/printer.html#issue-a-print-head-command ) where I could pause the print and bring down the bed and nozzle temps with python script.

Veröffentlicht : 06/01/2017 12:29 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Wire up filament sensor to MK2, use thermister circuit?

David

Whichever way you feel is best for you, but at least you now have 2 workable options.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Veröffentlicht : 06/01/2017 9:26 am
David T.
(@david-t)
Noble Member
Re: Wire up filament sensor to MK2, use thermister circuit?

Good point. I was thinking that shorting or opening the thermister circuit would stop the print with in a few seconds but guess if it takes a while for the fault to happen then it is not a good option.
What is the purpose of this gadget? If you induce thermal runaway, the print is ruined as well as if the filament is out standard way.
The most usable purpose would be to initiate pause or better "Change filament" action (M600 gcode command).

Veröffentlicht : 06/01/2017 11:30 am
david.b14
(@david-b14)
Honorable Member
Themenstarter answered:
Re: Wire up filament sensor to MK2, use thermister circuit?

Hey guys,

Cool, thanks for the ideas and feedback. I was not aware of the change filament gcode command. Will that move the print head to the side?

David

Veröffentlicht : 06/01/2017 2:33 pm
David T.
(@david-t)
Noble Member
Re: Wire up filament sensor to MK2, use thermister circuit?

Sure. It will move extruder to safe position, unload the filament and start alarming beeps. You only load new spool and push the button.

Veröffentlicht : 06/01/2017 9:55 pm
erick.v
(@erick-v)
Estimable Member
Re: Wire up filament sensor to MK2, use thermister circuit?

David

Looking at the firmware code, it is 45 seconds before the timeout occurs. Depending on filament, that is sufficient time to do damage.

You would be better off connecting the filament sensor to separate pins on the RAMBo and enabling the filament sensor in firmware (currently commented out).

Peter

I am looking at the firmware and I see the filament diameter sensor but I don't see the filament runout sensor. I would like to try this.

I have an optical sensor but I don't quite like the idea of using Octoprint so doing it with firmware and the existing RAMBo would be perfect

Veröffentlicht : 18/01/2017 4:18 am
PJR
 PJR
(@pjr)
Antient Member Moderator
Re: Wire up filament sensor to MK2, use thermister circuit?

Configuration_prusa.h:

// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT

#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif

Not sure if that defines the pin; if not you will have to look in pins.h to set the pin number. You could use the pinset from the Max X/Y/Z endstops which also have a 5V output and are otherwise unused.

Peter

Please note: I do not have any affiliation with Prusa Research. Any advices given are offered in good faith. It is your responsibility to ensure that by following my advice you do not suffer or cause injury, damage…

Veröffentlicht : 18/01/2017 9:52 am
3d-gussner
(@3d-gussner)
Reputable Member Prusa-Translations
Re: Wire up filament sensor to MK2, use thermister circuit?

sorry got it twice.

Veröffentlicht : 18/01/2017 12:39 pm
3d-gussner
(@3d-gussner)
Reputable Member Prusa-Translations
Re: Wire up filament sensor to MK2, use thermister circuit?

Configuration_prusa.h:

// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT

#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif

Not sure if that defines the pin; if not you will have to look in pins.h to set the pin number. You could use the pinset from the Max X/Y/Z endstops which also have a 5V output and are otherwise unused.

Peter
Here my way to find the right pin or know what, how, where to change to another pin.

I was looking for 'FILAMENT_RUNOUT_SUPPORT' in all firmware files (clone from github) and found it in 'Marlin_main.cpp'.
Here some lines...
' #ifdef FILAMENT_RUNOUT_SUPPORT

if(READ(FR_SENS)){
'

Looking for 'FR_SENS' in the all other files you will get some lines in 'pins.h' file
Here some lines...
'#if MOTHERBOARD == 302
#define MINI_RAMBO

#endif
#if MOTHERBOARD == 301 || MOTHERBOARD == 302
#define KNOWN_BOARD
#ifndef __AVR_ATmega2560__
#error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
#endif

#define FR_SENS 21

#define X_STEP_PIN 37
'

It makes sense to double check if ' 21' is used somewhere else and you will find in the 'pins.h' file another line.

' #define BEEPER 78

#define BTN_EN1 80
#define BTN_EN2 73
#define BTN_ENC 21
'

But this is not an issue because that part is for a motherboard '==102' or 'RAMBo10a' and not '==302'/'MINI_RAMBO'

So it is PIN 21 by default. But where can you find PIN 21 on the board?
Check the schematics https://github.com/ultimachine/Mini-Rambo/blob/1.3a/board/Project%20Outputs%20for%20Mini-Rambo/Mini-Rambo.PDF
and search for '21'.
'21' is on page 1 but that is just the USB2Serial
Next '21's are on page 2 and you find a few.
So which one is it?
Knowing some used pins from the 'pins.h' file, i searched for 'X-STEP' in the schematic pdf and there you can compare the 'pins.h' value with the schematic value. Here you will see that 'pins.h' values are not the physical Atmega2560 CPU pins!

!!! You have to look for the 'Arduino Pin#' and not 'Part Pin#' numbers!!!

'X_STEP_PIN 37' in 'pins.h' == 'X-STEP' in the schematic 'Arduino Pin#' 37 and 'Part Pin#' 53.

Knowing that...'FR_SENS' == 'Arduino Pin#' is 21 == 'SCL', search for 'SCL' and you get on the second page 4 hits:
1. (SCL/INT0) PDO in the CPU
2. CPU pin 43 ____ SCL ____ 21
3. Extruder Extension section / SD-SS ______ __SCL____ __Reset__
4. Bottom part P3 6 | _6_SCL___

Long story short:

By default the 'FILAMENT_RUNOUT_SUPPORT' aka 'FR_SENS' PIN 21 can be found on the board on pin 6 of the connector P3.

Also changing the 'pins.h' 'FR_SENS' value is an option to one of the unused MaxStops.

Veröffentlicht : 18/01/2017 12:39 pm
erick.v
(@erick-v)
Estimable Member
Re: Wire up filament sensor to MK2, use thermister circuit?

Wow Very Good explanation!

I have a few days off from work coming up so I am going to try this.

Thanks again!

Veröffentlicht : 19/01/2017 5:00 am
3d-gussner
(@3d-gussner)
Reputable Member Prusa-Translations
Re: Wire up filament sensor to MK2, use thermister circuit?

Wow Very Good explanation!

I have a few days off from work coming up so I am going to try this.

Thanks again!
You are welcome. Thanks you liked it...can be difficult to understand Nerd talking

Veröffentlicht : 19/01/2017 9:23 am
MinorHavoc
(@minorhavoc)
Active Member
Re: Wire up filament sensor to MK2, use thermister circuit?

Anyone had any success hooking up a run-out switch to P3 pin 6 and enabling the filament run-out code in the firmware?

Veröffentlicht : 05/03/2017 2:25 am
stephen.e3
(@stephen-e3)
Estimable Member
Re: Wire up filament sensor to MK2, use thermister circuit?

I too would like to know if anyone has actually wired this up to the MK2 and had any success (or failure) in using it.

Veröffentlicht : 17/04/2017 12:08 pm
3d-gussner
(@3d-gussner)
Reputable Member Prusa-Translations
Re: Wire up filament sensor to MK2, use thermister circuit?

After i saw that two of you asked for testing the filament runout sensor function, i connected two wires to P3 pin 4 GND and pin 6 SCL aka FR_SENS aka FILAMENT_RUNOUT_SENSOR. These two wires disconnected (switch open) = run out of filament.

To get the function running i had to change a line in the 'Configuration_prusa.h', which is a copy of the '1_75mm_MK2-RAMBo13a-E3Dv6full.h' file in the variants folder of the firmware repository.

You have to to find in that file
'// Define Prusa filament runout sensor
//#define FILAMENT_RUNOUT_SUPPORT

#ifdef FILAMENT_RUNOUT_SUPPORT
#define FILAMENT_RUNOUT_SENSOR 1
#endif'

here un-comment '#define FILAMENT_RUNOUT_SUPPORT'
Following the instructions you can compile and 'Export compiled Binary' then upload the firmware using the Prusa firmware updater tool, Cura or OctoPrint with firmware plugin.

So how it works:
As soon the connection of the P3 pin 6 to P3 pin 4 is disconnected (switch OPEN)
1. the printer stops to print
2. retract the filament
3. moves to the front (X211 Y0 Z current Z height + additional 2)
4. beeps with a message on the screen to change the filament and commit with the knob
5. as soon you changed the filament it will extrude the filament, in my case the nozzle was just few mm from the bed and i had to pull the extruded filament to prevent getting a BLOB.
6. the menu will ask you if you changed the filament, filament not loaded or if the color is not clear.
7. as soon you commit the change of the filament the printer continues the print WHERE it stopped.

What can be improved?
I think that the changing position X211 Y0 and Z<current height>+2 is not optimal because of the filament is oozing out, especially when the current Z height is quite low you risk a BLOB.
How can you prevent that?
One option is to change the 'FILAMENTCHANGE_XPOS', 'FILAMENTCHANGE_YPOS' and 'FILAMENTCHANGE_ZADD'. The XPOS and YPOS are not an issue to change BUT be careful changing the ZADD value. Having a higher ZADD value and printing something high can cause your print to fail if run out OR change filament.

Example: You print a two color rocket that is 200mm high and the last 5mm will have another color. With the default settings the nozzle will move to X211 Y0 and Z195+2 during the filament change. This will work without any problems, it is in the max Z height.

BUT if you changed the ZADD value to 20 to get more clearance with low prints while changing filament THIS will fail your 200mm rocket print. The filament change at 195mm will try to move the Z axis additional 20 mm and the Z-stepper motors will missing steps. As soon you change the filament to finish your rocket the printer 'thinks' it is at Z215 but in real it is somewhere around 200-205mm and will subtract 20 mm to continue the print and knock off your print and print the last 5mm in the air.

What for it is a run-out sensor good?
1. Printer stops the print when it runs out of filament and CAN continue after changing the filament.
2. Sometimes you have just not enough filament on one spool to finish the print and you start an new one. Having the sensor you can use nearly the hole roll and change to the new one during the print as soon it runs out.

hope that helped.

BTW I haven't add the filament run-out sensor yet just two cables simulating the run-out.

Update:
Checking the miniRAMbo schematics again i think changing the FR_SENS pin 21 to an unused end stop max connector makes more sense, because SCL can be used on another pin header.
To do that you have to change in the 'pins.h' file the 'FR_SENS' value from 21 to 24 (for Y-MAX) and the 'Y-MAX' value must the be -1 (unused).

Veröffentlicht : 18/04/2017 6:09 pm
david.b14
(@david-b14)
Honorable Member
Themenstarter answered:
Re: Wire up filament sensor to MK2, use thermister circuit?

Great work!

Would you be willing to post the binary with your modifications so that others could give this a try without compiling the source files?

This could also be used to run a trip wire in front on the nozzle to stop / pause a print that has failed.

Veröffentlicht : 19/04/2017 7:40 pm
3d-gussner
(@3d-gussner)
Reputable Member Prusa-Translations
Re: Wire up filament sensor to MK2, use thermister circuit?

Great work!

Would you be willing to post the binary with your modifications so that others could give this a try without compiling the source files?

This could also be used to run a trip wire in front on the nozzle to stop / pause a print that has failed.

Hi David,

i can provide my version, but i don't know if i can do that every time Prusa updates their firmware. If something goes wrong it is your responsibility. I also cannot provide the support you get from Prusa and even with your (my) own version you may getting trouble with support from them, even my changes in the firmware are minor ones (activating a feature, changing baud and adding languages to it).

Also i am running quite often a 'alpha, beta' version so it is quite a bit of work to publish different versions of it.

If i publish them it will be a
- 3.0.10 with the default FILAMENT_RUNOUT_SENSOR (meaning P3 pin 4 and pin 6) including German/Dutch translation.

- 3.0.10-9 with the default FILAMENT_RUNOUT_SENSOR pins, 250000 baud communication setting, German/Dutch translation and my PID settings as default values for nozzle and bed.

BTW the 3.0.10-9 (aka 3.0.11-alpha) is looking great including PID tuning of the nozzle through the LCD menu, and PINDA temperature tuning also via the LCD menu. Especially the last one hopefully helps with PINDA detection with different bed temps, i have a quite big Live-Z difference between 50°C and 100°C.

As soon you upload the firmware YOU HAVE TO use the P3 pin4 and pin 6 connection otherwise the printer will not print!!! There is no menu point to activate/deactivate that feature.

Just have to think where i can publish them the best. I let you know when i have them ready.

Like the idea with a kind of trip wire, would be great if we could use another pin to get both functions if needed.
Thinking about it ... putting two switches in serial should also work with just one pin, just have to be careful with wiring up.

Veröffentlicht : 19/04/2017 9:06 pm
Seite 1 / 3
Teilen: