Wonder if anyone can help, Ive multiplexed 2 x TLC5940 with a 74hc595 as the current source, this is to drive an 8x8 rgb display, Ive set the 5940 to sink 60mA, this is set to the max value for the leds as they are only on 1/8 of the time, but the leds are still not that bright, is it possible that the 595 isnt feeding enough current to the leds ? the number of leds lit in a row makes no difference to the brightness.
the 74hc595's source and sink 25ma I'm playing with my led matrix at the minute and mine's pretty bright
yeah that might be the problem, as I`m trying to get it to source 60ma to overdrive the leds (briefly)
sounds like it could be I'm driving my common anodes with a transistor at 100ma and cathodes with the shift registers I can see it well in day light.
Yes you will find that even if you try and sink more through the TLC5940 it will not get any brighter because of the limited amount you can get from your shift register.
However using a shift register seems an odd way to go about multiplexing things. How big is the matrix you are trying to make? It would be good to post your schematic so we could help you get it right.
Its all I had to hand, I didnt consider the limited current issue, I`m using it to light each row in turn of an 8x8 RGB led array.
i.e. 1/8 of each time period a row is lit, the 5940 is loaded with that rows colours.
I`m guessing I need a chip like the one on the raindowduino.
p.s. Im a noob at electronics, though Ive coded for years.
I`m guessing I need a chip like the one on the raindowduino
or some other form of high sided drivers like a PNP transistor or a P channel FET. Look at what I did in these two matrix projects:-
http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html
One of these should do ?
Yes looks a good chip, will give you about 60mA per LED if you want it on an 8X8 matrix.
Getting a very odd effect, Im multiplexing with the 595 (soon to be swapped for something more appropriate), but Im getting to columns lit when I should be only getting one.
Each loop I light a single column, but Im getting two, so Im suspecting the shiftout of the 595 is having problems. Is it possible I need to add a capacitor to the latch pin ?
ah didnt think the cap was the problem, its an issue with updating the 5940 and 595 as its not an atomic operation Im getting bleed over when flipping the columns. I need to blank all columns before uploading the new column, otherwise you end up with a very brief ghosting in the previous one. :-?
Odder and odder, seems to work fine if I toggle the 595 in the main loop, and use Tlc.set.
But if I try to use tlc_playAnimation I get ghosting.
Ive modified the interupt callback to twiddle the 595, this works but Ive got the ghosting problem.
I should get (example for two rows
-------*
------*-
but I end up with
------
------**
volatile void tlc_animationXLATCallback(void)
{
if (tlc_animationPeriodsWait) {
tlc_animationPeriodsWait--;
set_XLAT_interrupt();
} else {
if (tlc_animationFrames) {
if(tlc_currentAnimation)
tlc_setGS(tlc_currentAnimation + (--tlc_animationFrames * NUM_TLCS * 24));
if(tlc_currentAnimationProg)
tlc_setGSfromProgmem(tlc_currentAnimationProg + (--tlc_animationFrames * NUM_TLCS * 24));
tlc_animationPeriodsWait = tlc_animationPeriodsPerFrame;
bitClear(PORTD,2);
shiftOutFast(4, 5, MSBFIRST, 0); //Shifts out the 8 bits to the shift register
bitSet(PORTD,2);
while(Tlc.update());
bitClear(PORTD,2);
shiftOutFast(4, 5, MSBFIRST, (1 << tlc_animationFrames)); //Shifts out the 8 bits to the shift register
bitSet(PORTD,2);
} else { // animation is done
tlc_onUpdateFinished = 0;
}
}
}
One thing to watch out for with the UDN2981: it has Darlington outputs, so you'll lose about 1.2-1.4V from the high side supply as the current flows through the transistors. That can be enough to seriously dim, or even not turn on, your LEDs.
You may need a separate LED supply.
No! This is a (common?) misunderstanding. The closed driver transistors have a collector-emmitter voltage drop of around 0.4 volt as any transistor.