Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Added helper texts and extended README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
maocypher committed Oct 25, 2020
1 parent 26ce5aa commit cc0a4d4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ This plugin can use the GPIO.BOARD or GPIO.BCM numbering scheme.
* Configurable GPIO pins.
* Support movement detection sensors, e.g. Smart-Filament-Sensor.
* Detect if filament is not moving anymore (jammed or runout)
* Detection based on timeout
* Detection based on filament position returned bei M114 (unfortunately imprecise compared with firmware)

## Installation

Expand All @@ -27,8 +29,19 @@ This plugin can use the GPIO.BOARD or GPIO.BCM numbering scheme.
After installation a restart of Octoprint is recommended.

## Configuration
### GPIO Pin
* Choose any free GPIO pin you for data usage, but I would recommend to use GPIO pins without special functionalities like e.g. I2C
* Run the sensor only on 3.3V, because GPIO pins don't like 5V for a long time

### Detection time
Currently it is necessary to configure a maximum time period no filament movement was detected. This time could be depended on the print speed and maximum print line length. For the beginning - until I figured out how to estimate the best detection time - you can run a test print and messearue your maximum time and configure this value.
The default value 45 seconds was estimated on max. print speed 10mm/s, for faster prints it could be smaller.

### Detection distance
Version 2.0 of this plugin detects the movement depending on the moved distance. Therefore it is necessary to configure a distance without movement being detected. In Marlin Firmware the default value is set to 7mm. According to this the value is set for the plugin.
Version 1.1.0 of this plugin detects the movement depending on the moved distance. Therefore it is necessary to configure a distance without movement being detected. In Marlin Firmware the default value is set to 7mm. According to this the value is set for the plugin.

### Sampling time
To reduce the negative effects on the print quality a sampling time must be set. Periodically M114 code is sent to the printer to receive the current filament position. This increases the load on the printer, i.e. if the sampling time is set to small the printer starts stuttering, because it cannot process all commands fast enough. I assume the value could differ according to the mainboard architecture (8-bit or 32-bit).

### Octoprint - Firmware & Protocol
Since currently GCode command M600 is used to interrupt the print, it is recommended to add M600 to the setting "Pausing commands".
Expand All @@ -37,7 +50,8 @@ Since currently GCode command M600 is used to interrupt the print, it is recomme
If you do not want that the print is paused right on your print, I recommend to add a GCode Script for "After print job is paused". Also adding GCode script "Before print job is resumed" might be useful, in the case you hit the heatbed or print head during the change of the filament or removing the blockage.

## Disclaimer
I as author of this plugin am not responsible for any damages on your print or printer. As user you are responsible for a sensible usage of this plugin.
* I as author of this plugin am not responsible for any damages on your print or printer. As user you are responsible for a sensible usage of this plugin.
* Be cautious not to damage your Raspberry Pi, because of wrong voltage. I don't take any responsibility for wrong wiring.

## Outlook
Detection based on distance
Support of multiple sensors for multiextruders like 4 channel kraken hotend
4 changes: 2 additions & 2 deletions octoprint_smart_filament_sensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ def get_settings_defaults(self):
detection_method = 0, # 0 = timeout detection, 1 = distance detection

# Distance detection
motion_sensor_detection_distance = 7, # Recommended detection distance from Marlin
motion_sensor_sampling_time = 5000, # It is recommended to choose sampling time not too low, because it would block the printer
motion_sensor_detection_distance = 3, # Recommended detection distance from Marlin would be 7
motion_sensor_sampling_time = 10000, # It is recommended to choose sampling time not too low, because it would block the printer

# Timeout detection
motion_sensor_max_not_moving=45, # Maximum time no movement is detected - default continously
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<div class="controls" data-toggle="tooltip" title="{{ _('When a sensor state change happens, wait for this amount of time to wait for the signal to stabilize.') }}">
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: settings.plugins.smartfilamentsensor.motion_sensor_max_not_moving">
<span class="add-on">sec</span>
<span class="help-block"><small>Don't choose the timeout value too small. During long slow movements, it takes some time until the sensor changes the value.</small></span>
</div>
</div>

Expand All @@ -67,6 +68,7 @@
<div class="controls" data-toggle="tooltip" title="{{ _('The sampling time the passed distance is polled from the printer.') }}">
<input type="number" step="any" min="0" class="input-mini text-right" data-bind="value: settings.plugins.smartfilamentsensor.motion_sensor_sampling_time">
<span class="add-on">ms</span>
<span class="help-block"><small>In this period M114 command is sent to the printer. Don't choose the value too small, because it could negatively effect the print quality and even cause stuttering.</small></span>
</div>
</div>
<!--<div class="control-group">
Expand Down

0 comments on commit cc0a4d4

Please sign in to comment.