duet 2 wifi web control of E1 for 24v LEDs
-
Hi guys, I'm converting an Ultimaker 2+ and want to control the 24v LED strip from the web control using the E1 heater pin. I'd like to use this as all my fan pins are taken or is there a better way? Just to warn you I'm new to this so need a bit more help. Many thanks
-
@JTBrown Not sure why you deleted this thread, thought it was quite a useful one! I've reinstated it. If you have resolved this, better to post your method for others to follow.
Yes, you should be able to do this, if the LED strip is 24V. But it will depend on your firmware version how you do this. Send M115 to the Duet and post the reply.
If you're using RepRapFirmware 3 it's pretty easy; use M950 to configure E1 as a Fan or GPIO pin, then use M106 (if defined as a fan) or M42 (if defined as a GPIO). The advantage of defining as a fan is that you get a slider for the LEDs (in the fan section) in DWC.
If you're using RepRapFirmware 2, you need to disable the E1 heater with M307, eg M307 H2 A-1 C-1 D-1, then use M42 P2 to control the lighting. See https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins#Section_Logical_pin_numbers if you want to use a different pin.
Finally, you can use macros to change the lighting, or just turn it on in config.g if you want the LEDs on all the time (but then you may as well have connected the LEDs to an 'always on' fan pin, or direct to VIN!)
Ian
-
@droftarts Many thanks, I will give it a go.
-
That is after I have sorted out another problem! lol
-
Other problem sorted!
I'm using RepRapFirmware 2.05.1. So would I be putting the M307 H2 A-1 C-1 D-1 and M42 P2 in the config.g file? -
Yay I now have lights!
They didn't work with just M42 P2 though. I added S255 to it and away we go.
Just got to learn how to "use macros to change the lighting" now. Thanks @droftarts! -
Is there a way to add a slider, like the fans sliders, to the DWC to control a dimmer for the LED's?
-
It might if you defined them as a fan. I think I've seen people do that before, but that may have been when using a fan header. Might be more doable with RRF3.
-
@JTBrown said in duet 2 wifi web control of E1 for 24v LEDs:
Is there a way to add a slider, like the fans sliders, to the DWC to control a dimmer for the LED's?
For RRF2, try:
; LEDs M307 H2 A-1 C-1 D-1 ; disable heater on E1 HEATER M106 P2 A2 S0 T-1 C"LEDs" ; define fan 2 as LEDs on H2
'P2' sets this as a third fan (assuming you already have P0 and P1), A2 maps it to the E1 HEATER pins. This should show up in the fan sliders. You can control it with M106 P2 Snn, where nn = 0 to 255 or 0.0 to 1.0. See https://duet3d.dozuki.com/Wiki/Gcode#Section_M106_Fan_On for more settings.
Ian
-
Works a treat, Thanks again @droftarts