I know there are some similar questions out there, but I'm really new to electronics and unfortunately they didn't provide me help. I want to control a tricolor LED strip (being able to dim each of RGB channels individually) with the Raspi.
EDIT This is the LED strip I'm using (german) http://www.conrad.de/ce/de/product/457534/X4-Life-LED-Streifen-RGB-Rot-Gruen-Blau I don't use the power connector, instead I exposed the 4 cables and worked with them directly.
EDIT2 I couldn't find a detailed spec, it's an end consumer product that comes with a controller and remote control ready to plug in. I figured out by measuring that 12V is full brightness and attaching a 12V battery confirms that. As far as voltage/brightness behavior goes, I can adjust everything in software, so that's not a problem for now.
I have software-based PWM for 3 gpio pins set up and everything so far works fine. The problem starts when dealing with the circuitry.
The LED strip has 4 connectors, one for +, 3 for RGB respectively (-). Each channel requires 12V to shine in full brightness. To start, I try to control the R channel, using a 12V battery as the power supply and a 4.5V battery to emulate the Pi (I'm afraid of connecting it directly for now, since I'm unexperienced, and I wanna make sure it works before actually connecting it). The R channel draws about 330mA when attached to 12V. I have 2 types of transistors lying around: BC728 (PNP) and BC116 (NPN).
This is what i tried: I crafted a 12V battery by chaining 8 1.5V batteries. I connected the + from the 12V to the + of the 4.5V to have a common ground, which is attached to the + of the LED strip. The - of the 12V goes to collector of the BC728 (PNP), the emitter is attached to the R channel. When I use the - of the 4.5v battery to touch the basis, the red LEDs should light, but they don't.
However, when I remove the LED strip and use a small light bulb, it dims lightly.
If I replace the 4.5V with a 9V battery I can even make the red LEDs of the strip shine, but not as bright as they should.
As it turns out, the voltage at the lamp/LEDs is considerably less than 12V. I tried adding a resistor between the basis and the 4.5V/9V battery, but it just makes matters worse (lamp/LEDs go darker).
My questions are: - What am I doing wrong? - If I get the circuitry right, how do I replace the 4.5V battery with the pi? After all then I only get 3.3V and there ground is negative, not positive. (And I have to choose positive ground, because of the LED strip, right?)