Filament diameter sensor

Hello

I am very fascinated by the concept of a filament diameter sensor.

These are available parts online, people do make and use them.

What would I have to do in order to implement the sensor into the snapmaker 2?

Is there a way to harness one of the ports on the hub to add this variable to the gcode?

It seems like so many of my spools have filament diameters that vary by the foot, and often times are oval in shape.

This is causing my prints to have both over and under extruding at the same time!

Buy better filament.

What brand are you getting? It shouldn’t be varying that much that it is affecting your prints.
Does the manufacturer list a tolerance? Any good one should. I know PRUSA and Filamentone state their tolerances. PRUSA you can even check your specific roll online.

-S

Yes, I realize that better filament would be better, but there is always going to be a variance and I have like a dozen spools of garbage along with a few good ones to consume.

All of my spools have a listed tolerance of no more than .03

Reality shows that this doesn’t work out well, even for good brands.

I have hatchbox, overture, snapmaker, priline, gizmodorks, ic3d

Priline and IC3D seem to be the best hatcbox is pretty good

I think it would be awesome to be able to implement a filament diameter sensor, and they are a thing - but the question is how can I get the values to the machine.

Gcode does support this feature as well, but the value needs be communicated somehow.

The ones out there I’ve seen only measure a single diameter, meaning they’re having to assume good circularity.

Marlin has support for thickness detectors, but SM isn’t running stock Marlin. SM has published controller code but not the module code, so you’d have to find some way of getting a signal back to the controller. And then you’d have to figure out how to do the calibration. And then it still wouldn’t work for cheap out-of-round filament.

This. It’s cheaper to do this, even if you simply discard the cheap filament you’ve got. Consider better filament a hidden cost of this machine.

Just so you’d have an idea of what you’re up against, assuming the filament is perfectly round:

You’ll need to get the sensor data into the controller. The cleanest way would be make a custom CAN device you can plug into to Add On 2 or something using a spare cable. Of course you’ll need to make a PCB with a microcontroller on it to serve as the local CAN translator.

Then you’ll need to add new main controller firmware functionality to communicate with that device to get the realtime diameter.

Then you’ll need to tie into the base Marlin volumetric extrusion formula so that it’s recalculated every time the sensor changes by a certain delta.

Then you’ll need to update all of your slicers to export volumetric extrusion rather than linear extrusion.

None of these steps are especially difficult, but they are far from simple.

A more simple way would be get the sensor data into a computer, and have the computer automatically issue the M200 filament diameter gcode. As best I can tell that would not require any firmware changes, as M200 is enabled in the SM firmware.

This sounds like a feasible path.

It may be a bit ambitious but sure would be an awesome feat.

I could use a com port from a logic controller to present the m200 commands to the unit.

Something to think about anyhow… Thanks for the information