Door Open Switch and LED´s



  • Hi Guys,

    i want to install a door switch at my printers and I am not sure which pins and commands I should use to trigger a pause?

    My first idea was the M582 command. Is there a better soultion?
    How can I trigger a pause command immediately?

    The other thing I want to do. I want to switch on and off my Printers LED lights.

    How can i do this? And which Pins i could use?

    I would be glad for each answer!

    Thank you! 🙂



  • Which kind of LED's are you using? It it is a LED strip that runs the same voltage as your PSU (12/24V?) then connect it to a spare FAN connector and use the FAN speed to control the brightness



  • @cr3d M582 is really just to check the state of a trigger which is defined using M581. So the easiest way to configure a door switch is to connect it to a spare end stop input, then use M581.

    As for your LED lights, under what condition do you want to turn them on or off? If it's simply manually at any time, then the obvious answer is to fit a simple on/off switch.



  • Curious to see how you activate the LED, I chose to make them as a thermostat controlled fan output, enabling whenever bed of hotend is over ambient temperature.

    M106 P1 S1 I0 F500 H0:1 T25 Basic thermostatic control for FAN1 either heater over 25C lights on.

    But I would like to make it so LEDs turn on whenever motors are active as well as when the temperature is high.



  • Thank you for your answers 🙂

    @Martin1454 yes the LED Stripes work with 24V

    Normally my setup is following:

    The Duet is the controller board and the raspberry touch with repetier server is the HMI.
    In repetier server, there is a function Light on/off.

    In Repetier Firmware there is the command M355 S1 / S0 for this function.

    But I will test your solutions 😉

    @bearer i like your idea with the temperature control 🙂



  • @bearer said in Door Open Switch and LED´s:

    ............. I chose to make them as a thermostat controlled fan output, enabling whenever bed of hotend is over ambient temperature.

    M106 P1 S1 I0 F500 H0:1 T25 Basic thermostatic control for FAN1 either heater over 25C lights on.

    But I would like to make it so LEDs turn on whenever motors are active as well as when the temperature is high.

    Just out of curiosity, is that a "because I can" kind of thing or is there some practical reason?



  • @deckingman said in Door Open Switch and LED´s:

    @bearer said in Door Open Switch and LED´s:

    ............. I chose to make them as a thermostat controlled fan output, enabling whenever bed of hotend is over ambient temperature.

    M106 P1 S1 I0 F500 H0:1 T25 Basic thermostatic control for FAN1 either heater over 25C lights on.

    But I would like to make it so LEDs turn on whenever motors are active as well as when the temperature is high.

    Just out of curiosity, is that a "because I can" kind of thing or is there some practical reason?

    Printer is fully enclosed with relatively small windows so it gets relatively dark inside; temperature controlled works well enough when printing but for moving the axis when cold it would be nice to have light as well, and automatic is "always" better than manual:)



  • @bearer We'll just have to agree to differ on the "automatic is always better than manual" thing. ☺ I just use an on/off switch.....

    However, in your case how about putting your M106 command in your slicer start gcode rather than config.g? That way, the lights would stay off until you start a print and the temperature gets above ambient. Or maybe, just use a couple of macros - one to turn them on and one to turn them off. Then you could call these from the slicer start and end gcodes as well as at any other time. Just a thought........



  • Possibly getting a little OT, but if I can keep the config isolated to the Duet and not the slicer thats a + in my book. Sometimes I do remote operations using a IP camera as well, so automagic or at least controllable is good for me.

    I'm sure I'll come up with a better plan once I'm more familiar with the Duet and the firmware, but temperature control was quick, easy and 90% good enough, if need be I can heat the bed to 25C in seconds.



  • @bearer Fair comments. Just bear in mind that almost all gcodes can be input at any time - even "on the fly". Sometimes that can useful....



Looks like your connection to Duet3D was lost, please wait while we try to reconnect.