Report as Inappropriate

You are reporting a comment on Filament Width Sensor Prototype Version 3 as a violation of the Thingiverse Terms of Service. Thank you for taking the time to bring this matter to our attention. To help our team best respond to this issue please take a few moments to describe what brought this matter to your attention.

I am sure it is possible, but I think my head will explode if I try to figure out how Repetier firmware works in addition to Marlin. It took me about 6 mos to figure out Marlin enough to make changes, and its a constant effort to stay up to date on the Marlin code base. Here is how I would approach it though:

  • find the code where the extruder temp is read from the A to D converter and use the same design to read the filament sensor on a free A to D channel.
  • find the code where each gcode extruder command is converted into the stepcount for the move and insert a factor based on the filament diameter like (expected_dia/measured_dia)^2 so that the stepcount sent to the move planner is modified.
  • find where the gcode text commands are interpreted and add some new mcodes so that you can turn on/off the filament control and modify its behavior.

If you can get that to work, then refine by adding the ring buffer to handle the filament transit distance (distance from where the sensor measures the filament to where the filament melts in the barrel).