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.
Well, thnx again for the info, This is getting cool!!
I hear/read that my Arduino has 6 PWM pins, but looking to the Amtel PinMapping, I only end up with 3 PWM pins. 1 RGB Color is cool though, 2 would be cooler
When I got this to work, I get me some Xbeez and build a wireless table, with LED inside, a bit like this one.
Perhaps I add a 64 leds (using this turorial) starlfield.
Enough about the LEDs now, I need to find me a decent transistor, any hints?
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
The RGB LEDs I have, painted white, show white with equal current on all 3 pins so they arent too dissimilar.
If you dont paint them white or do something similar then it looks pretty horrible because the lights are about 0.5mm apart from each other.
You can see the individual colours.
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)
:o Thnx for the expleantion, I understand it (a bit)
So, when I PWM an transistor with 1/2 the ammount off volts as the collector recieves, the emitter shall output 1/2 volts that the emitter is recieveing .
(this is lost in translation)
So, when I PWM an transistor with 1/2 the ammount off volts as the collector recieves, the emitter shall output 1/2 volts that the emitter is recieveing .
PWM still digital pulse signal (0 or 5 Volt only) but "Duty cycle" change is effect to average "Output power"
then the switch mode transistor circuit still work on PWM signal
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