Laser filament monitor
-
Why do we want/need a filament sensor?
Me personally, to stop the print if the flow of filament stops for any reason, e.g. due to a clocked nozzle.
If the sensor can measure the exact length of filament extruded, that would be totally cool and open the door for dynamically maxing out the feeder speed for any filament. That would be a dream come true…
But, how about making that a requirement for filament sensor v2?
For starters, detection of that blocked nozzle can probably be accomplished with less fancy measures, and likely cover the immediate needs of most users. How about adding a timer? If no movement is detected within 1-2 seconds of the stepper engaging, then something might be wrong. This should greatly reduce the sensitivity requirement for any type of sensor. Due to the normal pressure between extruder and nozzle, a short period of time should have no significant impact on the ongoing print, as filament will still be flowing.
-
The ultrasound idea from Markdnd is interesting, but isn't it so that ultrasound transducers have problems with linear movement? They detect rotation (not possible in this scenario) and radial movement, but an object passing by in a straight line is not so good.
I might be wrong, but believe that an ultrasound solution would require a mechanism to "wobble" the filament on its way past the transducer. If that is accomplished, then a disc type transducer might work. These are used in many applications, e.g. string music instruments, and are available in diameters down to about 10mm. They are also very thin and cheap.
-
The primary reason I want filament monitors is to detect inadequate filament feeding, whether from partially blocked nozzles, clogged hobbed wheels, tangles or some other cause. I have never yet had filament break, and I generally know if there is enough on a reel for the print at hand.
I designed and built a filament sensor that worked very well on the Zesty Nimble and e3d Chimera equipped cartesian printer I upgraded from RAMPS to Duet. These used multiple tiny (1mm diameter) magnets and hall effect sensors to provide 12 pulses per revolution (about 7mm filament feed). It was fully reliable and detected filament feed issues of all types and worked with PLA, ABS and PETG filament without issue.
Photo shows a dual mount with the right hand sensor installed. The tiny magnets are just visible.
Unfortunately these were not compatible with the Duet and I simply don't have the skills to write the necessary code to do this so am keenly awaiting the Duet version.
(edited to add) Although I never implemented the second sensor, the boards I used are rotary encoders so can detect forwards or backwards movement and could thus measure retracts and normal feed. I'd be very happy to share the designs if anyone wishes to do the software to enable them to work with the Duet.
Richard
-
For me, a filament sensor would be invaluable for those times when, despite my best efforts, the filament jams on its spool and the printer carries on printing without any extrusion totally messing up any chance of recovery. (Even if I spot it quickly).
A simple filament presence sensor wouldn’t work - the filament is still there, its just not moving. Stall detection may pick it up but for softer and flexible filaments the extruder will probably just grind on anyway. (Probably literally!)
As for the technology, my knowledge of ultrasonic sensors is limited to say the least but, as I understand it there are two main ways these things operate:
The first measures time of flight between a single pulse and its echo and is typically used in range finding and obstacle detection applications. These are the the type commonly sold for robotics and automation and treat the object being monitored as being stationary (which, if the ping rate is high enough, it effectively is)
The second uses the doppler effect on multiple echoes to detect movement. This is the kind used to measure flow rates of liquids and fluids in pipes and is also used in some alarm sensors. Unlike TOF sensors, the object doesn’t need to be precisely aligned with the sensor. (Which is good because in our case the “object” is actually minor differences in internal density in the filament)
At its simplest, an object approaching the sensor increases the observed echo frequency in proportion to its speed. In theory a sensor pointed at a steep angle will pick up reflections from minor deviations in the internal structure of the filament.
I don’t think that a wobble mechanism is needed and, in fact, lateral movement probably needs to be minimised. (Though I’m not familiar with the string instrument application so dansker61 may be making a valid point)
I should point out that this is a massive simplification and omits a lot of the “real world” practicalities. For example signal processing of some sort will probably required to extract usable data from the noise but there are microcontrollers such as the dsPIC series of microcontrollers from Microchip that are specifically designed for digital signal processing and have fourier analysis libraries available for them.
In short it’s an idea, based on a real world application, intended to encourage a bit of experimentation and maybe offer an alternative solution. (I may even dig around in my electronics junk box this weekend myself)
-
If the doppler solution proves impractical I don’t know if a contact microphone has been considered.
The arrangement i have in mind is something along the lines of the filament running through a felt pad. A small microphone attached to the pad would pick up the sound produced as the filament moves, once again frequency would be proportional to speed.
A side benefit would be the cleaning of the filament, though unfortunately this would also require periodic pad replacement (though an upstream sacrificial pad could minimise this).
A second microphone may also be necessary for noise cancelling but this is well established technology.
For my application, precision speed measurement is less important than reliable movement detection so even a crude method like this may actually be sufficient.
-
Throwing in my $0.02 to say that I'd also buy a sensor that detected that movement was happening, but wasn't necessarily able to quantify exactly how much. Just last night I had a print fail due to a jam (still don't know why…), and would certainly love to be able to detect a situation like that.
-
I would also agree, the most important failure modes are:
-
out of filament: spool empty
-
nozzle jam: no movement at all (at least not forward, retracts do not count)
Detecting under-extrusion or skipped steps would be nice, but I there is no real benefit anyway. With the other two cases one can at least pause and continue after fixing the problem. If a super accurate sensor detects under extrusion of 85% - what would one do? automatically bump up the extrusion multiplier? that sounds far too advanced that I would trust it with a 50 hour print…
Just for reference, what does Prusa use the laser filament sensor for? AFAIK they also only cover the two big (and easier to detect) issues.
-
-
Why not combine the magnet sensor and the laser sensor?
Use a toothed idler, being driven by the filament, with a pattern for the laser to pickup. If you can find the right material and pattern on the idler, once you get it right, every filament will perform identically. It reduces the number of mechanical parts, but gives consistent readings via the laser.
-
The prussa monitor has mixed reviews….
-
The prussa monitor has mixed reviews….
Have you a link?
I looked at the code that Prusa uses. It checks that when forward extrusion is commanded, forward filament movement is detected. It doesn't attempt to correlate the amount of movement with the amount of extrusion commanded.
-
-
David, to help detect the tricky filaments, what about using a little lens to magnify the image of the filament?
-
Yet another idea (sorry)
From the sound of things the magnetic sensor is based on a magnet and hall effect sensor arrangement which suffers from alignment issues.
Have you considered / tried a resolver solution where you have a magnet rotating inside a coil. Alignment is far less critical and you could create a simple movement detector by smply using a voltage sensor to drive a limit input.
If you want something more complex that could be used to measure speed and extrusion distance there are off the shelf chips to interface with them.
-
Detecting under-extrusion or skipped steps would be nice, but I there is no real benefit anyway.
Just to highlight another opinion, I want to accurately detect motion so I can write a macro that works through a series of speeds and temperatures to profile a new roll of filament to determine volumetric extrusion limits. Also seems like if you are looking for automatic monitoring to save a 50 hour print, you need a manual solution for out of filament or nozzle jam so why require an automatic response for under extrusion?
From the sound of things the magnetic sensor is based on a magnet and hall effect sensor arrangement which suffers from alignment issues.
Not clear to me that the alignment issues could not be solved by a better housing for the rotating magnet system?
Also seems like Duet3D could just design and sell different option circuit boards with the firmware to hook them up? Another design would be a rotating encoder with LED sensor (like the old computer mice), using a mechanical linkage to the filament like the rotating magnet sensor. There will be pros and cons for all the designs, just depends on what the user is after as to which works best.
-
The magnet sensor version worked great until the assembly shifted a small amount and the I got a false trigger. However an injection moulded or machined assembly or a more optimised printed design would solve this problem.
-
what about sls nylon to print the enclosure for the magnetic sensor? I know forms for injection molding add a significant cost/risk to the project, and machining is probably even more expensive.
-
The magnet sensor version worked great until the assembly shifted a small amount and the I got a false trigger. However an injection moulded or machined assembly or a more optimised printed design would solve this problem.
-
I am appealed by the idea of the use of the filament monitor as contactless displacement sensor and the implementation of a Kalman filter to increase accuracy. My Idea is to mount the sensor on the X and Y belts.
My reasoning is that the optical sensor counts could be used as a tachometer to measure velocity. Both the velocity and position information already present on the system can be combined in a Kalman filter to compute the position with higher accuracy. It will be particularly accurate because the sources of noise are unrelated (little noise cross correlations), i.e. the error biasing any one estimate due to position errors will be mitigated by velocity and vice versa. With this technique we could beat the 1.8 or 0.9 degrees per step resolution.
-
With this technique we could beat the 1.8 or 0.9 degrees per step resolution.
Isn't this what microstepping is for?
Unless your rotation sensor is geared etc so it can beat 1/16 or more of that step resolution (a direct magnetic rotation sensor isn't nearly that accurate) you won't have any more info than you can already derive from the controller by simply asking for it's current position. You can detect missed steps, but the controller already does that for you because the controller already does some of the feedback sensing you are looking for.
- I'd be more interested in an acceleration sensor in the printhead and feeding back max/min readings from that, then adjusting speeds to keep within boundaries and limits based on this direct observation. Eg Closing the loop with real data, monitoring the belt wont help detect loose belts or sliders snatching/stiction, but an accelerometer would.
-
Development of the laser filament monitor has stalled because we are too busy with other things at present. We might be willing to supply one of our prototypes to a user who meets the following conditions, to try to speed up finishing it:
- Must have a functioning 3D printer and a supply of black PLA to print small parts with;
- Must have enough experience of OpenSCAD to modify an existing design and preferably do new designs;
- Preferably either be located in the UK or have experience of programming an attiny microcontroller e.g. with an AVRISP Mk2 or an Arduino running ArduinoISP + 6-pin programing connector.