LED lighting



  • Hi. I was trying to use a LED strip to light my printer but even when reading trough the forum couldnt make it work. The LED strip is connected to the E1 heater.
    My first question is about the wiring, can i connect both + and - leads on the LED strips to the heater output(E1-VIN)?

    Second is that i would like to use PWM to control the LEDs but i dont know how to setup the config.g file. I understood that i am suposed to somehow asighn the heater 1 as a FAN. Thank you for your help.

    config.g that i am using :
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
    M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
    M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
    M140 H0 ; map heated bed to heater 0
    M143 H0 S100 ; set temperature limit for heater 0 to 100C
    M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
    M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit

    ; Fans
    M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S1 H-1 ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
    M106 P1 S0.5 H1 T45 ; set fan 1 value. Thermostatic control is turned on
    M950 F2 C"fan2" Q500 ; create fan 2 on pin fan2 and set its frequency
    M106 P2 S1 H0 T50

    ; Tools
    M563 P0 D0 H1 ; Define tool 0
    G10 P0 X0 Y0 Z0 ; Set tool 0 axis offsets
    G10 P0 R0 S0 ; Set initial tool 0 active and standby temperatures to 0C


  • administrators

    My first question is about the wiring, can i connect both + and - leads on the LED strips to the heater output(E1-VIN)?

    Assuming you have simple LED strips (light used for lighting) not dotstars or neopixels), and your VIN power matches the LED strip rating then this should work (I do something similar on one of my printers).

    You can test the LED strip by temporarily connecting it to the power supply to confirm it works and you have the polarity the correct way around.

    Second is that i would like to use PWM to control the LEDs but i dont know how to setup the config.g file. I understood that i am suposed to somehow asighn the heater 1 as a FAN. Thank you for your help.

    I would assign the E1 output as a GPIO and use M42 to control it (but it is also possible to assign it as fan and use M106 to control it.

    config.g that i am using :
    ..

    There is nothing in your config.g that refers to controlling the LED strip. This is not tested but try the following in config.g:

    M950 P0 C"e1heat"    ;set e1heat as a GPIO output pin
    

    Then send the following to turn on fully

    M42 P0 S1
    

    Turn off

    M42 P0 S0
    

    turn on 50%

    M42 P0 S0.5
    

    I found the default PWM frequency works fine for the LEDs i am using. You can specify the PWM frequency in the M950 command if the default is not working well.



  • @T3P3Tony Thank you for your responce. I have added the command you posted to my config.g

    ;LED controll
    M950 P0 C"e1heat" ;set e1heat as a GPIO output pin

    I have checked that the 24V from the PS is OK.
    My LED strip - is connected to VIN and the + is connected to E1-.

    But after sending M42 P0 S1 nothing happens, any idea why? Thank you


  • Moderator

    @Deluxe-600 said in LED lighting:

    But after sending M42 P0 S1 nothing happens, any idea why?

    Did you test that the LEDs work when connected straight to power?

    You can test the LED strip by temporarily connecting it to the power supply to confirm it works and you have the polarity the correct way around.



  • @Phaedrux Yes



  • @Deluxe-600 said in LED lighting:

    My LED strip - is connected to VIN and the + is connected to E1-

    Should'n be '-' connected to E1- ?



  • @BoA Damn...im stupid, yes you were right. IT works now! Thank you all for helping and have a great day 🙂



  • Just one more question. Is it possible to set it up to have a slider like the FAN control? Or i just have to control it using a macro?



  • @Deluxe-600 It is possible, just create fan on this output



  • Ok, i will manage. Thank you.


Log in to reply