Halo, I want to be able to color a glass plate using a lot off RGB Leds, for now it is okay if the entire plate is the same color.
(In the end it should be wireless using the Xbee, but lets start with the basics)
I can make 1 LED dim and change color, but I need more light than 1 LED.
What kind off LEDs should I use? I read that it is not possible to connect thos 4 Pins RGB LEDs (with commen cathode) in series, so is it better to get a bunch off Red, Green and Blue ones?
I know my Arduino can only power so many LEDs, so how do I go arround and connect them together using a second power source?
An idea I was thinking off PWM-ing a transistor for this, would it work? what transistor would you recommend me?
Isn't PWM-ing a pin and recieving DATA from the PC interfering with eachother? perhaps different ways, like using the 555.
Any other tips/hint are also welcome, thank you for your time, I am a newbee, so keep it simple.
Use 3 PWM pins, hook up a transistor to each and then attach all the LED's leads to the appropriate pins in parallel. So all the red leads go to the same pin, etc...
You cant do it in series because they are common cathode. Just ground the cathode pin on all the LEDs.
AFAIK your standard transistor would be fine.
How many are you thinking of having?
Powering the Arduino off USB gives you a limit of about 8 RGB LEDs when they are all displaying white (so ~24 LEDs total). You could probably have a few more than that.
How I know is because when I used 8 RGB LEDs displaying white with a LCD attached, everything dimmed slightly.
You can just use a 9 - 12v plug pack and that will power a lot of LEDs. No need for a second power source.
PWM while receiving data is fine. Both are done in hardware not software.
all current arduinos come with a 168. concerning the right transistors: you're probably fine with many available models, i'm currently exploring BC337 (npn) transistors to gate audio from arduino. they are quite common, cheap, and probably would serve you fine... maybe someone knows better, but i got the impression that transistors are the most mysterical components when it comes to finding the best for one's needs.
BC547 is general purpose NPN and BC327 is medium current PNP for driver (the 337 is NPN)
for Rr Rb Rg value are depand on lightness of each element (around 150 to 1k)
and current to element should not over than maximum rating of LED ,
for rough calculating.. If max. 100mA, V=IR -> R=V/I -> R = 12/0.1
Then R should not less than 120 Ohm.
as I know, RGB LED lightness per current are not same on each color element..
may apply 100% PWM and try several R value for balance RGB to White color
Why I should I use another transistor to PWM the BC327?
because you use +12V. for common cathode tri-colors LED driver and control logic level from Arduino is 0 to 5v.
then driver can't drive directly by single transistor, NPN + PNP cascade circuit will translate control level and made circuit work.
if change driver voltage to +5V., You can use only PNP circuit part but action will be opposite (active logic LOW)
if circuit is active HIGH,
LED will ON while logic HIGH
and OFF if LOW
but PWM is blinking at high frequency, then human eye will see the "dimmed" light instead of blinking
at PWM 100% (255 in value) is always ON and most bright and dimmed if lower %PWM