Correct wiring to run 12V LED on 24V Duet with PWM?
A number of months ago (been away from printing long enough that I've forgotten way too much) I'd configured a 12V LED (powered by a separate rail) to use the PWM of one of the fans so as to have adjustable brightness. According to my bookmarks I'd gleaned instructions from https://forum.duet3d.com/topic/2096/mixed-voltage-fan-setup, but atm I'm unable to be at all sure that I can once more hook things up correctly, and am wary of frying something should I be wrong while experimenting. Could someone be so kind as to refresh my memory? Thanks.
SupraGuy last edited by SupraGuy
The PWM switches the ground, so...
Connect the negative/ground of your 12V power source to the same ground as the 24V system. connect the positive rail of the 12V supply to your LED, and the negative to the PWM controlled fan output. The PWM will switch the negative pole, and vary the LED brightness.
I cheated a little with my 12V LED strips. I used 2 of them, and connected them in series then powered them from 24V.
Great, thanks for the reply @SupraGuy!
That was roughly what I'd remembered, but now for a little while I'm afraid I'll need a bit of hand-holding till I get back up to speed.
Jacotheron last edited by
If you want to remove the flickering of LEDs, especially at lower duty cycles, you can set the Fan Output's PWM frequency. I set mine at the maximum, and the LEDs can dim very low before I can sometimes notice a little flickering. To do this use the M106 command, like mine is (note this is for the center Fan output):
M106 P1 S1 I0 L0 F65535 H-1 C"LEDStrip" ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off; frequency is at MAX to reduce flicker of LED
Typically LEDs being switched on and off at lower than 1300Hz will flicker noticeably (for some people this threshold may even be higher and is dependent on other factors like ambient light etc). By raising this to the max, you ensure that even with low percentages, you are still well above the threshold (1300 is just under 2% of 65535).
mrehorstdmd last edited by
I use small DC-DC converters in my printer to drop the 24V to 12V to power LED strips, but I don't try to control brightness with the firmware. I just set the output voltage on the DC-DC converter to get the brightness I want from the LEDs (usually I set it to 12V for 12V LED strips because I usually just want maximum brightness.
Small DC-DC converters (called buck converters) are about the size of a postage stamp and cost about $1-2 each when you buy a 6 or 8 pack. The converters have adjustable output voltage so you can use them for powering all sorts of things including fans, etc. You can find a lot of surplus 12V fans in old electronic junk but 24V fans are a lot less common.
I just replaced the failed 30 mm hot-end fan in my printer (are they all junk?) with a 40mm server fan and put the DC-DC converter in the cable that plugs into the Duet board. I don't control its speed- just turn it on full blast when the hot end reaches 45C.
That's great info @Jacotheron, thanks so much for your help!
SupraGuy last edited by
@mrehorstdmd This is a BAD idea for PWM controlled fans, so shouldn't be used with the fan output pins, except POSSIBLY the constant on one, but even then I would probably just not. I also use a voltage converter for 12V stuff, but I'd highly recommend either jumping the 12V to the V_FAN pin, then letting the Duet take care of any PWM from there, or if it's intended for full-time full brightness (like for LEDs used for lighting) just wiring it up separately, and leaving the Duet entirely out of it.
@mrehorstdmd sunon makes a wonderfully quite and long running 30mm fan. More expensive but they last and your ears will thank you.
mrehorstdmd last edited by
@phaedrux That looks like a winner. They even spec them to operate up to 70C. I think the cheapo junk that comes with hot-ends usually has no specs at all and I find they don't last long at 50C chamber temperature.