Paul__B:
Well, it seems you are befuddled about a number of things here. "one microcontroller with enough pins to manage all the LEDs" is wrong for starters, Charlieplexing is not workable for your project but using shift registers or in fact, proper LED drivers is "the best".
Checking out the video you cited (and I did not waste 6 minutes on it but verified the following details), the effects shown do not require fading or colour mixing - it used only the primary colours. Accordingly, you do not need PWM.
You have cited an Alibaba link. While I very much doubt they can actually supply "700000000 Piece/Pieces per Month"
, you would find they had a minimum order of several thousand, so you certainly would want to "require a lot of" the LEDs.
Unfortunately, that reference fails - unless I am not very observant - to specify whether these RGB LEDs are common-cathode or common anode - which is a somewhat important matter in regard to how you drive them as some driver ICs work with one rather than the other.
Using "Neopixels" may be overkill but would be one solution; you could drive them easily with an Arduino Nano and allow colour mixing and fading. For economy, using MAX7819s would be very practical as you can get PCBs with the chips on eBay.
First of all, thanks for everyone reply and help with ideas.
I spent 3 days doing research regarding the solutions that have been offered to me:
- Neopixel would have been an awesome solution, but sadly i'd be working with a 1/24 die cast vehicle which requires led smaller than what neopixel offer (smaller one available is 5050). Therefore this isn't an option ;
- tlc5928 I haven't found many tutorials regarding this one, and being new to arduino i'd rather work with well documented / tutorials so i can have a solid base
- MAX7219 : I have been searching around for tutorials about this, but I'm afraid it might not be suitable for my project because of the V-shape of the lightbar (i'm still at beginer level with arduino, i'm sure you could make use of the MAX7219 for whatever you want even with a v shape, but it seems to be more appropriate for (rectangular) display / message boards
- Shift register: 74HC595 This is indeed a good option, provides more I/O pins and PWM, i'm more likely going to use this
Although i do not need fading, I'll still require 18 PWM pins because I need amber light not yellow (which indeed would not have required PWM), the color combination is the following:
red/white
blue/white
red/amber
blue/amber
I did the math and will require about
-36 I/O pins for the left and right LED (6 leds on the left side, 6 leds on the right side)
-18 PWM pins for the rear light (6 led on the rear)
-one pin for a IR receiver
and eventualy an additional 5 pins for a siren module (speaker + the smd card with the audio file).
atmega 2560 would provide enough pins though, but atmega16 with a 74HC595 would also work.
I have attached a blueprint of what the lightbar should looks like with the lights combination.
I'm more than open to hear on feedbacks.