Skip to content

Commit

Permalink
Various updates on Duet Board
Browse files Browse the repository at this point in the history
  • Loading branch information
Prutsium committed Nov 9, 2021
1 parent fa23ee1 commit a5ea07f
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,8 @@ chain_count: 16
color_order: GRB
# Set the pixel order required by the LED hardware. Options are GRB,
# RGB, GRBW, or RGBW. The default is GRB.
initial_RED: 0.5
initial_GREEN: 0.5
initial_BLUE: 0.5
initial_RED: 0.7
initial_GREEN: 0.7
initial_BLUE: 0.7

[gcode_macro variable]
variable_nled: 16
variable_cycle: 5
gcode:

[gcode_macro KITT]
gcode:
{% for ciclo in range(printer["gcode_macro variable"].cycle) %}
{% for sx in range(printer["gcode_macro variable"].nled) %}
{% if sx > 0 %}
SET_LED LED=neopixel RED=0 GREEN=0 BLUE=0
{% if sx > 1 %}
SET_LED LED=neopixel RED=0.1 GREEN=0 BLUE=0 INDEX={sx-1}
{% endif %}
SET_LED LED=neopixel RED=0.3 GREEN=0 BLUE=0 INDEX={sx}
SET_LED LED=neopixel RED=1 GREEN=0 BLUE=0 INDEX={sx+1}
G4 P100
{% endif %}
{% endfor %}
{% for dx in range(printer["gcode_macro variable"].nled) %}
SET_LED LED=neopixel RED=0 GREEN=0 BLUE=0
{% set n1 = printer["gcode_macro variable"].nled|int+1 %}
{% set n2 = printer["gcode_macro variable"].nled|int+2 %}
{% if dx > 2 %}
SET_LED LED=neopixel RED=0.1 GREEN=0 BLUE=0 INDEX={printer["gcode_macro variable"].nled+3-dx}
SET_LED LED=neopixel RED=0.3 GREEN=0 BLUE=0 INDEX={n2-dx}
SET_LED LED=neopixel RED=1 GREEN=0 BLUE=0 INDEX={n1-dx}
G4 P100
{% endif %}
{% endfor %}
{% endfor %}
SET_LED LED=neopixel RED=0 GREEN=0 BLUE=0

[gcode_macro SIREN]
gcode:
{% for flashes in range(params.COUNT|int) %}
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=0 GREEN=0 BLUE=1 INDEX=3
G4 P250 ; sleep 250ms
SET_LED LED=fysetc_mini12864 RED=0 GREEN=0 BLUE=1 INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=0 BLUE=0 INDEX=3
G4 P250 ; sleep 250ms
{% endfor %}
SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=2 TRANSMIT=0
SET_LED LED=fysetc_mini12864 RED=1 GREEN=1 BLUE=1 INDEX=3
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,14 @@ max_temp: 100
#####################################################################
[printer]
kinematics: cartesian
max_velocity: 160
max_velocity: 230
#Normal Accel
max_accel: 4500
max_accel_to_decel: 2200
#For Resonance Test
#max_accel: 10000
#max_accel_to_decel: 10000
max_z_velocity: 10
max_z_velocity: 15
max_z_accel: 200

#####################################################################
Expand All @@ -79,7 +80,7 @@ full_steps_per_rotation: 200 #200 for 1.8 degree, 400 for 0.9 degree
endstop_pin: tmc2209_stepper_x:virtual_endstop
position_endstop: 0
position_max: 250
homing_speed: 30
homing_speed: 25
homing_retract_dist: 0

[tmc2209 stepper_x]
Expand All @@ -90,25 +91,25 @@ diag_pin: x_diag_pin
uart_address: 0
sense_resistor: 0.056
#stealthchop_threshold: 0 # disable stealthChop
#stealthchop_threshold: 0.01 # enable stealthChop when static
#stealthchop_threshold: 1 # enable stealthChop when static
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65 #0.8
hold_current: .15
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 5
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_PWM_LIM: 12
driver_PWM_REG: 8
driver_PWM_FREQ: 1
driver_PWM_GRAD: 14
driver_PWM_OFS: 36
driver_SGTHRS: 107 #113
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 0
#driver_HSTRT: 5
#driver_PWM_AUTOGRAD: True
#driver_PWM_AUTOSCALE: True
#driver_PWM_LIM: 12
#driver_PWM_REG: 8
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 14
#driver_PWM_OFS: 36
driver_SGTHRS: 160

[stepper_y]
## DRIVER1
Expand All @@ -122,7 +123,7 @@ endstop_pin: tmc2209_stepper_y:virtual_endstop
position_endstop: -4
position_max: 210
position_min: -4
homing_speed: 40
homing_speed: 30
homing_retract_dist: 0

[tmc2209 stepper_y]
Expand All @@ -133,24 +134,24 @@ diag_pin: y_diag_pin
uart_address: 1
sense_resistor: 0.056
#stealthchop_threshold: 0 # disable stealthChop
#stealthchop_threshold: 0.01 # enable stealthChop when static
#stealthchop_threshold: 1 # enable stealthChop when static
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .65
hold_current: .25
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 5
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_PWM_LIM: 12
driver_PWM_REG: 8
driver_PWM_FREQ: 1
driver_PWM_GRAD: 14
driver_PWM_OFS: 36
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 0
#driver_HSTRT: 5
#driver_PWM_AUTOGRAD: True
#driver_PWM_AUTOSCALE: True
#driver_PWM_LIM: 12
#driver_PWM_REG: 8
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 14
#driver_PWM_OFS: 36
driver_SGTHRS: 112

#####################################################################
Expand All @@ -177,24 +178,24 @@ diag_pin: z_diag_pin
uart_address: 2
sense_resistor: 0.056
#stealthchop_threshold: 0 # disable stealthChop
#stealthchop_threshold: 0.01 # enable stealthChop when static
#stealthchop_threshold: 1 # enable stealthChop when static
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 5
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_PWM_LIM: 12
driver_PWM_REG: 8
driver_PWM_FREQ: 1
driver_PWM_GRAD: 14
driver_PWM_OFS: 36
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 0
#driver_HSTRT: 5
#driver_PWM_AUTOGRAD: True
#driver_PWM_AUTOSCALE: True
#driver_PWM_LIM: 12
#driver_PWM_REG: 8
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 14
#driver_PWM_OFS: 36

[stepper_z1]
## DRIVER3, RHS
Expand All @@ -213,32 +214,32 @@ diag_pin: z1_diag_pin
uart_address: 3
sense_resistor: 0.056
#stealthchop_threshold: 0 # disable stealthChop
#stealthchop_threshold: 0.01 # enable stealthChop when static
#stealthchop_threshold: 1 # enable stealthChop when static
stealthchop_threshold: 999999 # enable stealthChop
interpolate: True
run_current: .33033
hold_current: .33033
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 5
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_PWM_LIM: 12
driver_PWM_REG: 8
driver_PWM_FREQ: 1
driver_PWM_GRAD: 14
driver_PWM_OFS: 36
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 0
#driver_HSTRT: 5
#driver_PWM_AUTOGRAD: True
#driver_PWM_AUTOSCALE: True
#driver_PWM_LIM: 12
#driver_PWM_REG: 8
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 14
#driver_PWM_OFS: 36

#####################################################################
# Orbiter Extruder on Duet
#####################################################################
[extruder]
## DRIVER4
step_pin: e_step_pin
dir_pin: !e_dir_pin
dir_pin: e_dir_pin
enable_pin: !stepper_enable_pin
sensor_pin: vref_scaled:e_sensor_pin
pullup_resistor: 2200
Expand All @@ -250,24 +251,24 @@ uart_address: 0
select_pins: !stepper_select_pin
sense_resistor: 0.056
#stealthchop_threshold: 0 # disable stealthChop
#stealthchop_threshold: 0.001 # enable stealthChop when static
#stealthchop_threshold: 1 # enable stealthChop when static
stealthchop_threshold: 999999 # enable stealthChop
interpolate: False
run_current: .30
hold_current: .01
driver_IHOLDDELAY: 8
driver_TPOWERDOWN: 20
driver_TBL: 2
driver_TOFF: 3
driver_HEND: 0
driver_HSTRT: 5
driver_PWM_AUTOGRAD: True
driver_PWM_AUTOSCALE: True
driver_PWM_LIM: 12
driver_PWM_REG: 8
driver_PWM_FREQ: 1
driver_PWM_GRAD: 14
driver_PWM_OFS: 36
run_current: .50
hold_current: .2
#driver_IHOLDDELAY: 8
#driver_TPOWERDOWN: 20
#driver_TBL: 2
#driver_TOFF: 3
#driver_HEND: 0
#driver_HSTRT: 5
#driver_PWM_AUTOGRAD: True
#driver_PWM_AUTOSCALE: True
#driver_PWM_LIM: 12
#driver_PWM_REG: 8
#driver_PWM_FREQ: 1
#driver_PWM_GRAD: 14
#driver_PWM_OFS: 36

[adc_scaled vref_scaled] # enable analog sensor adjustments using VREF/VSSA pins
vref_pin: PB5
Expand Down
Loading

0 comments on commit a5ea07f

Please sign in to comment.