I'd really appreciate some guidance here. I've tried to work this out, but I'm not confident I've worked it out correctly, or that I'm reading the graphs on the datasheets right...
I have a PIC with outputs that I want to drive chains of RGB LEDs. I've have a 5m long RGB LED strip that uses a common +12V line, and a separate GND connection for the R, G and B.
I intend to slice this up into several pieces, and would like to be able to drive them individually from the PIC.
I've been successful driving the whole chain using PWM and three IRL520 MOSFETS... but to do what I want with those alone would mean a lot of MOSFETs and the price quickly adds up... plus I think it may be overkill anyway.
So, what I'm thinking is using darlington transistor arrays on a chip to control the sections, and then MOSFETS for the PWM at the end.
My thinking so far...
I don't know what the spec of the RGB-LEDs is, however I do know that the 5m chain needs a 5A power supply. That's 1A per meter, or alternatively 1.667A per colour.
The PIC I'm using has 36 I/O pins (PIC16F1789).
I intend to slice the strip into 8 pieces, requiring 24 channels (8R, 8G, 8B).
I then intend to use 3 channels to control PWM (the intent being to have the colour universal across the strip, but sections individually on or off in time with the music).
Total: 27 channels - well within the 35 I have, so that leaves some for the audio data to be input.
1.667A / 8 slices = 0.208A per slice (say 210mA)
This means each transistor array needs to be switching 210mA on and off. The MOSFETS need to be switching 1.667A on and off quickly (PWM).
The PIC outputs +5V on its logic outputs. It says it can drive up to 25mA per channel, but it also specifies max 340mA on the Vss/Vdd pins, so I'm inclined to think it safer to split that between the pins... hence I am working on the assumption 10mA per pin max to drive things.
I've found the ULN2803A Darlington Transistor Array
http://www.ti.com/lit/ds/symlink/uln2803a.pdf
Assuming I'm reading that right, it's up to 500mA per channel with 8 channels, which is more than enough for my 210mA requirement. However... if I'm reading the graph correctly, I need to feed 50mA in to get 210mA out!? Surely that should be nearer 50uA in to get 210mA out!?
Assuming it is 50uA (which I'm nervous about), then even if the PIC outputs 4.5V, I need a resistor... or can I feed that chip direct?
V=IR, so R=V/I
R=4.5V / 0.00005A = 90'000 (90k), so I could even use a 50k resistor and be fine.
...have I lost my marbles? I'm sure I'm going wrong somewhere.
I have a PIC with outputs that I want to drive chains of RGB LEDs. I've have a 5m long RGB LED strip that uses a common +12V line, and a separate GND connection for the R, G and B.
I intend to slice this up into several pieces, and would like to be able to drive them individually from the PIC.
I've been successful driving the whole chain using PWM and three IRL520 MOSFETS... but to do what I want with those alone would mean a lot of MOSFETs and the price quickly adds up... plus I think it may be overkill anyway.
So, what I'm thinking is using darlington transistor arrays on a chip to control the sections, and then MOSFETS for the PWM at the end.
My thinking so far...
I don't know what the spec of the RGB-LEDs is, however I do know that the 5m chain needs a 5A power supply. That's 1A per meter, or alternatively 1.667A per colour.
The PIC I'm using has 36 I/O pins (PIC16F1789).
I intend to slice the strip into 8 pieces, requiring 24 channels (8R, 8G, 8B).
I then intend to use 3 channels to control PWM (the intent being to have the colour universal across the strip, but sections individually on or off in time with the music).
Total: 27 channels - well within the 35 I have, so that leaves some for the audio data to be input.
1.667A / 8 slices = 0.208A per slice (say 210mA)
This means each transistor array needs to be switching 210mA on and off. The MOSFETS need to be switching 1.667A on and off quickly (PWM).
The PIC outputs +5V on its logic outputs. It says it can drive up to 25mA per channel, but it also specifies max 340mA on the Vss/Vdd pins, so I'm inclined to think it safer to split that between the pins... hence I am working on the assumption 10mA per pin max to drive things.
I've found the ULN2803A Darlington Transistor Array
http://www.ti.com/lit/ds/symlink/uln2803a.pdf
Assuming I'm reading that right, it's up to 500mA per channel with 8 channels, which is more than enough for my 210mA requirement. However... if I'm reading the graph correctly, I need to feed 50mA in to get 210mA out!? Surely that should be nearer 50uA in to get 210mA out!?
Assuming it is 50uA (which I'm nervous about), then even if the PIC outputs 4.5V, I need a resistor... or can I feed that chip direct?
V=IR, so R=V/I
R=4.5V / 0.00005A = 90'000 (90k), so I could even use a 50k resistor and be fine.
...have I lost my marbles? I'm sure I'm going wrong somewhere.