1
\$\begingroup\$

NOTE: I have made some changes since the original question, the number of columns is 114 not 45, this may affect some of the answers below.

I'm working on a project with a large LED matrix I'm making. I'm using 114 columns of LEDs and need a way of iterating over the columns in such a way that I can use minimal number of pins from my AVR.

Back when I was in school I remember we used to use decade counters, the 4017, I seem to read now that these are obsolete, and they seem to have been replaced with bcd counters. That's all well and good, but I need pins, not efficiency, 4 bit bcd output doesn't help me, I need 114+ connections I can iterate over.

So, what do I use? I need something along the column length to switch them in sequence.

Below is a quick SPICE schematic I threw together of how I want to set this up, the difference is that my real project will have 28 LEDs in each column and 114 columns, R1-R28 and C1-C114.

I have 74HC595 8 Bit shift registers on the Rows, clocking in data, all I need is a suitable device to switch high the 114 transistors sinking the current.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ The 4017 is hardly obsolete, it is one of the most popular chips out there and basing circuits on standard jelly bean logic means it will be maintainable in the future and your schematics won't become obsolete. \$\endgroup\$ – John Meacham Jul 10 '14 at 6:22
2
\$\begingroup\$

The MM5450 may do what you want.

34 outputs, serial fed, chainable.
Notionally 3 pins to drive (clock, data, latch) but can be driven with 1 pin if needed. Digikey $4.39/1 This one in DIP-40 but also available in LCC.

if this does not suit your need you need to provide a more complete description of your requirement.

Outputs are open drain, ie either on = low or off = float or open circuit.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ THis looks like a very promising option, however, the output doesn't appear to be tri-state, how should I go about disabling columns I don't want switched on? I would have to output high on them to give no potential difference on them? \$\endgroup\$ – Hamid Sep 29 '11 at 21:03
  • \$\begingroup\$ @Hamid - they don't seem to spell it out but they are open-drain outputs ie either open circuit or low. See update to answer. \$\endgroup\$ – Russell McMahon Sep 29 '11 at 22:57
  • \$\begingroup\$ Ah yes, it would certainly appear that way from the diagram. I'll get some of these and try them out. \$\endgroup\$ – Hamid Sep 30 '11 at 0:33
2
\$\begingroup\$

If the 4017 does what you want, go ahead and use it. It's in active production by multiple companies: Texas Instruments, On Semiconductor, NXP (HEF4017B), NXP (74HC4017). When a chip is in active production by more than one company (multiple-source), I feel that it is much less likely to become obsolete than chips fabbed by only one company.

Any of the chips listed at Which SIPO chip is better, 74HC4094 or 74HC595 or something else? would also work in your application: All of those chips, like the MM5450 that Russell McMahon mentioned, use 3 pins to drive (clock, data, latch).

  • the 74HC595 (also available from multiple manufacturers) is popular for driving LEDs in POV displays. Those 3 pins of your microcontroller would drive a chain of 6 of the 8-output 74HC595 chips to drive 48 outputs.
  • TI's TLC5925 lets you set the sink current. Those 3 pins of your microcontroller would drive a chain of 3 of the 16-output TLC5925 chips to drive 48 outputs.
\$\endgroup\$
  • \$\begingroup\$ Thanks for the detailed response. In fact, I don't plan on sinking the current through the chips, they will be switching some high power transistors that will be sinking the current. As I want a logic high on the active column, and my columns are common cathode, this is the most logical setup. I am using the 74HC595 already for shifting in the data for each column before I iterate over them, they seem a little overkill for switching a bunch of outputs high in turn. although they all could work, I suppose I'm looking for the most "modern", least overkill and potentially cheapest option. \$\endgroup\$ – Hamid Sep 23 '11 at 10:28
1
\$\begingroup\$

One reason Russell's MM5450 is limited to the odd number of 34 outputs is that it's not a multiplexed device. The MAX7219 is multiplexed and can drive 64 LEDs. It has software brightness control, and selectable 7-segment decoders. And it may be overly expensive :-(, even more than two MM5450s.

But not all is lost. The CD4017 may be obsolete, but a number of the CD4000 series devices has been re-released as a HCMOS device, for the CD4017 that's the 74HC4017, so you still can go that way.

\$\endgroup\$
0
\$\begingroup\$

A shift register like the 74HC164 or 74HC595 will almost certainly work better for you than the decade counter. Either of the above will give you eight outputs each, and they may be cascaded easily to any number of devices without additional control logic. If you use the 74HC595, you can shift data into the devices without it appearing on their outputs until you hit a "register clock" signal which will copy all of the shifted data to the outputs simultaneously. For your particular scenario, though, that probably isn't needed.

\$\endgroup\$
  • \$\begingroup\$ The reason I was condiering the 4017 is because I only one 1 output active at a time, for the columns I'm using the 595's already because I need some or all (or none) active, but it seems overkill for a single high output on the rows. Is it still the best option? \$\endgroup\$ – Hamid Sep 26 '11 at 13:32
  • \$\begingroup\$ @Hamid: If you need to enforce a requirement that no more than one row may be active at a time, you could use 3-to-8 or 4-to-16 decoder chips and output an address in binary (using a counter or shift register to generate the address). You could convert an 8 bit address into 192 decodes using one 74HC138 for every eight, plus one more; adding a couple inverters would let you convert nine bits of address to 512 decodes; adding another 74HC138 without the inverters would let you turn eleven addresses into 1536 decodes; with the inverters, 12 address bits yield 4096 decodes. \$\endgroup\$ – supercat Sep 26 '11 at 15:01
  • \$\begingroup\$ @Hamid: If you're going to be outputting your rows sequentially, however, and you don't care about having hardware enforce a one-row-at-a-time requirement, a board layout using shift registers will be easier than a board layout using addresses decoders. Also, there exist some chips that combine shift registers with high-current drivers; I don't know of any combining a decoder with high-current drivers. \$\endgroup\$ – supercat Sep 26 '11 at 15:03
  • \$\begingroup\$ Another notion which might be workable for your forty-five rows would be to use a one-of-five selector to power on one of five master power transistors, each of which feeds nine others, and then have each output from a one-of-nine selector connect to one of the nine transistors from all five master transistors. That would reduce slightly the number of digital chips needed, though one digital chip per 8 rows really isn't too bad. \$\endgroup\$ – supercat Sep 26 '11 at 15:13
  • \$\begingroup\$ Thanks for the response, as you can probably see with a detailed look at the question I'v cocked up my numbers a bit, there are 114 columns not 45. Remnants from when I first wrote the question I guess. I understand your ideas, the cascaded transistors is a good idea. I'll take a look at hte selectors also. Thanks. \$\endgroup\$ – Hamid Sep 26 '11 at 16:17
0
\$\begingroup\$

Hobby project or commercial product? In the latter case do check whether it is realy worth it to add extra chips. A version of your AVR with more pins is probably available and the added cost might be surprisingly low.

You you need a driver between the logic output and the LEDs? If so check the TPIC6A595, it is like a 74HC595 with power outputs.

If still no match you probably have a low-current hobby project. Any means of outputting a single bit on a sequence of pins will do. Davidcary has linked some. I add the MCP23017 and MCP23S17.

\$\endgroup\$
  • \$\begingroup\$ It's a hobby project, yes, the AVR has enough pins but I don't want to "waste" them doing something as simple as iterating over 45+ columns, a chain of decade type counters would do the job and mean I can use just 3 of the pins. This way I have room to expand the project in the future, which is my intention. If I havn't lost the plot, all I need is some standard power logic to switch my current sinking transistors in turn as required. I'll post my SPICE schematic once I get home. I'll check out the chips you mentioned too, thanks. \$\endgroup\$ – Hamid Sep 23 '11 at 12:06
  • \$\begingroup\$ The first alinea mainly applied to commercial products. For a hobby project you might already have fixed the chip, and an 80-pin TQPF is possibly out of the question, even though it would make more sense cost-wise. \$\endgroup\$ – Wouter van Ooijen Sep 23 '11 at 12:39
  • \$\begingroup\$ Unfortunately yes, my AVR is part of a drop-in PCB, in short, it's a disposable Arduino board. \$\endgroup\$ – Hamid Sep 23 '11 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.