controlling LED's with heater out
-
I'd like to control 3 LED's on my delta effector... if possible with PWM signal for dimming the LED's
My idea was to use the heater5 out on the expansion connector. The LED's are connected to 12VDC and needs 20mA current, therefore i will solder a "driver" with a transistor.
The scheme of that driver looks like this:
Can somebody please confirm that my idea makes sense? What are good values for the resistors for the transistor?
The resistor for the LED's is already defined and the "system" works when connected to 12VDC... -
@cosmowave I'm not qualified to give you feedback on your circuit, unfortunately. However, I was going to suggest, if these are straightforward white 12V LEDs, you could connect them to a fan header if those are running at 12V.
Ian
-
@droftarts Thanks for your answer. All fan headers are used at the moment... That's the reason why i'd like to use a heater out.
-
@cosmowave You could try simulating the circuit with https://www.falstad.com/circuit/circuitjs.html. The exp.heater5 pin will output 0 to 3.3V. I guess how much extra circuitry you will need depends on the transistor you use.
Ian
-
@droftarts I could test the circuit in "real conditions" with an external power supply... that's a good idea.
I'm nearly sure, that this circuit will work properly. As the transistor has only work as a switch, the resistor values should not be very delicate.
I'll try to find a datasheet of the transistor and will make some calculations... -
@cosmowave assuming that "Heater 5 out" is exp.geater5 on a Duet 2 expansion connector, that circuit is OK, although I suggest the following:
- omit the 10K resistor between the transistor base and emitter, instead connect 4K7 between exp.heater5 and ground. This should be sufficient to keep the transistor turned off while the board starts up.
- reduce the other 10K resistor to e.g. 1K to provide more drive to the transistor.
The exp.heater5 signal is active low so you will need to invert the sense of the heater5 output when you configure the port using M950.
-
@dc42 Sorry for the missing details!
Yes, it's a Duet2 and i'd like to use exp.heater5 on the expansion connector.
I will design the "driver" according to your suggestions.I was aware that i need to invert the output. But thanks anyway.