Welcome! Log In Create A New Profile

Advanced

Custom Optical Filament Sensor/Alarm Module

Posted by OnAShoestring 
Custom Optical Filament Sensor/Alarm Module
December 05, 2016 02:28AM
Hai Guise! =)

I built a 3D-printable custom IR filament encoder accessory for my 3D printer (Marlin i3 clone). I happen to think it works quite nicely but I am trying to adapt it for mass-market appeal.


Overal information is here: http://www.filamentroller.com/ and video here: https://www.youtube.com/watch?v=W87pq1EB6jY
It can work as a stand-alone sensor/module but it also has encoder outputs, an error GPIO output, and a remote shutdown input. I am designing it to work as a stand-alone sensor/alarm, a drop-in replacement for a filament runout sensor, or a remote sensor that can be controlled from your printer software directly (or OctoPrint, &c).
You can find the basic interface specifications here: http://www.filamentroller.com/specifications/

I am pretty weak on software and I also haven't any modification experience with RepRap printer software. If anybody can tell me how hard they think it would be to integrate with their printer, it would be much appreciated.

If you guys think this is a good idea, a bad idea, or I'm not making sense then please post your comments and questions. I don't have anything up for sale but I hope to eventually start a Kickstarter with the best design possible. You can already download the mechanical parts for free on Thingiverse: http://www.thingiverse.com/PrintOnAShoestring/designs

Thanks for looking,

=)


[www.filamentroller.com]
Re: Custom Optical Filament Sensor/Alarm Module
December 05, 2016 04:56PM
I added a filament movement sensor to my CoreXY printer.

See below, may give you some more ideas.... Cheers

[forums.reprap.org]
Re: Custom Optical Filament Sensor/Alarm Module
December 06, 2016 02:15AM
Hey, Pioneer!

You have a nice & tight design, and a whole year ahead of me, too! I noticed we ran into a lot of the same problems: plastic not blocking IR, retraction, grip on the filament (rubber), adding a switch, &c. I have to pay you a compliment, I would never have thought of laser-printing a code wheel. That is super-clever, and very effective. I rattle-canned my way out of that problem. =)

And you are so generous for sharing your work. Thank you so much! =)



AAAAaaand, no good deed goes unpunished; can I bug you with some questions? I know you must be busy so ofcourse you don't have to answer them.
1) You said that adding another encoder was added cost with marginal benefit. On my setup, I was able to get LED(1)+photodiode(2) for less than $2. I looked up your search terms on Ebay and saw various prices. I'm not sure which unit you used. Do you happen to remember off-hand how much your sensor cost?
2) After using your prototype for 1 year, is there anything that annoys you and you wish you had designed around?
3) Without spending any time thinking about it, do you immediately see anything that would put you off from buying my design? (I plan a target price of $40 for board, bearings, hardware, and a printed&painted wheel.)

Thanks so much for sharing. I really appreciate it!

=)
Re: Custom Optical Filament Sensor/Alarm Module
December 12, 2016 11:28PM
Hi On A Shoestring,

1. I used single photo sensor as that's all I could find at the time on ebay.. Its listed as a - " Optocoupler Speed Sensor Module LM393 for Arduino " price US$0.99.
I don't see that you really need to monitor retractions, just that you have filament feeding when it should, but you could use dual photo sensors and monitor forward and reverse movement.

2. What I would like is to have the filament monitor connected to a transmitter and then have a small receiver that you can carry around the house and outside that would beep softly and flash a LED every 15 seconds to indicate that printing was happening and in the event of a filament jam continuously beep loudly and keep the Led on.

3. I wouldn't go with the spool design sensor that the roll sits on, looks a bit messy and there a a number of different spool sizes out there. I'm more for the unit that the filament can feed though and there is only 2 sizes of filament normally being used..


One of the main things that I found was that the reason for most filament jams is poor quality hot ends, I changed mine from a all metal to one that has a liner and now don't have any major jamming issues.
Also use a bit of foam that the filament runs though which stops any dust or hair getting into the hot end.
I have found that the odd roll of filament that just randomly breaks.

Still think its good to have a sensor that checks that the filament is moving when it should.

I hope the information I have shared helps you and others.

Cheers REPROT.
Re: Custom Optical Filament Sensor/Alarm Module
December 13, 2016 04:50AM
You can save yourself a little trouble when you market these- everyone you're going to sell to has a 3D printer- they can print their own optical discs. Picking up on the wireless alarm idea, why not have it connect to the internet via wifi and send SMS message or email to the user's phone which they are probably carrying around all the time anyway?

My extruder has been pretty reliable in terms of jams (BullDog XL and E3D v6), but since it has been at the makerspace and getting used by other people, there have been several filament-out occurrences. I designed a filament -out sensor that holds a microswitch and mounts near the filament spool. The filament feeds through it and keeps the switch closed. When filament runs out or breaks between the spool and the sensor, the switch opens. I'll be wiring it to the machine's controller board today. See: [www.youmagine.com]

Monitoring filament motion catches jams and filament break/run-out which is nice, especially if you have an unreliable extruder, which seems pretty common, based on posts I see about jamming. The only problem I see with using the optical approach is that it has to be relatively slow. For example, if someone is printing thick layers at high speed the wheel will be turning relatively fast because they are using filament fast. If they are printing thin layers very slowly to maximize print quality, the wheel will move slowly. You have to set the detector up for the worst case condition which will take a while to detect either filament jam or break. You can help it a bit by assuming that there's no jam or run-out at the start of a print, and use the first few opto interrupt signals to auto-tune the detector to the printing conditions- if the print is slow and thin, set the watchdog timer count higher, if the interrupts come faster- fast print, thick layers- make the count shorter. Of course, many people print the first layer much slower than the rest of the print, so you're going to end up tuning it for that first layer speed. The optical wheel doesn't differentiate between a jam and a filament-out condition so they will take the same amount of time to detect. Adding a mechanical switch to the thing will detect filament-out instantly, and give some chance of resuming the print where it stopped, depending on the controller board.


Son of MegaMax 3D printer: [www.instructables.com]
Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Custom Optical Filament Sensor/Alarm Module
December 14, 2016 05:55AM
Quote
RepRot
Hi On A Shoestring,

1. I used single photo sensor as that's all I could find at the time on ebay.. Its listed as a - " Optocoupler Speed Sensor Module LM393 for Arduino " price US$0.99.
I don't see that you really need to monitor retractions, just that you have filament feeding when it should, but you could use dual photo sensors and monitor forward and reverse movement.

2. What I would like is to have the filament monitor connected to a transmitter and then have a small receiver that you can carry around the house and outside that would beep softly and flash a LED every 15 seconds to indicate that printing was happening and in the event of a filament jam continuously beep loudly and keep the Led on.

3. I wouldn't go with the spool design sensor that the roll sits on, looks a bit messy and there a a number of different spool sizes out there. I'm more for the unit that the filament can feed though and there is only 2 sizes of filament normally being used..


One of the main things that I found was that the reason for most filament jams is poor quality hot ends, I changed mine from a all metal to one that has a liner and now don't have any major jamming issues.
Also use a bit of foam that the filament runs though which stops any dust or hair getting into the hot end.
I have found that the odd roll of filament that just randomly breaks.

Still think its good to have a sensor that checks that the filament is moving when it should.

I hope the information I have shared helps you and others.

Cheers REPROT.

Thanks for answering my Q's, I appreciate it. I agree with you on #2, that would be a nice feature.

I agree that
Re: Custom Optical Filament Sensor/Alarm Module
December 14, 2016 06:14AM
Quote
the_digital_dentist
You can save yourself a little trouble when you market these- everyone you're going to sell to has a 3D printer- they can print their own optical discs. Picking up on the wireless alarm idea, why not have it connect to the internet via wifi and send SMS message or email to the user's phone which they are probably carrying around all the time anyway?

The wheel needs to be painted to block IR. I figure a lot of people aren't going to want to bother doing that bit. =/

The wireless idea is nice, but it's an order of magnitude more work and expense to implement. Maybe next version =) For now, making it compatible with OctoPrint is a step in the right direction towards making it internet-connected.

Quote
the_digital_dentist
My extruder has been pretty reliable in terms of jams (BullDog XL and E3D v6), but since it has been at the makerspace and getting used by other people, there have been several filament-out occurrences. I designed a filament -out sensor that holds a microswitch and mounts near the filament spool. The filament feeds through it and keeps the switch closed. When filament runs out or breaks between the spool and the sensor, the switch opens. I'll be wiring it to the machine's controller board today. See: [www.youmagine.com]

Monitoring filament motion catches jams and filament break/run-out which is nice, especially if you have an unreliable extruder, which seems pretty common, based on posts I see about jamming. The only problem I see with using the optical approach is that it has to be relatively slow. For example, if someone is printing thick layers at high speed the wheel will be turning relatively fast because they are using filament fast. If they are printing thin layers very slowly to maximize print quality, the wheel will move slowly. You have to set the detector up for the worst case condition which will take a while to detect either filament jam or break. You can help it a bit by assuming that there's no jam or run-out at the start of a print, and use the first few opto interrupt signals to auto-tune the detector to the printing conditions- if the print is slow and thin, set the watchdog timer count higher, if the interrupts come faster- fast print, thick layers- make the count shorter. Of course, many people print the first layer much slower than the rest of the print, so you're going to end up tuning it for that first layer speed. The optical wheel doesn't differentiate between a jam and a filament-out condition so they will take the same amount of time to detect. Adding a mechanical switch to the thing will detect filament-out instantly, and give some chance of resuming the print where it stopped, depending on the controller board.

Mmmm. You can adjust the alarm delay from 3 to 48 seconds using the potentiometer (blue box) in the gif above. You can set it for whatever speed your printer is running, whenever you want.

Also, even at 48 seconds, you're going to have a decent length of filament to run through before the remaining filament runs out. I usually print at 20-60mm/s and I set the alarm somewhere between 9-15 seconds. I've never come close to running dry. The error-GPIO output should mimic the same output as your microswitch.

That said, you have a nice sensor and a really nice printing setup. I appreciate your comments and I'm sorry for the delay in answering. =)
kr_
Re: Custom Optical Filament Sensor/Alarm Module
December 29, 2016 08:18AM
If your goal is to prevent filament problems, you should also do something against dust and moisture. You could enclose everything in a transparent box, include a micro dehumidifier and some dust wiping tool at the filament exit.

I chose less overkill solutions on my side. My extruder is reliable enough to never encounter filament problems like jamming, shewing the filament etc... I put my filaments in a plastic bag with silica gel when not printing to keep it dry. I attach a piece of cloth to the filament where it enters the printer, against the dust.

The only problem left was knowing if I have enough filament left on my spool to run day long prints without interruption. So I added an EEPROM to store a filament database. I modified my Marlin firmware to manage the database and update the filament usage while printing (the database is updated every half meter extruded). I can check how much filament is left on every spool I have before choosing one and launching a print. I simply calculate the length of the new spools from their weight, diameter and the density given by the manufacturer. The calculated and measured length got pretty close so far.
Re: Custom Optical Filament Sensor/Alarm Module
December 30, 2016 03:43AM
Quote
kr_
So I added an EEPROM to store a filament database. I modified my Marlin firmware to manage the database and update the filament usage while printing (the database is updated every half meter extruded). I can check how much filament is left on every spool I have before choosing one and launching a print.

Very nice solution. It sure would be nice to see that capability become more widely available. I wonder how much rfid tags and readers are now? If we could clip a tag to each new spool and have the printer recognize it when we mount it on the printer and display the remaining filament length that would make life much easier.

Edit: Looks like reader modules are a couple of dollars and tags are about a dollar each - and come with plenty of memory on board, so the data can be held in the tag if that is convenient. Looks very doable!

Edited 1 time(s). Last edit at 12/30/2016 03:54AM by JamesK.
kr_
Re: Custom Optical Filament Sensor/Alarm Module
January 01, 2017 03:45PM
I like the RFID idea! I thought about it too but I needed to come up with a database solution quickly when I made it. This RFID module seems to be perfect to expand my database solution since it's already using the I2C ports to communicate with the EEPROM. The matching RFID tags are dirt cheap !

I'll make my database solution public when I find some time to put it on GitHub.

Edited 1 time(s). Last edit at 01/01/2017 03:51PM by kr_.
Re: Custom Optical Filament Sensor/Alarm Module
January 05, 2017 01:43PM
Quote
kr_
If your goal is to prevent filament problems, you should also do something against dust and moisture. You could enclose everything in a transparent box, include a micro dehumidifier and some dust wiping tool at the filament exit.

I chose less overkill solutions on my side. My extruder is reliable enough to never encounter filament problems like jamming, shewing the filament etc... I put my filaments in a plastic bag with silica gel when not printing to keep it dry. I attach a piece of cloth to the filament where it enters the printer, against the dust.

The only problem left was knowing if I have enough filament left on my spool to run day long prints without interruption. So I added an EEPROM to store a filament database. I modified my Marlin firmware to manage the database and update the filament usage while printing (the database is updated every half meter extruded). I can check how much filament is left on every spool I have before choosing one and launching a print. I simply calculate the length of the new spools from their weight, diameter and the density given by the manufacturer. The calculated and measured length got pretty close so far.

Have you seen this?
[www.kickstarter.com]

It is similar to your implementation, minus the micro-dehumidifier.

I also use the ziploc+silica deal when storing my filament for long periods of time. Even so, I haven't had any problems with popping. I don't live in a jungle, I guess? =)

However, the big thing I try to avoid is using purely software solutions. Bugs, portability, it just doesn't work for me (I'm sure your implementation doesn't have bugs). Also, the bunker project failed, possibly because it didn't focus clearly enough on achieving a single purpose? Cost? I don't really know =/

I should say, that this project of mine is half-tinkering, half-marketing. I want to see how hard it is to market and sell, not just build something. So, I have to consider what an end-user might be capable of doing with this in their home and making it as easy-to-use, as possible.

Regardless, your suggestion is pretty good (thanks!). There are some other projects on Kickstarter for printer-enclosures and filament cases. Once I get my Kickstarter thing started (hopefully next week), I can contact some of those guys and see if they are interested in adding my sensor to their project, or maybe their next version. That way I can focus on my one thing.

=)
Re: Custom Optical Filament Sensor/Alarm Module
January 27, 2017 11:01AM
The Filament Roller Kickstarter Campaign

I've got a Kickstarter campaign started for this concept.

I can't add wireless to your phone, but if you have an idea then just submit it and if I can add it without significantly increasing the unit cost then I will do so.

So far, I've tested this with Marlin 1.1.x as an endstop sensor, and with OctoPrint (filament sensor plugin) and they both work fine.

I haven't directly tested it with Repetier, but it shoud work well with that as well (quadrature output).

Please check out my campaign!

=)
Sorry, only registered users may post in this forum.

Click here to login