Here's my printable optical encoder wheel filament sensor!
-
@T3P3Tony said in Here's my printable optical encoder wheel filament sensor!:
but as you say the firmware knows that as its commanding the extruder to move in that direction....
Yes, there's no "external system" that measures the pressure and reverses the motor direction without firmware knowing about it. The motor is directly controlled by the firmware hence firmware knows the direction motor is turning.
So the question is can a pulse extruder be configured to work more accurately if the firmware takes into account the current commanded direction of the extruder and then assumes that any pulses relate to movement in the direction commanded.
As I said it's virtually impossible for direction of filament to be different than direction of the motor. Also, I think I did ask when I first looked at the "e_stop" input if the firmware uses the motor direction to properly handle retractions as there is no direction pin, and I think dc42 replied that it does or there was no reply at all so I assumed it does, I don't remember and I can't find that post any more.
I always assumed that direction is fetched from the motor direction, and before PA it does look ok, seems that retractions are handled properly (even a rather long retraction), but looking at mentioned thread looks like PA messes it up, so it's possible that for retractions the direction is considered but for PA direction is not considered and just need to be "fixed" (the question is how quick that fix is, I don't feel comfortable assuming anything is easy/hard to fix till I get myself familiar with the code).... now, I do have some gaps in workflow these days that I can use for some development... doing a quick "read encoder, shoot data over spi/i2c/usart/1wire.." should be super simple if the protocol is described somewhere or example (existing sensor) is not too cryptic
-
looking at the
dc42
A1 means that extrusion will not be measured during retraction moves. it will still be measured during the whole of a move in which extrusion is commanded, even if pressure advance causes the end of that move to turn into retraction.so attm during retraction it just "ignore impulses"
how hard would it be to do the same when PA reverses the motor direction? if it works for retraction should work with PA ?I understand this is separate vs single move (PA changes direction during a single move and retraction is separate move) but again..
as is right now, looks like these sensors are useles with PA anabled
-
(and that is why I posted dc42's response from another thread , no point in building one if using PA with current firmware; if and how to "fix" it might be better discussed in a dedicated thread leaving the warning here for now?)
-
@bearer said in Here's my printable optical encoder wheel filament sensor!:
no point in building one if using PA with current firmware
well it depends, I did not notice PA reversing my extruder yet at the value I'm using it (0.042) .. higher values are more problematic...
anyhow, don't have enough experience, still did not have a single print done with "enabled" sensor, I'm running it disabled for now
-
@bearer awesome well I made all holes 2.8mm diameter so to make a 3M screw "self-tap" itself in.
Came out great out of my well tuned railcore but it might quickly get too tight with a little overextrusion; drilling should care for that.
Btw the clamping side of the enclosure is 3.5mm as to let the screw slide freely until set.
@arhi @T3P3Tony That just made me think; how about a mechanical freewheel physically stopping the encoder from spinning backwards; could be a ratchet or one-way bearing -although I don't know of any smaller than 608 size) or something else
-
@fractalengineer said in Here's my printable optical encoder wheel filament sensor!:
@arhi @T3P3Tony That just made me think; how about a mechanical freewheel physically stopping the encoder from spinning backwards; could be a ratchet or one-way bearing -although I don't know of any smaller than 608 size) or something else
can be done for new desings, will not work for existing ones + IMO that's a wrong approach to solving software issue
-
Just published the updated model using a $3 Schmitt trigger equipped arduino sensor;
Getting much more consistent reading
Check it out there
-
@arhi said in Here's my printable optical encoder wheel filament sensor!:
There is no way a filament will move in contra direction of the motor
@fractalengineer thanks for warming up this thread.
I read it and the above quote made me think of murphy's law.
YES there is a way filament pressure builds up so hard ( eg. Bowden setups) that the stepper looses control and gets pushed backwards a few degree (visible and audible). That happens regardless of the DIR pin value.
I've seen that happen regularly with a Diamond mixing hotend and three 0.9° steppers. -
@o_lampe possible, dunno, I assume the motor can skip steps, it can even chew the filament so motor is spinning but filament is not moving, but never seen filament going backwards trough motor .. .but yes, with bowden everything is possible, I don't use bowden, ever, I always believed it is a terrible way to do things especially as I almost never use PLA and the "springy" filaments I use really hate bowden setups
-
@fractalengineer said in Here's my printable optical encoder wheel filament sensor!:
Schmitt trigger equipped arduino sensor
The endstop definition already has a threshold parameter. I was wondering, why that was not enough? Does the Schmitt-Trigger offer a bigger hysteresis or what's the difference?
-
@o_lampe Excellent question; it worked about fine for me with pretty high tolerance (ended up running 25-200%) but would still get occasional spikes at 400% triggering false positives
Then @JohnOCFII made this awesome in-depth investigation using a logic analyzer and found out that the signal was indeed noisy and implementing a schmitt trigger solved the issue; https://forum.duet3d.com/topic/19284/inconsistent-results-with-optical-encoder-wheel-filament-sensor
So I found an IR sensor that has a shmitt trigger integrated and modified the housing for it
-
This post is deleted! -
I remixed the design by Fractalengineer to use the Duet3D Laser Filament Monitor, and it seems to be working well.
https://www.thingiverse.com/thing:4796741 -
@rkaronde
Hi, nice design.
You should give @fractalengineer more credit in your thingiverse-description by editing the the two typos in his name:Fractalenginner Frantalengineer
How difficult is the shaft to print? Just wondering if it wouldn't be easier to glue the disks to a steel or carbon rod?
-
Oops, fixed the typos. Thanks for catching them.
The shaft is really easy and quick to print. It has a few different sections of varying diameters and a hexagon shape on it. These are really important parts of the overall design.
Getting those craved on a steel/carbon rod would be hard
-
I’ve been looking to add something like this to my printers for a while. I was wondering if maybe a non-printed wheel might improve things. Thinking it’d take out any potential inconsistencies that may exist using a printed part.
Maybe something like this?
https://www.adafruit.com/product/3782?gclid=EAIaIQobChMIoajljtm37wIVaR-tBh3jyAO0EAQYAiABEgIQAvD_BwE -
@blt3dp Yep depending on your printing accuracy you may have reading inconsistencies due to variation in the slots sizes.
Hence why I'm setting readng over 50mm; that's the distance it takes it to make one revolution, averaging out this variation.
There are plenty of plastic molded wheels you could use to get more consistent slots, if you redesigned the shaft and possibly the housing to fit
I was also thinking of laser cutting the wheel in acrylic for instance