Setup lightcontroll over GPIO

Hey there,

I'm not a navie english speaker so sorry for my simple english. I would lioke to control my LED lightnig with the "OctoPrint-Enclosure" plugin. I'm more an artist as an electrian, my skills are a bit basic.
I have an 5V 3A USB powersupply and a hardware switch to tune no my IR-LEDs or the white LEDs. I try to adapt what I have and conect it with the raspberry.
This is what I think I need to build.

What I have are some BC547A transistors, I think they are fine (as I'm under 100mA and under 500mW)
I didn't have a datasheet for them but what I know from Amazon are the folloring specs: Type bipolar, NPN / Voltage 50V / Current 100mA / Power 500mW / Enclosure TO92 THT
D1 HIR 7373B-L289
D2 LED EL 5-14250WW
R1 100 Ohm
R2 10 K Ohm
R3 22 Ohm
R4 4,7 K Ohm
The value of R2 and R4 I have calculatet by an online tool. I'm not sure I done it right. I intendet an amplifier of 165 by the transistor but I only know It's a type A (between >=110 and <= 220)

I hope someone can help me out and have a look at my circuit diagram an the value or the resistors.

Thanks a lot

Hello @Gen-Chan !

This is basically correct. But you swapped the values of 1 and R2 and the values of R3 and R4.

You need the lower values as current limiter for the LEDs, if you would have the 10K for this, the current is way to low.
Also the transistor does not need a high current (100 Ohm). A 4k7 is sufficient.

But the transistors go to their limit. The max. current of a BC547 is 100mA.

And, it's better to put the LED to the collector side of the transistor.

You may have a look on this:

Thanks a lot for the hints. I have managed to build it up and it works totaly fine.
Have a great Thank for your improvements.