For our party room outside in the forest I decided to build in Arduino controlled lights (LED strips).
I wired it all up and soldered it using MOSFET transistors connected to a 12V power supply.
So I have a blue LED bar, a white, a yellow, a warmwhite, a RGB and two warm whites.
The LEDs are connected like this: MOSFET's left pin (gate? dunno the names but well, I know which cable belongs wherre :P) is connected to the PWM digital output of the Arduino Mega. the middle comes from the minus pole of the LED and the last goes to GND of the power supply (and GND of the arduino because otherwise the transistors don‘t switch properly). So, the LED bar's minus pole is routed through the transistor while plus is constantly powered.
The problem now is: The fans we use for giving fresh air work just fine, so do the yellow bar, the white bar, the blue one and the RGB. So, you turn them off, they're off, you turn them on, they're on and fading and dimming using PWM works perfectly.
The two warm white LEDs now are my "problem childs": When I turn them off, they glow pale, when I turn them on, the more other LEDs and things I turn on, the more they get darker. The buttons on the control panel are also lighted, and even if they turn on (there are buttons that trigger nothing yet but glow up on pressing) the LED bar gets a bit darker. And those two are the most important ones (light for the room). The one in the other room (also a warm white LED bar) also glows when turned off but fortunately does not dim when other things are turned on.
I checked the wiring and programming and solderings but I cannot find the reason for them glowing when turned off and being dark. And if I did a bad job soldering and building it was hell of random that exactly the two identical models (and not for example any other LED bar) have the same exact problem.
Check the voltage on your power supply while it is working. My guess is that it can't supply enough current and is dropping to a lower value when things load it (that is when you turn stuff on).
But I can turn on any other LED bar without any drop in brightness (and those are identical ones, just blue and yellow instead of warmwhite and the yellow one is also 1m long (60leds) and those warm whites are just 50cm (30leds) and the rgb led is also on the same cable like the two warm whites and they work fine. It's really just those warm white LED bars. And also I don't understand why they still glow a bit even when the transistor is "shut off". The others dont.
White LEDs drop more of a voltage than those of other colours, therefore they are much more sensitive to a low voltage.
And also I don't understand why they still glow a bit even when the transistor is "shut off". The others dont.
Well without seeing a schematic of what you have wired it is hard to tell but it could be the leakage current from your transistor. If this is the case you need a better one. Again white LEDs are more sensitive to this than other colours.
Grumpy_Mike:
White LEDs drop more of a voltage than those of other colours, therefore they are much more sensitive to a low voltage.
So, do you think it will help if I connect another cable to them so more current can flow to them?
Tomorrow I will check the voltage of the power supply and the voltage of those LED strips, maybe it helps.
But I don't know why even enabling a single LED that is connected to a digital output of the arduino (status LED that something is turned on) can drain the power so that the LED bar (which is connected to an external power supply using a transistor) gets darker.
No nether do I but it is the only thing I can think of. There must be something causing it and this is the most likely. If you post a schematic I could check that the wiring and grounding is right.