Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 2831

Adding optoencoder to endstop slot to provide filament odometer - firmware help needed (no replies)

$
0
0
I'm trying to figure out how to add a filament travel monitor to (hopefully) provide early warning of filament slippages.
I use Ramps and have 3 free endstop slots so I want to repurpose one to work as an encoder to count toggles (change from open to closed) to provide the filament travel detector.

Background follows, but any help for the following would be appreciated:
Steps:
1. repurpose the endstop slot to count toggles
2. every time the internal marlin odometer gained another 5cm (?) then check the encoder count is in the right ballpark (eg 49-51 toggles).
Obviously 2x retract distance would have to be subtracted from the count as the encoder will count upwards with filament movement in either direction.
3. sound an alarm/trigger M300 code if the values in 2 differ significantly.
3a. send the ratio to the LCD with M117 [string]
4. reset the toggle count
5. repeat endlessly...

There are a number of posts on the web by people who claim to have added filament odometer which "works with Marlin", but none include instructions and there doesn't seem to be a g-code relevant (just the M600 runout code).
I'm thus a bit suspicious no-one has *actually* done it in Marlin.

I have printed the physical parts for a simple filament odometer using an optoendstop and an encoder wheel which just rolls along the filament.
The wheel has 1 "slot" per mm, and is printed in clear filament.
I accidentally printed the wheel at too high a temperature which meant the slots melted, so the optoendstop reads "open" when shining through the clear plastic and "closed" when shining through the opaque "gap" but otherwise works perfectly.
I coated the edge of the wheel with gorilla glue (essentially PVA) to increase grip where it contacts the filament, and it seems to turn reasonably accurately.

As above I'd like to trigger the buzzer on a 12864 LCD Controller if the measured travel distance is signficantly different to the expected distance (as commanded by G1 extrusion)
Icing on the cake would also be to output to the LCD the odometer as well as measured:commanded travel ratio

Hoping someone can help.
Tx
David

Viewing all articles
Browse latest Browse all 2831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>