Ok I'll start by saying i'm totally new to electronics, (Java programming is my hobby) I'm also new to this site, (The Ben Heck Show brought me here).
Basically I have a really cool plan for a PC build I just completed, all of the fans have 4 blue LED's. I want to replace those with RGB LED's Allowing me to choose any colour I like to suit my mood.
The controls will be mounted in an empty 5.25" drive bay, And consist of 4 push buttons and an RGB led.
Button 1: Mode (Cycle through pre-set colour cycling modes, and static user defined color)
Button 2: +
Button 3: -
Button 4: Colour Select (R, G, B)
You cycle through the pre-sets with the Mode button pre-set X > pre-set X > user defined
The front panel RGB LED will be off while in pre-set mode, when you reach user-defined mode the led will light fully red indicating that the + and - buttons will affect the Red value of the fan lights
Pressing the Color Select button will cause the front rgb led to change to Blue allowing you to alter the Blue value, a further press changes to green then back to red
I'm also hoping in the future to have control over serial from a program running on the pc I intend to write (using one of those SparkFun USB to serial breakout boards connected to an internal USB header) https://www.sparkfun.com/products/718
The entire lighting system will get its power from a 4 pin molex connector coming from the PC PSU
I mocked up a schematic of the circuit in Fritzing, I'm guessing it will work properly, however I may be totally incorrect and pop something
The Micro-controller used will be an ATMEGA328 with the arduino boot loader mounted in a socket on the PCB
its supply voltage will come from the 12V pin of the Molex through a 7805 Voltage regulator
Was also wondering could I do-away with the voltage regulator and power the chip directly using the 5V pin of the molex?
The connector labelled C4 will go to the LED's
The RGB LED's will be Common Anode each colour connected in parallel each with its own current limiting resistor , they will be switched using 3 NPN Transistors one for each colour.
From my calculations based on figures I found on-line each LED colour drawing 20ma * 16 = 320ma per colour channel so my transistors need to be able to switch that load
My main question, Will this work how I have designed it, or will I destroy something? and is there a better way?
Edit:
After doing some research i found using common cathode RGB LED's with PNP transistors wouldn't have worked the way I intended, so i have updated the schematic to reflect this