1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Filament Measurement to vary extruder feedrate

Discussion in 'Mods and Upgrades' started by Ziggy, Oct 22, 2014.

  1. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    I noticed in the recent GitHub Marlin release three new gcodes have been added to handle variation in the filament diameter.

    · M405 - Turn on Filament Sensor extrusion control. Optional D to set delay in centimeters between sensor and extruder

    · M406 - Turn off Filament Sensor extrusion control

    · M407 - Displays measured filament diameter

    Some time ago I developed a filament diameter measurement prototype based on a high resolution linear CCD. The Linear CCD is in a light tight box illuminated by a point led source. The filament shadow on the CCD is measured using a high resolution digital technique. The practical resolution is better than 0.001mm.

    The theoretical accuracy is also to +/- 0.001mm but it is difficult to find something to calibrate against to that level of accuracy. To put this into perspective, 0.001mm is about 1/70 the diameter of a human hair and about the size of soot particle! My micrometer also only measures to 2 decimal digits.

    The filament diameter measurement is output continuously to an LCD display, serial port (USB) and as a voltage on an analog port. Marlin actually would use only the voltage output.

    The prototype was developed with the idea of using it to control a filament extruder (eg like the FilaStruder) to keep the filament diameter within tolerance. Now that the filament measurement is built into Marlin there may be some use for it in this application.

    TBH I don’t think there is much use for something that measures filament diameter going into the extruder. If the quality of the filament is so poor that the diameter is varying enough to warrant changing the extruder feed/flow rate, then I would suggest buying good quality filament is a far better solution.

    But what do others think. Would it be worthwhile to measure filament diameter as it goes into the extruder?
     

    Attached Files:

    #1 Ziggy, Oct 22, 2014
    Last edited by a moderator: Oct 23, 2014
    3 people like this.
  2. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    I would agree with your principle of getting better quality filament is a better solution than worrying about minor filament fluctuations. Though the filastruder comment is apt and would make it print better. Or just making your own filament from recycled material.

    The biggest situation I could see if if you were running a continuous feed from pellets to the extruder through a filastruder type device. Obviously controlling the flow from this would be difficult without complex controls and VFDs etc, but it is in theory possible. The only other variable assuming you can speed match the flow would be filament diameter. Instead of trying to maintain a super precise filament diameter this gives you an added degree of freedom in that the fluctuations in speed from the filastruder device would produce inconsistent diameter, so you can control it a little better.

    I don't really think it's necessary if you're using storebought filament. the +-.005mm fluctuations wouldn't be enough to justify.
     
  3. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    A quick word, as I have one of these - the practical accuracy is nothing like 0.001mm. I would say at BEST, 0.01mm. Probably more like 0.05mm.

    The trouble is that it is very difficult to hold the filament right up against the sensor as it passes through, and if the filament is allowed to move towards the light source, that increases the size of the shadow.

    Also, a properly set up Filastruder has no problem matching or beating commercially available filament - especially when paired with a winder. But that's off topic.
     
  4. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275
    Correct me if I'm wrong tim, but if you were trying to speed match the feed rate with the flowrate from say a filastruder, wouldn't that result in variable filament diameter?

    As I understand it filament diameter is a function of packing density of the pellets and a consistent feed rate.
     
  5. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    Mike - you're absolutely right, changing the auger RPM will impact output diameter, though ideally you'd have PID control over the whole process and a loop (accumulator) for the filament so the RPM wouldn't change very much.

    My comments were directed more at the OP.
     
  6. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530

    Tim

    You can not possibly have one of these.

    As I pointed out, it is my own original design using a Linear CCD and digital measurement.

    You probably have the one from thingiverse?

    http://www.thingiverse.com/thing:454584

    If so, I agree, it does not have anywhere near the same resolution or accuracy.
     
    #6 Ziggy, Oct 23, 2014
    Last edited by a moderator: Oct 23, 2014
  7. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    By "one of these", I meant a sensor based on a linear CCD. They operate on the same principles, casting a shadow on a CCD. It is extraordinarily difficult to hold the filament a constant distance from the sensor. In practice, the filament is not perfectly straight, it curves, and the force applied to it on the input and output is nonuniform.

    Real laser micrometers measure the time it takes to scan across a piece of filament, which is significantly more accurate. Here's a decent overview:

    http://www.mitutoyo.nl/upload/file/...ter/LaserScanMicrometer_E4156-544_website.pdf

    If the casting a shadow method worked well, then why would Mitutoyo bother with the scanning method to achieve similar accuracy (note: even mitutoyo does not guarantee accuracy on a global basis)?
     
    #7 elmoret, Oct 23, 2014
    Last edited by a moderator: Oct 23, 2014
  8. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Tim

    Which particular Linear CCD design are you referring to?

    I don't think you have considered using a collimated light beam (like many of the laser scanners) so the filament distance from the CDD is less of a factor.
     
  9. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    You said a point source, and an LED. Point sources by definition are not collimated. (and LEDs aren't really point sources, for that matter)

    If you are truly collimating then what I have is different from what you have, I agree - but your first post doesn't describe your setup accurately if that's the case.

    tl;dr: collimation helps, was not mentioned in OP
     
  10. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Actually I used a collimated source for some tests and found it made stuff all difference compared to a point source at a reasonable distance. And a led can approximate a point source if masked properly.

    And re scanning v shadow alternatives, the shadow technique requires a light tight enclosure but no moving parts. Laser scanning will work better in the open but requires precision optics and mechanics. Which is better depends on the situation.

    Need also to keep in mind I am talking about a Linear CCD design with off the shelf parts, no moving parts and a BOM <$30.

    Mitutoyo are producing industrial grade, specialist laser micrometer instruments with a certified accuracy of +/- 0.01um or better. Their spec is in um not mm - 100 times better accuracy than this CCD design. Price tags for their instruments are a little higher than $30 as well.
     
    #10 Ziggy, Oct 23, 2014
    Last edited by a moderator: Oct 24, 2014
  11. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    BTW If anyone is interested in a well thought out filament extruder with filament diameter measurement feedback control

    http://www.thingiverse.com/thing:380987

    It is not feasible to add this kind of filament diameter control to a FilaStruder without complete replacement of the electronics.
     
    #11 Ziggy, Oct 24, 2014
    Last edited by a moderator: Oct 24, 2014
  12. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34

    Well, this is incorrect on a few levels.

    The only electronics on a Filastruder control the temperature, so there's no need for replacement.

    Even with feedback control, Lyman reports +/-0.1mm with ABS. I wouldn't call that very good.

    Lyman also reports his sensor doesn't work with PLA, and that his PLA tolerances are even worse:

     
    #12 elmoret, Nov 11, 2014
    Last edited by a moderator: Nov 11, 2014
  13. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    To control the temp using feedback the PID controller module (ie the electronics) would need to be replaced with a software based controller.

    Re the rest - Lyman is probably just being honest.
     
    #13 Ziggy, Nov 11, 2014
    Last edited by a moderator: Nov 11, 2014
  14. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    Are you implying I am being dishonest? Here's some examples of users reporting Filastruder filament tolerances for ABS:

    +/-0.02mm:
    http://www.soliforum.com/topic/7430/abs-mg94-and-gp35-review-and-comparison/

    +/-0.05mm:
    http://www.soliforum.com/topic/7142/gp35-review/

    +/-0.03mm:


    +/-0.02mm:
    http://www.soliforum.com/post/60992/#p60992

    +/-0.02mm: (scroll to the bottom, he had bad calipers)
    https://plus.google.com/115833692763334124813/posts/ZNfcM5FVohx
     
    #14 elmoret, Nov 11, 2014
    Last edited by a moderator: Nov 11, 2014
  15. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    This would be a poor approach, there's a lot of thermal mass (so its a very low bandwidth system, high time constant) and you can hold the temperature constant and still see diameter vary. Controlling the temperature in an effort to control diameter would not work.

    Industrial extruders monitor diameter and control pull rate, same as Lyman. This is the variable to control if you're feeding back diameter, its already far too late to do anything about it with temperature once its exited the nozzle.
     
    #15 elmoret, Nov 11, 2014
    Last edited by a moderator: Nov 11, 2014
  16. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    I am sure you would be ware that Lyman includes temperature in the software tune menu and does not use a separate PID module. I just haven't looked at the his software to know to what extent plays in the feedback control.
     
  17. elmoret

    elmoret Filastruder

    Joined:
    Apr 1, 2013
    Messages:
    44
    Likes Received:
    34
    Yes, the temperature PID loop senses temperature and adjusts heater power.

    The filament diameter PID loop senses filament diameter and adjusts pull rate.

    They're both SISO PID loops, which is why I said there would be no reason to replace any of the Filastruder electronics.
     
    #17 elmoret, Nov 11, 2014
    Last edited by a moderator: Nov 11, 2014
  18. nickster

    nickster Member

    Joined:
    Oct 7, 2013
    Messages:
    82
    Likes Received:
    52
    So Ziggy, keep holding me in suspense! Where the BOM and Schematic?:rolleyes:
     
  19. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    #19 Ziggy, Nov 25, 2014
    Last edited by a moderator: Nov 25, 2014
  20. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,275

Share This Page