1 / 1
Bento Box 2.1 Sort Base – Creality K1-series — zdjęcie 1

Bento Box 2.1 Sort Base – Creality K1-series

Zamów wydruk tego modelu

Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.

Zapisane na tym urządzeniu.

Remix of 3DPHUB.NET's Bento Box 2.1 with shorter base.

Ocena
0 / 5
Polubienia
0
Pobrania
3
Wydruki
0
Wyświetlenia
48
Oceny
0

Aktualizacja u źródła:

Informacje o modelu

Źródło
Printables
Licencja
Creative Commons — Attribution — Noncommercial — Share Alike

Bento Box 2.1 Short Base – Creality K1-series

This is a remix of the @3DPHUB.net Bento Box 2.1 for the Creality K1-series. I have shortened the base by 33mm for a total height of 51.6mm. Please refer to the original model for printing and assembly instructions. 

Custom G-code

To enable the new fans we need to modify the following files; printer.cfg, gcode-macro.cfg, and fans-control.cfg. The first two files can be edited in place, but the fans-control.cfg file is write protected and controlled by the Helper-Script. You CAN modify it in place if you connect via SSH, but in Fluidd you cannot make changes. Even if you do edit it in place, it will be overwritten by a Helper-Script update. To get around this I recommend copying the file into the main configuration directory, then editing your printer.cfg file to use the copied file instead of the one located in the Helper-Script/ directory. You can use this method to modify any of the Helper-Script configuration files to your needs. I have also done this with my M600-support.cfg and useful-macros.cfg files to make changes for the PROWIPER mod.

Comment out this line with a hash (#):

 #[include Helper-Script/fans-control.cfg]

Add this line to use the copied file instead:

[include fans-control.cfg]
Base Printer Configuration

Add this code to your printer.cfg configuration file:

[output_pin fan3]
pin: PA0
pwm: True
cycle_time: 0.0100
hardware_pwm: false
value: 0.00
scale: 255
shutdown_value: 0.0

In the gcode-macro.cfg file change variable_fans: 3 to variable_fans: 4, and add the line, variable_fan3_min: 0.

[gcode_macro PRINTER_PARAM]
variable_z_safe_pause: 0.0
variable_z_safe_g28: 3.0
variable_max_x_position: 220.0
variable_max_y_position: 220.0
variable_max_z_position: 250.0
variable_fans: 4
variable_auto_g29: 0
variable_fan0_min: 25
variable_fan1_min: 50
variable_fan2_min: 180
variable_fan3_min: 0
variable_fan2_speed: 0
variable_hotend_temp: 0
variable_e_min_current: 0.27
variable_cam_off_temp: 60
Automatic Temperature Control

Add PA0 to duplicate_pin_override in fans-control.cfg. 

[duplicate_pin_override]
pins: PA0, PC0, PC5, PB2, PC6, ADC_TEMPERATURE

If you want to enable automatic temperature-based fan control, add the following code to the fans-control.cfg file.

[temperature_fan bento_fan]
pin: PA0
cycle_time: 0.0100
hardware_pwm: false
max_power: 1
shutdown_speed: 0
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PC5
min_temp: 0
max_temp: 70
control: watermark
max_delta: 2
target_temp: 35.0
max_speed: 1.0
min_speed: 0.5
M106 Macro Control

For proper M106 macro control of the fan we need to modify the macro located in the fans-control.cfg file.

Remove this block from the bottom of the macro:

{% if params.P is defined and params.P|int == 3 %}
  {% set fan = 1 %}
{% endif %}

Add this code block below the fan 2 section: 

    {% if fan == 3 %}
      {% set value = (255 - printer["gcode_macro PRINTER_PARAM"].fan3_min) / 255 * tmp %}
      {% if printer['gcode_macro Qmode'].flag | int == 1 %}
        SET_GCODE_VARIABLE MACRO=Qmode VARIABLE=fan3_value VALUE={printer["gcode_macro PRINTER_PARAM"].fan3_min + value}
        {% if value > (255 - printer['gcode_macro PRINTER_PARAM'].fan3_min) / 2  %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + (255 - printer['gcode_macro PRINTER_PARAM'].fan3_min) / 2 %}
        {% else %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + value %}
        {% endif %}
      {% else %}
        {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + value %}
      {% endif %}
    {% endif %}

Replace the initial P check at the top of the macro with this logic to restore the fail safe we removed previously. This ensures that if a fan number that does not exist is passed to the M106 macro it will fall back to fan1 which is the exhaust fan. 

{% if params.P is defined %}
    {% set tmp = params.P|int %}
    {% if tmp < fans %}
      {% set fan = tmp %}
    {% else %}
      {% set fan = 1 %}
    {% endif %}
  {% endif %}

Here is an example of the full M106 macro after modification: 

[gcode_macro M106]
description: Control fans with slicer
gcode:
  {% set fans = printer["gcode_macro PRINTER_PARAM"].fans|int %}
  {% set fan = 0 %}
  {% set value = 0 %}
  {% if params.P is defined %}
    {% set tmp = params.P|int %}
    {% if tmp < fans %}
      {% set fan = tmp %}
    {% else %}
      {% set fan = 1 %}
    {% endif %}
  {% endif %}
  {% if params.S is defined %}
    {% set tmp = params.S|float %}
  {% else %}
    {% set tmp = 255 %}
  {% endif %}
  {% if tmp > 0 %}
    {% if fan == 0 %}
      {% set value = (255 - printer["gcode_macro PRINTER_PARAM"].fan0_min) / 255 * tmp %}
      {% if printer['gcode_macro Qmode'].flag | int == 1 %}
        SET_GCODE_VARIABLE MACRO=Qmode VARIABLE=fan0_value VALUE={printer["gcode_macro PRINTER_PARAM"].fan0_min + value}
        {% if value > (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) / 2  %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan0_min + (255 - printer['gcode_macro PRINTER_PARAM'].fan0_min) / 2 %}
        {% else %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan0_min + value %}
        {% endif %}
      {% else %}
        {% set value = printer["gcode_macro PRINTER_PARAM"].fan0_min + value %}
      {% endif %}
    {% endif %}
    {% if fan == 1 %}
      {% set value = (255 - printer["gcode_macro PRINTER_PARAM"].fan1_min) / 255 * tmp %}
      {% if printer['gcode_macro Qmode'].flag | int == 1 %}
        SET_GCODE_VARIABLE MACRO=Qmode VARIABLE=fan1_value VALUE={printer["gcode_macro PRINTER_PARAM"].fan1_min + value}
        {% if value > (255 - printer['gcode_macro PRINTER_PARAM'].fan1_min) / 2  %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan1_min + (255 - printer['gcode_macro PRINTER_PARAM'].fan1_min) / 2 %}
        {% else %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan1_min + value %}
        {% endif %}
      {% else %}
        {% set value = printer["gcode_macro PRINTER_PARAM"].fan1_min + value %}
      {% endif %}
    {% endif %}
    {% if fan == 2 %}
      {% set value = (255 - printer["gcode_macro PRINTER_PARAM"].fan2_min) / 255 * tmp %}
      {% if printer['gcode_macro Qmode'].flag | int == 1 %}
        SET_GCODE_VARIABLE MACRO=Qmode VARIABLE=fan2_value VALUE={printer["gcode_macro PRINTER_PARAM"].fan2_min + value}
        {% if value > (255 - printer['gcode_macro PRINTER_PARAM'].fan2_min) / 2  %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan2_min + (255 - printer['gcode_macro PRINTER_PARAM'].fan2_min) / 2 %}
        {% else %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan2_min + value %}
        {% endif %}
      {% else %}
        {% set value = printer["gcode_macro PRINTER_PARAM"].fan2_min + value %}
      {% endif %}
    {% endif %}
    {% if fan == 3 %}
      {% set value = (255 - printer["gcode_macro PRINTER_PARAM"].fan3_min) / 255 * tmp %}
      {% if printer['gcode_macro Qmode'].flag | int == 1 %}
        SET_GCODE_VARIABLE MACRO=Qmode VARIABLE=fan3_value VALUE={printer["gcode_macro PRINTER_PARAM"].fan3_min + value}
        {% if value > (255 - printer['gcode_macro PRINTER_PARAM'].fan3_min) / 2  %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + (255 - printer['gcode_macro PRINTER_PARAM'].fan3_min) / 2 %}
        {% else %}
          {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + value %}
        {% endif %}
      {% else %}
        {% set value = printer["gcode_macro PRINTER_PARAM"].fan3_min + value %}
      {% endif %}
    {% endif %}
  {% endif %}
  {% if value >= 255 %}
    {% set value = 255 %}
  {% endif %}
  SET_PIN PIN=fan{fan} VALUE={value}

Tagi