SOLVED LED strip's brightness regulation

Hi guys!

Recently I’ve started making Arduino RGB strip driver cotrolled by IR diode. Firstly I coded it and tested on single RGB diode. Next I’ve bought 4x NPN transistors TIP120 and 5m led strip SMD5050 powered by 12V DC; 7.2w/m. I’ve connected it with Arduino UNO powered by power supply (DC 12v 3,33A). Colors are working great, but brightness regulation doesn’t work. Only working cofiguration is when I connect VIN pin to transistor’s emmiter pin and led strip 12V to collector, but I can’t regulate it by PWM signal from Arduino.

Do you have any ideas how to fix it?
Thanks a lot!

A schematic would be much better. Your "Schematic" in not readable in regards to the device and pin markings. From your description it appears that the grounds are not connected together. Nothing shows where the external power is connected. I do not have a clue as to what the 4th transistor is for, RGB are connected. As far as testing it on a single RGB diode that is a good way to begin but your circuit then is not the same as it is now.

Well the "fourth" transistor is complete nonsense here.

Note that by and large, "Vin" or the"barrel jack" on a UNO are useless as the on-board regulator has almost no heatsink and can barely supply sufficient current for the processor and USB interface. I have difficulty imagining what you were trying to do with that fourth transistor.

If you were using a 12 V supply, you need one of the readily available switchmode "buck" regulator modules to provide power to the Arduino when it is not connected to the PC for programming via the USB port.

Oh! I see! You want to switch the 12 V line to the LED strip with PWM. Well, you will need an NPN transistor to control a PNP transistor or (preferably) P-channel FET on the 12 V line. Somebody may come along with the circuit for that. :grinning:

Here you got better schematic, sorry for first one.
Okk, please correct me if I didn’t understand something correctly.

1)So I should connect LED strip directly to power supply, not from Arduino VIN pin, because Arduino can’t supply it correctly.

  1. I wonder why I need two transistors like you said. Could you explain it?

So I tried through Q5 transistor lower current on +12V LED strip pin, so it would shine weaker. I think I could control it by PWM arduino channel (like on RGB diode but through transistor) to make a pulse effect or simply decrease it brightness. But when I tried it on LED strip regulation didn’t work.

I didn’t put power supply on schematic because it is connect by barrel jack like you said.

wonder why I need two transistors like you said. Could you explain it?

As you have it now you have an emitter follower configuration. The biggest voltage you can get out of that is the 5V of the Arduino signal minus the voltage drop from emitter to base of the transistor, which in your case will be 1.4V leaving that signal to only get to 3.6V.
You need a NPN transistor to boost that signal to 12V so that when you use a PNP transistor to switch the 12V strip supply the voltage drive is sufficient to turn the PNP transistor on and off.

didn't put power supply on schematic because it is connect by barrel jack like you said.

A schematic that does not show everything is totally useless in electronics because a schematic is supposed to show how everything is connected.

OK, here is the circuit to perform “high side” switching of the 12 V supply.

The 12 V line to your RGB LED strip goes to the point where the motor and diode (which are of course, not relevant to your situation) go on the diagram. On 12 V, the FET does not need to be a logic-level one as it is driven by the 12 V and indeed, it must have an adequate Vgs rating - above 15 V.

Thanks a lot guys for help!
Have a nice day