maocypher / Octoprint-Smart-Filament-Sensor

OctoPrint plugin that lets integrate Smart Filament Sensors like BigTreeTechs SmartFilamentSensor directly to RaspberryPi GPIO pins.
GNU General Public License v3.0
13 stars 20 forks source link

Does this plugin only support only bigtree smart sensor? #29

Closed mylife4aiurr closed 3 years ago

mylife4aiurr commented 3 years ago

Re: #27

I'm using this: https://www.thingiverse.com/thing:4712966 Its uses an IR sensor with an encoder wheel to track movement. Pins left to right - signal, ground, voltage. I have signal connected to pin 11 and using 3.3v voltage. The sensor test works - If I move the wheel, it says motion detected. sensor: https://amzn.to/3nm6zf0?tag=tv-business-20

I've tried 1.1.4, 1.1.5, 1.1.5.2 with timeout and distance detection modes, couldn't get either detection mode to work correctly.

Timeout Detection- The plugin triggers immediately if I this mode. So I resume print with Octoprint. From this point on, no more false triggers. However, if I cut filament - no pause is done. In the smart filament sensor window - Sensor enable: yes Detection mode: Timeout Detection Filament is moving: No (this never changes, but time signals are seen in monitor window octoprint???) Last motion detected - time signals change when the wheel moves. (To me this indicates signals or being received) Connection Test is running: Stopped

Distance Detection- This mode triggers a pause immediately if I use a low distance. But does not trigger an immediate pause if I use a longer distance. Tried values from 15 - 200mm. For below I used 60mm. In the smart filament sensor window - Sensor enable: yes Detection mode: Distance Detection Filament is moving: No (this never changes, but distance value keeps resetting in monitor window octoprint) Remaining Distance - this fluctuates from 57-60 as filament moves. Every time wheel senses movement remaining distance is reset to 60. Connection Test is running: Stopped

The plugin seeing "Filament is moving: No" is because of a different sensor type?

mylife4aiurr commented 3 years ago

Ok ok. Making progress. The triggering pause immediately was because of not following your directions: "Since the sensor is activated with the first G0 or G1 command it is advised to perform these commands after complete heatup of the printer." I changed my startup gcode to comply - no immediate trigger pause.

And since i'm pass the trouble that I caused by not following directions - the printer indeed paused after 60mm distance. This is the distance I set. Now I have to find a better stopping distance but plugin is working with this sensor.

mylife4aiurr commented 3 years ago

Still however: Sensor enabled: Yes Detection mode: Distance Detection Filament is moving: No <------ always says no Remaining distance: 32 Connection Test is running: Stopped

ver1.1.5.2

maocypher commented 3 years ago

Filament not moving in the sidebar, I am going to fix and then finally release the version

mylife4aiurr commented 3 years ago

@maocypher

Got it working with IR sensor, triggered by encoder wheel. https://www.thingiverse.com/thing:4712966 info here #29

How well is it working?

The sensor/plugin combo is working well. But I only have about two prints experience past the troubleshooting I've been doing.

Issue Im having is this plugin causes the duet2 web server interface to crash whenever a pause event is triggered. I have not gotten to the bottom of why yet. The printer, sensor, octoprint, and your plugin continue to work and not crash during the print, however.

maocypher commented 3 years ago

Maybe it has to do with the pausing command?

If it is working so far, I would link this sensor in my description, because I like the idea of DYI sensor very much

mylife4aiurr commented 3 years ago

You could list as preliminary support for this sensor, just put a warning. Something like duet users make experience web interface crash, until we figure out why. This doesn't crash Octoprint or your plugin, and doesn't stop the print from finishing.

I don't even think many users use duet with Octoprint unless they need it for a plugin.

mylife4aiurr commented 3 years ago

Update: The duet web interface didn't crash - it was waiting for me to hit resume.

Seems I need to hit resume on Octoprint after a filament event as expected. And when I do hit resume on Octoprint - the print resumes. But I have found out I also have to hit resume on the printer's display - if I don't the web interface thinks printer is still paused, even though its actually printing if I've already hit resume on Octoprint. So Octoprint is not letting duet know print is resumed.

I'll keep playing with it.

mylife4aiurr commented 3 years ago

Ok ok ok all problems solved. I tried M25 instead of M600 as pause command and it worked without the issue of the duet web interface not knowing print resumed.

I have not tested time detection since getting everything working.

For distance detection, 8mm gave 1 false positive during a 2 hour print. Trying 10mm /12mm.

mylife4aiurr commented 3 years ago

Maybe it has to do with the pausing command?

If it is working so far, I would link this sensor in my description, because I like the idea of DYI sensor very much

That was it