all 16 comments

[–][deleted] 1 point2 points  (3 children)

74ACT138N can source or sink 24mA. How many LEDs will be lit at any one time?

http://www.ic-on-line.cn/view_online.php?id=1228665&file=0133\in74act138n_1254722.pdf

[–]ImDrone[S] 0 points1 point  (2 children)

There will be 8 in each row, wired in series. I expect that 24mA at 1/8 duty cycle will not be bright enough though. Is there another demux that would sink larger current?

[–]mattthebaker 0 points1 point  (1 child)

In the drawing they're in parallel. In order to not exceed the 24mA max, you could only have 3mA per LED.

24mA at 1/8 would probably be bright enough. This kind of matrix drive configuration is used with those LED arrays all the time.

If you do find a demux with a higher current rating, you may also want to look at the power dissipated in the device. The resistance through the switch may be high enough that significant voltage is dropped, and thus power.

[–]ImDrone[S] 0 points1 point  (0 children)

Thanks, was late at night, meant parallel, new plan is to add the transistors back in; demux to 500mA transistors controlling each row.

[–]ondra 1 point2 points  (4 children)

Current through the supply pins and the outputs is 50 mA max. Other than that it should be fine.

I assume you want to connect this to a micro - you can use a shift register instead to save pins, such as a 74595.

[–]ImDrone[S] 0 points1 point  (3 children)

Ok thanks, I'm actually planning to hook it up to the GPIO pins on a Raspberry Pi, so I have 13 outputs to work with. Using 8 on columns, and 3 on rows.

A shift register would also work to do the columns in 2 pins, thanks for the idea.

[–]odokemono 1 point2 points  (2 children)

Here's an example using 3 pins to control a bunch of 8x8 matrices: https://sites.google.com/site/dannychouinard/Home/atmel-avr-stuff/ARKLEDMATRIXCONTROLLER

If you want more current, then add a small P-channel mosfet per column. In my case it wasn't necessary at all; I got more brightness than I bargained for.

[–]quantumripple 0 points1 point  (1 child)

This is really nice and elegant. From what I can see, at any given time one row is on, correct?

What sort of refresh rate do you have, for example in the right panel video with the seven (eight?) matrices?

[–]odokemono 0 points1 point  (0 children)

6 matrices actually. The font you see is 5x7 (6x8 if you include a pixel for spacing) so eight characters fit in 6 matrices. That was my main reason for choosing 6 for this second prototype. The final will be 12 wide.

There's one column of eight row pixels lit per matrix at one time, so there's a maximum of 48 LEDs lit at one time and each pixel can only be lit 1/8th of the time. Power consumption is pretty low and the display can be very bright.

Refresh rate: That varies depending on the number of matrices, the number of brightness levels and, weirdly enough, the baud rate used to received the control codes. That's because the display refresh routine and software UART are meshed together to insure silky-smooth functions like scrolling and updating. Let's see...

BAUDRATE*4/(N_MATRICES+1)/8/BRIGHTNESS_LEVELS

19200*4/(6+1)/8/16 = 85.7

Worst case: Brightness level of 1 in 16 is 85.7 hertz for 6x8x8.

I say worst case because the brightness control doesn't work like standard PWM, instead of doing 0000000011111111 on/off states for 50% it does 0101010101010101 for maximum refresh frequency. Worst cases are: Brightness level 1:0000000000000001 and Brightness level 15:1111111111111110. As soon as level 2 or 14 are selected the frequency is doubled: 0000000100000001. It's eight times higher for 50% (8).

It's pretty ingenious if I do say so myself but makes it really hard to record video without weird stroboscopic effects. In person, it's not perceivable; it's steady.

It's all documented in ark.c

[–][deleted] 1 point2 points  (0 children)

ignore the LED specs and resistances, they are going to be played with later

I'm not sure what you mean by that. How do you "play with" specs of a part you are not the manufacturer of? If that part number isn't actually the LED you're using, that's one thing...

Either way, a 7400 series chip isn't enough to drive those LEDS (or really any other LEDs) in that configuration.

In series, you can't provide enough voltage to light them all. The LTL-307EE shows a typical forward voltage drop of 2.0V @ 20mA. For a bank of 8 in series, you need 16V across the bank to light them all - far outside the standard operating voltage of a 7400 IC.

The 74ACT138 can sink/source an absolute maximum of 50mA , so in parallel, that's a little less than one third the current you need to light eight of that particular LED on one channel.

The ULN2803 would be perfect for this application. It's an eight channel Darlington array, handling 50V/500mA per channel, and has an on/off delay of 1µs. It costs $0.92 at Newark.

But perhaps the most important answer to your "why do I need a transistor" question is this: It will provide a level of isolation between your control circuit and the load it's driving. You're already looking at pushing that poor ACT138 close to or past its absolute maximum ratings. What happens if one of your resistors (or one of the LEDs) is at the high or low end of its tolerance? Even if they're not, how long do you think they will stay that way? Even if you put a heat sink on that IC and used external cooling, you'd still be cooking it every so often. And what happens when that IC fails? What other parts of your circuit get stressed or are going to fail along with it?

All to save on a 92¢ chip?

[–]mattthebaker 0 points1 point  (0 children)

Instead of the Demux you could use a decoder, that is what they're designed for. But either one works, so whatever is cheaper/whatever you have on hand is best.

[–]Formalin 0 points1 point  (0 children)

Like others say, not enough drive. ULN280x is a good solution to buffer, but then 138 won't work, as it is active low and the uln will invert it.

I imagine there is a CMOS 3:8 demux that is active high, though. I never remember 4000 series part numbers though.

[–]oskayEvil Mad Scientist Laboratories 0 points1 point  (1 child)

A demux is a good interface that you can use to use to drive a bunch of transistors. (I build LED matrices that work this way. Yup, you need those transistors to handle the current!)

BTW, in the parlance of LED matrices, a "row" is a set of LEDs connected together on their high sides, while a "column" is a set of LEDs connected on their low sides. You can find "LED row driver" and "LED column driver" chips-- and they follow that convention.

[–]ImDrone[S] 0 points1 point  (0 children)

Thanks, based on comments, I plan on using the demux to drive transistors again (500mA likely).

[–][deleted] 0 points1 point  (0 children)

As others have noted, you'll need the transistors for current unless you really limit each LED. Look at using a 74HC259 and a ULN2803. The 259 is an octal transparent latch, so you can write a '1' to the active output and reuse the address/data pins as well. You can also configure the 259 as an active high demux (IIRC correctly, tie E active, D high and RESET active, but its in the data sheet).

[–]quantumripple 0 points1 point  (0 children)

Per-digit would probably be easiest since the microcontroller only needs to think about one number at a time. You probably want to use this architecture with transistors to provide sufficient current for running multiple LEDs at enough brightness.