Skip to main content

Neopixel LED Stripes

Neopixel LEDs sind LED Streifen, die 3polig angeschlossen werden. 5V, Ground und Data.

Über die Datenleitung wird jede einzelne LED in Farbe und Helligkeit gesteuert.

Das Fysetc Spider 2.3 bietet einen RGB Port an. PD3

Spider_V2.3_Pinout Kopie.png

Ich muss mir irgendwie den PD3 zerstört haben. Im siboor Discord haben wir dann 2 weitere digitale Ausgänge gefunden, die für RGB Ansteuerung herangenommen werden können.

Der RX (PD0) und der TX (PD1) Port vom CANbus Anschluss.

Der interne 5V Anschluss reicht nicht für 50 LEDs aus. Darum habe ich ein zusätzliches 5V Netzteil eingebaut.

Bei der Verwendung eines externen Netzteils muss unbedingt GND gleichgeschaltet werden.

Verdrahtung

IMG_8824.jpeg

5V Netzteil

IMG_8823.jpeg

neopixel.cfg

[neopixel chamber_leds]
pin: PD0
chain_count: 50
color_order: GRBW
initial_RED: 0.2
initial_GREEN: 0.2
initial_BLUE: 0.2
initial_WHITE: 0.2

[neopixel progress_leds]
pin: PD1
chain_count: 21
color_order: GRBW
initial_RED: 0.2
initial_GREEN: 0.2
initial_BLUE: 0.2
initial_WHITE: 0.2

LED Effects

Für die Ansteuerung der LEDs nutze ich die LED Effects von Julian Schill

https://github.com/julianschill/klipper-led_effect

Damit werden sowohl die Neopixels im Stealthburner und dann meine chambers_leds und die progress_leds gesteuert.


##########################
# LED Effects Animations #
##########################

##################
## logo effects ##
##################

[led_effect sb_logo_busy]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
    breathing  3 1 top (1,0,0)

[led_effect sb_logo_cleaning]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
    breathing  3 1 top (0.0, 0.02, 0.5)

[led_effect sb_logo_calibrating_z]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.0, 0.0, 0.35)

[led_effect sb_logo_heating]
leds:
    neopixel:sb_leds (1)
autostart:                          false
frame_rate:                         24
layers:
     breathing  3 1 top (1, 0.18, 0)

[led_effect sb_logo_cooling]
leds:
    neopixel:sb_leds (1)
autostart:                          false
frame_rate:                         24
layers:
     breathing  3 1 top (0, 0, 1)

[led_effect sb_logo_homing]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.0, 0.6, 0.2)

[led_effect sb_logo_leveling]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.5, 0.1, 0.4)

[led_effect sb_logo_meshing]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.2, 1.0, 0.0)

[led_effect sb_logo_printing]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
    gradient  0.3  1 add (0.3, 0.0, 0.0),(0.3, 0.3, 0.0),(0.3, 0.1, 0.0)

[led_effect sb_logo_standby]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.01, 0.01, 0.01)

[led_effect sb_logo_part_ready]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (1)
layers:
        breathing  3 1 top (0.0, 1.0, 0.0)

####################
## nozzle effects ##
####################

[led_effect sb_nozzle_heating]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (2,3)
layers:
        breathing  3 1 top (1.0, 0.18, 0.0, 0.0)

[led_effect sb_nozzle_cooling]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (2,3)
layers:
        breathing  3 1 top (0.0, 0.0, 1.0, 0.1)

[led_effect sb_nozzle_standby]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (2,3)
layers:
        breathing  3 1 top (0.6, 0.0, 0.0, 0.0)

[led_effect sb_nozzle_part_ready]
autostart:              false
frame_rate:             24
leds:
    neopixel:sb_leds (2,3)
layers:
        breathing  3 1 top (0.6, 1.0, 0.0, 0.1)


#####################
## all led effects ##
#####################

[led_effect sb_critical_error]
leds:
    neopixel:sb_leds
    neopixel:chamber_leds
layers:
    strobe         1  1.5   add        (1.0,  1.0, 1.0)
    breathing      2  0     difference (0.95, 0.0, 0.0)
    static         1  0     top        (1.0,  0.0, 0.0)
autostart:                             false
frame_rate:                            24
run_on_error:                          true

[led_effect rainbow]
leds:
    neopixel:sb_leds
    neopixel:chamber_leds
autostart:                          false
frame_rate:                         24
layers:
    gradient 1 1 top (1,0,0,0),(0,1,0,0),(0,0,1,0) 

#######################
# LED Effects Statics #
#######################

[led_effect set_nozzle_leds]
leds:
    neopixel:sb_leds (2,3)
   #neopixel:caselight
autostart:                          false
frame_rate:                         24
layers:
    static         0  0     top        (0.0,  0.0, 0.0, 1.0)

[led_effect set_logo_leds]
leds:
    neopixel:sb_leds (1)
autostart:                          false
frame_rate:                         24
layers:
    static         0  0     top        (1.0,  1.0, 1.0)

[led_effect set_chamber_white]
leds:
    neopixel:chamber_leds
autostart:          false
frame_rate:         24
layers:
    static          0   0   top         (0.0, 0.0, 0.0, 1.0)

[led_effect set_chamber_white_left]
leds:
    neopixel:chamber_leds (1-20)
autostart:          false
frame_rate:         24
layers:
    static          0   0   top         (0.0, 0.0, 0.0, 1.0)


[led_effect set_chamber_white_right]
leds:
    neopixel:chamber_leds (31-50)
autostart:          false
frame_rate:         24
layers:
    static          0   0   top         (0.0, 0.0, 0.0, 1.0)


[led_effect set_chamber_white_front]
leds:
    neopixel:chamber_leds (21-30)
autostart:          false
frame_rate:         24
layers:
    static          0   0   top         (0.0, 0.0, 0.0, 1.0)

[led_effect set_progress]
leds:
    neopixel:progress_leds
autostart:                          false
frame_rate:                         24
layers:
    progress  -1  0 add         ( 0, 0, 1),( 0, 0.1, 0.6)
    static     0  0 top         ( 0, 0, 0.1)

##############
# The Macros #
##############

[gcode_macro set_progress]
gcode:
    SET_LED_EFFECT EFFECT=set_progress REPLACE=1

[gcode_macro stop_chamber_effects]
gcode:
    STOP_LED_EFFECTS LEDS="neopixel:chamber_leds"

[gcode_macro set_chamber_white]
gcode:
    STOP_CHAMBER_EFFECTS
    SET_LED_EFFECT EFFECT=set_chamber_white REPLACE=1

[gcode_macro set_chamber_white_left]
gcode:
    STOP_CHAMBER_EFFECTS
    SET_LED_EFFECT EFFECT=set_chamber_white_left REPLACE=1

[gcode_macro set_chamber_white_right]
gcode:
    STOP_CHAMBER_EFFECTS
    SET_LED_EFFECT EFFECT=set_chamber_white_right REPLACE=1

[gcode_macro set_chamber_white_front]
gcode:
    STOP_CHAMBER_EFFECTS
    SET_LED_EFFECT EFFECT=set_chamber_white_front REPLACE=1
    
[gcode_macro set_logo_leds_off]
gcode:
    SET_LED_EFFECT EFFECT=set_logo_leds STOP=1

[gcode_macro set_logo_leds_on]
gcode:
    SET_LED_EFFECT EFFECT=set_logo_leds

[gcode_macro set_nozzle_leds_on]
gcode:
    SET_LED_EFFECT EFFECT=set_nozzle_leds

[gcode_macro set_nozzle_leds_off]
gcode:
    SET_LED_EFFECT EFFECT=set_nozzle_leds STOP=1

[gcode_macro status_off]
gcode:
    STOP_LED_EFFECTS
    SET_CHAMBER_WHITE_FRONT

[gcode_macro status_ready]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=rainbow
    SET_CHAMBER_WHITE_FRONT

[gcode_macro status_part_ready]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_nozzle_part_ready
    SET_LED_EFFECT EFFECT=sb_logo_part_ready
    SET_CHAMBER_WHITE_FRONT

[gcode_macro status_busy]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_busy
    SET_CHAMBER_WHITE_FRONT
    set_nozzle_leds_on

[gcode_macro status_heating]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_heating
    SET_LED_EFFECT EFFECT=sb_nozzle_heating
    SET_CHAMBER_WHITE_FRONT

[gcode_macro status_cooling]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_cooling
    SET_LED_EFFECT EFFECT=sb_nozzle_cooling
    SET_CHAMBER_WHITE_FRONT


[gcode_macro status_leveling]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_leveling
    SET_CHAMBER_WHITE_FRONT
    set_nozzle_leds_on

[gcode_macro status_homing]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_homing
    SET_CHAMBER_WHITE_FRONT
    set_nozzle_leds_on

[gcode_macro status_cleaning]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_cleaning
    SET_CHAMBER_WHITE_FRONT
    set_nozzle_leds_on

[gcode_macro status_meshing]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_meshing
    SET_CHAMBER_WHITE_FRONT
    set_nozzle_leds_on

[gcode_macro status_calibrating_z]
gcode:
    STOP_LED_EFFECTS
    SET_LED_EFFECT EFFECT=sb_logo_calibrating_z
    SET_CHAMBER_WHITE
    set_nozzle_leds_on

[gcode_macro status_printing]
gcode:
    STOP_LED_EFFECTS
    SET_CHAMBER_WHITE
    SET_LED_EFFECT EFFECT=sb_logo_printing
    set_nozzle_leds_on
    set_progress