Here's my printable optical encoder wheel filament sensor!
-
I just finished testing it and it's working great; it uses a $0.50 optical endstop.
Check it out, I'd love to hear some feedback!
-
I think I better start printing some parts....
-
Might give it a go, re-designing the wheel to work with an outer rubber band, an o-ring or something as I'm not set up to print flexibles yet. Interesting approach!
-
@bearer you should be able to do it easily; you will find the wheel assembles on a 6mm hex key
-
What size bearing does it use?
-
I printed mine out a couple hours ago.
I started the thread below, any ideas on configuration?
https://forum.duet3d.com/topic/16920/testing-filament-sensor-on-rrf3
-
-
@fractalengineer Whoops, thanks, that was dumb.
-
i got it working @fractalengineer. the only problem now is that it's sensing 50mm/pulse.
i'm watching it print and it's pulsing the led much more frequently than that. any ideas?
-
@gnydick answered in your dedicated post
-
@fractalengineer Great Job!
-
dc42 said in RRF 3.1.1 M572 breaks M591:
When you enable pressure advance, depending on the speed and acceleration you use, the extruder may reverse during the last part of a printing move. So it's important that the filament monitor senses the direction of motion and passes it to the Duet along with the amount of motion, as the Duet3D filament monitors do. If the filament monitor just sends motion pulses with no direction information, then the reverse motion will be misinterpreted as forward motion; so it will appear to RRF that there is too much filament motion. Is this what is happening?
interesting side note, still looking forward to trying this though, not yet wandered into PA stuff yet
-
@bearer Oh boi I sense we'll be needing incremental encoder support
Would be fairly simple to implement though; "just" adding a second sensor and 2nd row of slots from the hardware point...now to add it in the code..
I use a custom Flex3Drive with absolute shortest filament path so I haven't experimented with PA either
-
Had a buddy come build one today and seemed to come out with different holediameters and depths. The depth might be a non issue as I think the screws we had on hand were M3x8 not the reccomended M3x6.
But the circled holes came out too tight for M3, but nothing a drill+tap didn't sort. Something you have changed since i downloaded it? Or just tiertime that decides to things their way, for
better orworse?
Still need to re-do the wheel to get some external flex, but looks good man - thanks for sharing!
-
@bearer said in Here's my printable optical encoder wheel filament sensor!:
So it's important that the filament monitor senses the direction of motion and passes it to the Duet along with the amount of motion,
Can't we just use the "direction pin" on the extruder driver to determine direction ?!
It is not possible for filament to change direction without motor doing so, it might move less than we want but it will never move more than we want and in oposite direction -
@arhi did you see this? https://forum.duet3d.com/topic/17111/rrf-3-1-1-m572-breaks-m591/
(missleading topic title i'd say, but maybe relevant)
beyond that I'd defer to big cheese dc42 as it was his quote (i just stripped the @ to keep the noise down)
-
@arhi said in Here's my printable optical encoder wheel filament sensor!:
Can't we just use the "direction pin" on the extruder driver to determine direction ?!
We could use a quadrature encoder, or a pulse+direction arrangement. however in both cases these need more pins. for some applications that is no problem, in others pins are limited. ATTiny microprocessors are inexpensive which is why we went with the option of carrying out the initial processing on the filament monitor and then passing that processed information back to the Duet in a form that just uses 1 pin and works on an endstop input.
It would be possible to either:
- Develop alternative code for the Duet main firmware that uses multiple pins to work with pulse+direction or quadrature.
- Develop alternative firmware for the Attiny or similar microprocessor that read your preferred sensor arrangement and converted it to the protocol the Duet uses.
That said at this point I don't see us (the core Duet3D team) having time to do either.
-
And -rereading your original question I now see that you mean for the firmware to stick with reading the pulses from the sensor, but use the commanded direction of the extruder driver to determine the direction that those pulses relate to.
That's a different question from the one one I answered above. there are certainly cases where with high enough pressure advance the extruder could be turning in the opposite direction from what would be expected looking at the gcode, but as you say the firmware knows that as its commanding the extruder to move in that direction....
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. Definitely one for @dc42 !
-
ok, lemme reiterate
There is no way a filament will move in contra direction of the motor, the only thing that can happen is filament not moving, filament moving less than required or filament moving as required. It is not possible for filament to move in contra direction or more than expected.
So I do understand that current implementation does not know how to handle this and that firmware look at pulses as "forward only" (weird decision but ok) and that there is a non-working duet filament sensor that has a small MCU and can send additional data and and and.... but, the motor is rotated by the firmware. The point that there are few processes influencing motor behavior (acceleration, jerk, pressure advance, dynamic acceleration...) is irrelevant it just means that software needs to be improved not that there is a need to add direction data as there is direction data in the firmware already, it is just a question if you are using it or not.
I, of course, understand the limited nature of resources and I agree that there are more important features that should be finished/polished and / or implemented so I can agree that writing a bit of code on the attiny or pic12f or another puny few cent few pin mcu can solve the issue faster, allowing those "resources" to focus on more important features. I'm not familiarized with the duet codebase (I did manage to compile it and modify it a bit but am still missing the big picture) to be able to quickly figure out how this works now and what needs to be changed to make it work properly
-
@T3P3Tony said in Here's my printable optical encoder wheel filament sensor!:
converted it to the protocol the Duet uses
I assume the "the protocol the Duet uses" can be deducted from the attiny firmware for the duet laser sensor?