Go Down

Topic: Controlling multiple LED strips with the same microcontroller (Read 4679 times) previous topic - next topic

zhulien

I am designing a little bit of a lighting show composed of a few individual led strips which will be controlled by a microcontroller, Arduino UNO in particular. I want to control 7 individual led strips:

 1. 5x RGB 5050, 60 LEDs per meter.
 2. 2x UV 5050, 60 LEDS per meter.

Taking in consideration that the RGB LED strips need 3x PWM pins each, and I want to have a full control over the brightness of the UV strips too, we come up with a
5x3 + 2x1 = 17 PWM pins in total. Obviously, neither the Arduino UNO, nor even the Mega have that many PWM pins so I'm leaning towards using a LED driver - TLC5940. It can control up to 16 channels so I'll need 2 of it(+ the option to add more strips later). However, I'm not sure how to interface this pins with the transistors who will control the LED strips themselves.

Can you guide me how should I proceed, if I have any flows in the design and maybe if there's a better solution for my situation. The current setup is something like this:

The LED strips will be of varying lengths but I'll keep them 4 meters of length maximum. So:


1. 4x RGB LED 5050, 3 meters each:

* Amperage: (1.2A/m * 3m) * 4strips = 3.6A/strip * 4strips = 14.4A
* Power: (14.4W/m * 3m) * 4strips = 43.2W/strip * 4 strips = 172.8W

2. 1x RGB LED 5050, 4 meter:
* Amperage: 1.2A/m * 4m = 4.8A
* Power: 14.4W/m * 4m = 57.6W

3. 1x UV LED 5050, 3 meter:
* Amperage: 1.2A/m * 3m = 3.6A
* Power: 14.4W/m * 3m = 43.2W

4. 1x UV LED 5050, 2 meter:
* Amperage: 1.2A/m * 2m = 2.4A
* Power: 14.4W/m * 2m = 28.8W

Totals:

* Amperage: 25.2A
* Power: 302.4W

I'm planning on powering all the strips with a single 12V power supply allowing:

* Amperage: 30A
* Power: 360W

Each pin of the LED driver will lead to a TIP120(or maybe TIP31C) transistor to control each color channel of the strips(3 transistors for each RGB strip, 1 for each UV).

I'll also need to use some additional wiring for the strips in other to get them all to the controller(1-3m) because they'll be quite spread so should I be concerned about reduced brightness?

Also, never worked with a LED driver before, can it handle the job I'm assigning it for?

Do I have to add any resistors to the transistors?

Any help and positive criticism will be appreciated.

Note: I am not bound to the TLC5040 driver. I accept any solution that gets the job done safely and efficiently, no matter if it will use registers, drivers, software libraries and such. This thread can also be found HERE.

Wawa

...1.2A/m * 4m = 4.8A

Note that a TIP120 (or any other darlington) could drop ~2volt at that current. And get very hot.
And you end up with a dimmer LED strip because of that volt drop.
Better switch to logic level mosfets.

AFAIK the TLC5940 is a CC sink driver.
Have a look at the PCA9685.
Leo..

zhulien

Yeah, I'll swap the transistors for MOSFETS, something like this: IRLB8721.

About the PCA9685 driver: can I control the MOSFET gates directly with this? Will I need anything more except 2 drivers and the 3x mosfets for each strip? Also, I see the communication protocol is I2C. I'd have in mind controlling the strips through the Serial Monitor.(through a FFT spectrum analyzed data). Will the I2C affect anything?

I also came across a shift register solution using software PWM with a ShiftPWM library but the only tutorial of controlling a led strip/s was on the site of the creator, which is down for some reason.

I just really need a solution soon.

Thank you for the assistance.

Wawa

About the PCA9685 driver: can I control the MOSFET gates directly with this?
Page 34 of the datasheet.
Leo..

septillion

About the PCA9685 driver: can I control the MOSFET gates directly with this?
Yes

Will I need anything more except 2 drivers and the 3x mosfets for each strip?
Divers? You just need 3 mosfet per RGB strip and 1 per UV strip.

Also, I see the communication protocol is I2C. I'd have in mind controlling the strips through the Serial Monitor.(through a FFT spectrum analyzed data). Will the I2C affect anything?
Serial and I2C have nothing in common so no. It's just up to you to write to code, just like using the Arduino PWM itself.

I also came across a shift register solution using software PWM with a ShiftPWM library but the only tutorial of controlling a led strip/s was on the site of the creator, which is down for some reason.
Can do but is harder. Because everything is in software. Using hardware is wayyyyyy easier and barely costs more. And you get higher frequency and better resolution in return.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

zhulien

Thank you, septillion, that was very helpful. About the:

Divers? You just need 3 mosfet per RGB strip and 1 per UV strip.
I ment that i'll need 2 of this drivers, because my setup requires at least 17 PWM pins. I also don't think that mixing the driver ones with the native arduino ones is a good idea, because they run on different clock and frequency?
About the MOSFETs, i'll need just as many of them as the PWM pins.

So, finally, I'm thinking of going with the 2x PCA9685 + 17x IRLB8721. I hope this will sufice.

septillion

I ment that i'll need 2 of this drivers, because my setup requires at least 17 PWM pins. I also don't think that mixing the driver ones with the native arduino ones is a good idea, because they run on different clock and frequency?
So? Even different Arduino pins run on different counters and different frequencies ;) So for that single 1 I would not use a whole second PWM chip. A thing is that by default all PWM pins on an Arduino are just 8-bit. But the ones on timer1 you can increase to 16-bit. Also, you can increase the frequency a bit. The default 490Hz is a bit low-ish. But as long as you don't use timer1 for something else you can just change it :) Or if you  can life with 1 channel being 8-bit you can just use one of the PWM's of timer0 which already run at around 1kHz :)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

zhulien

I will use the Arduino for the sole purpose of reading frequency data from the serial and PWM-ing the LED strips. If i can balance the driver pins with the arduino ones in some way I would gladly do so. I already spent quite a lot on hardware and anything I'm good without from now on is a plus(but quality is the biggest factor nonetheless). Will I be okay if I purchase the chip only <reference> or do I need the board from Adafruit?

septillion

The PWM on the Arduino is hardware as well aka it leaves alll the time in the world to handle the reading of the data.

Just the chip is fine but you do need some jelly bean components like pull ups on the data, clock en OE lines and a decouping capacitor close by as always.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Grumpy_Mike

Quote
Will I be okay if I purchase the chip only <reference> or do I need the board from Adafruit?
Yes but look first at the package it comes in and ask yourself if you are capable of soldering such a thing and do you have something to solder it on to?

Go Up