Me and my friend is building a led-table with 5x5 pixels (kind of like the daft punk table replica on instrucables, but we have a different approach.)
Anyway, since we got 4 diodes to act as one pixel (They are RGB-Leds, so we got 1 cathode wire and 3 wires for the Red, green and blue.)
Basically right now we are looking at different ways to drive our boards, we want them too shine quite brightly so you can see the pixel-color in daylight atleast.
Now, how are we supposed to do this? We can't just drive all pixels straight off the arduino board because they can only give 40mA(?)..
Don't know the exact numbers but the difference between our PSU and straight off from arduino is quite different (light wise.)
And we need that extra light.
Now, should we drive them of the arduino but between the arduino and the led pixle we have a transistor?
Or one of those shiftregistors, MAX7219? etc etc.
We need some practical solutions here, anyone care to help out?
Oh and if there would be huge differences from coding with or without the extra components then we will probably need some links to hep us get started with that.
Thank you so much in advance.
// Kristoffer and Stefan.
5 x 5 pixels ? Nothing else ? Maybe, in this case, you can use Arduino pins directly , without shift registers. You have to increase a current and transistors are ok for this purpose. 5 x NPN and 5 x PNP plus resistors in bases and resistrors for limiting a collector's current.
But, as I see now, you are talking about RGB leds, it means , you need more pins.
I don't think you can not drive it directly from Arduino.
An arduino pin can source 40mA (Absloute max), BUT the Arduino board as such can only source 200mA total. You have 5 x 5 x 3 LEDs total, and even if they are like standard LEDs that consume around 20mA you could only have 10 lit at a time before you would excede Arduinos 200mA limit.
If you need to control the RGB LEDs colors individully you will need something like the MAX7219 or similar to get a lot of PWM outputs.
Another option would be to use the shiftbrite leds:
Yes RGB Diodes, but we plan on only using 2 colors (red and green.)
Mainly because we feel that if we take all the colors we get in way above our heads.
We were thinking that we can have the green ones constantly on, and when a pixel is supposed to be on, we just light the red one.
Because the red one is so much lighter than the green one on same voltages.
But well if you guys would help us by pointing us into the right directions we probably could use all 3 colors but yes, for now we are only planning on 2.
And for the arduino it would look like only 1, because green wouldn't have to go through the arduino at all.
It feels like a sloppy solution but we don't want to take too much water above our heads. But if there is no real big difference in terms of difficulty and we get the support as I said, we can go for it.
I have worked some with transistors and knows that atleast PNP (right?), take currents in to the base and sends out that current x a number out or something along those lines.
Though I can't figure out in my head right now but do the NPN do the very same but lowers instead of sends out higher ?
But something tells me it just uses another leg as base for input of currency but I'm not sure what difference it would do..
I'll read up some more on that tommorow when I'm in school again.
But we are very thankful for all the help we get, I was honestly surprised that you guys even cared to post. =) Very appriciated.
Oh and just to be clear, yes 5x5 but with every pixel having 4 diodes so 5x5x4..
In other means, we will use 100 diodes. (which is why I know we wont be able to run straight to diodes from arduino without some sort of transistor or other component.)
I am not sure why you thing the red is the brightest. I got some of these and the red was very feeble, the blue was bright and the green was way too bright. Those are the LEDs I used on the RGB monome link I posted earlier. So I had to put the maximum current through the red and throttle back the current on the other colours to get a balance. You also need a good diffuser. When you get them experiment first with just directly connecting them through a resistor to the power to make sure you have enough light so you can plan your circuit properly. Then think about controlling them.
We allready got them and have experimented quite a bit, by dimming them differently to get different colors (1 led directly to the arduino.) and we basicaly had to have a range from 1-100 on the red and 1-255 on both blue and green to even them out.. I know, badly explained but I'm new to coding.
I basically just took the dimming example and changed it for working with 3 leds.. Or rather 1 led but 3 legs.
For diffuser we are thinking of some kind of plastic film, we have tried onion paper and it worked like wonders but since It's going to be a table onion paper would look strange when It's all bent and not flat etc etc, so some sort of plastic film is how we will go.
We were first thinking of 10x10 using only 1 LED light up a pixel.. But we quickly noticed they were way too weak, but 4 of them was perfect. Which is why we are going for only 5x5, so we can use 4 LEDs in each pixel.
EDIT: Forgot to explain it before, no dimming/brightness is needed, we just want on and off.
That doesn't stack up. If you don't need dimming then you can't use the range 0 to 100. That is only available on the PWM pins and there aren't many of those. What value of resistors are you using in line with the LEDs?
I used PWM to tinker with the LEDS, never ever held in a RGB led before so I figured using the PWM's we could get some cool colors and such.
We have no intentions of using PWM in the project, at all.
(well would be nice to be able to shift the overall brightness of the projekt with a potentiometer, so at night It doesn't have to light up the whole room and such x)
I'm sorry if I write sloppy, constantly shifting from "I" to "we", we are indeed two people working on the projekt but only one (me) on the forum and the initial tinkering was done solely by me.
Again, I'm sorry if I constantly throw strange variables at the topic and make things seem like things they actually aren't. To my defence for causing confusion, It's getting late here in Sweden.
Now this should be:-
Me and my friend are building.
The English as you used it is the sort of language that young people trying to sound like street wise Jamaicans use.
OK so you are not using PWM so you have to balance the colours with different resistor values. I would be interested in what values you use.
Hmm, four RGB leds in every pixel ? They usually have one pin common (cathode or anode) which prevents connecting them in a series (this of course causes a problem with voltage drop). If they are paraell, they need 4 times larger current and a current through each led must be "unified".
I know that is why I didn't mention it at the start although it was the first thing that struck me. However, some people like to be corrected as a part of there learning experience and I know that is especial true of the Scandinavian people. It is a wonderful part of the world and I have visited it many times, although not as many times as I would like. The people there are very friendly and have a enviable life style and I am frequently asked by them "is that the way to say it".
So forgive me if it came over as a bit prudish but it was meant to be funny as it made me laugh not in a mocking way but in a sympathetic way.
Pepe:-
which prevents connecting them in a series
My understanding is that they want to control each individual LED in a curtain and so connecting them in series is not an option anyway.
I will upload a couple of pictures when I get home but here is some more info.
The resistors are 500ohm each, we have soldered one to each led, they are common cathode so we have soldered it to that.
(4 LEDs, 4 resistors in every pixel.)
We have soldered it in such a way that we have 4 wires out from each pixels, 1 ground and 1 for each color of the diodes, which I believe I have explained before but It was most likely in a very sloppy manner so here I explained it again.
Since I do know my english are in no way perfect, I appriciate any corrections you guys might do how else will I learn from my mistakes?
So don't worry about making me upset, I am very aware that I do mistakes so I greatly appriciate all the help I get. ^^
Now we got some more information here.
This is the amperage going through a pixels each color (4 LEDS in parralell circuit.)
This is at 6.56V.
We might be wreckles going up so high but the resistors doesn't get any warmer and there generally seem to be no problem at all with it so we went at 6.56 because if we go lower, they wont be able to light up each pixel as good. (which makes me belive that we may have bought wrong diodes for this project but we are pretty much stuck with these for now.)
Red, 36mA
Green, 27mA
Blue, 27ma
If we use both colors together we still get 36ma, and only red will shine. We are not planning on using blue because we found out that on some of the diodes the blue doesn't work, at all (but red and green does.) but for the cause of giving out all the info we give out that info as well.
Pictures will (hopefully) be going up when I get home.
The resistors are 500ohm each, we have soldered one to each led, they are common cathode so we have soldered it to that.
(4 LEDs, 4 resistors in every pixel.)
Not sure about this. If it is a common cathode (which is rare) then the resistors have to be soldered to the anodes, one resistor for each of the three elements in the LED. It sounds like you are not doing this because:-
If we use both colors together we still get 36ma, and only red will shine.
The red will only be one on because it drops the voltage to such an extent that the other colours can no longer turn on. With a separate resistor in the anode then this would not happen.
This is the amperage going through a pixels each color (4 LEDS in parralell circuit.)
This is at 6.56V.
6.5V is a voltage not a current or amperage. Is that the voltage you are driving the LEDs at?
Those currents seem quite high and don't tie in with a resistor of 500R.
It would be good to see some schematics of what you are doing.
I do know 6.56V is Voltage, It was supposed to be written in parenthesis.
Yes I am a bit worried about this voltage + our low resistors but ofcourse we are both open for other solutions.
If you look at my past link you get all the info on our diodes, yes It's common cathode.
A quick schematic of how 1 pixel looks for us.
(A very quickly made schematic.)
I hope this clears some things up.
The problem is that only the LED with the lowest voltage drop (red) will glow, because electricity takes the path of least resistance, you need one resistor for each color.