How to Control an LED Strip via heater_3 on Duet2 WiFi?
-
Good morning everyone,
I have run out of controllable outputs on my Duet2 WiFi, so I've prepared an additional electronic circuit to connect to the 50-pin expansion port. My intention was to use a transistor to power a small LED strip. To activate and deactivate this transistor, I have used the heater_3 pin from the expansion port, as well as the 3.3V from the same port, as shown in the attached diagram.
However, I find that the system is not working as expected. The transistor always lets through a voltage, fluctuating between 20V when deactivated and 24V when activated.
I've configured the system as follows:
M950 F2 C"!exp.heater3" Q500 ; Create fan pin M106 P2 C"LED" S255 ; Set fan configuration
What could I be doing wrong? Does heater_3 behave like a switch?
Note: The diagram shows a 1K resistor, but I have also tried with a 220-ohm one, which was the value I got from an initial calculation. The circuit behavior is the same in both cases.
Best regards,
Aitor -
@Aitor afaik the heater outputs sink current not source it.
-
Good morning @nikscha,
For this reason, I used HEATER_3 as if it were a controllable GND. I understood that, when activated, it would behave as GND and, when deactivated, it would act as an open circuit.
Perhaps @dc42 or another administrator can confirm whether this is correct or not.
Best regards.
-
@Aitor to drive a 24V LED strip using a 3.3V low current output on the expansion header, you need to provide both voltage and current amplification. Your circuit provides current amplification only. The Heater3 output switches between 3.3V and 0V.
How much current does the LED strip draw? This information will help me to advise you on what circuit to use instead.
-
Good morning @dc42,
I forgot to attach this other part of the circuit, in which it can be observed that LEDLINK should act as GND when the transistor is in operation. V_FAN represents 24V, which I obtain from the outputs designated as 'always on fans'.
I haven't calculated the consumption yet, but it will be very small. I can check it and then tell you, but it involves two segments of LED strip, with 3 LEDs each segment, so the consumption cannot be very high. It's a LED strip similar to the one in this link, but it's 24V.
-
Good morning @dc42,
The total consumption of my LED strips is approximately 0.11A or 2.6W.
Best regards,
Aitor. -
Good morning @dc42,
After receiving your response and gaining a better understanding of the workings of Heater3, I have decided to remove this section from my circuit. Since Heater3 does not function as GND, I deemed it unnecessary. However, the outcome remains unchanged. Based on its behavior, when I activate and deactivate Heater3, the brightness of my LEDs simply diminishes. I'm beginning to think that either the 3V is insufficient, or the 0V doesn't manage to turn off my transistor.
I look forward to your response.
Best regards,
Aitor