0
\$\begingroup\$

I need to be able to control ~4000 LEDs with as few digital IO pins as possible. I can't really explain why as the project I'm working on is confidential, but the plan is for this project to be driven by an arduino, or similar, microcomputer.

So far, the most efficient method that I've been able to find is charlieplexing which offers n^2-n number of controllable outputs for n pins. Even this doesn't look as though it's going to be feasible for this number of LEDs.

Is there an even more efficient method and, if not, would anyone have any suggestions of how I could proceed?

Unfortunately, I don't believe that utilising multiple "slave" controllers to add more IO ports will be possible due to the size constraints (it will have to be not much bigger than a large mechanical keyboard).

Some additional information asked for in the comments:

  • LED Power: I haven't determined the exact make of LED that I'll be using yet, but they'll be 1mm LEDs so shouldn't require much power at all.
  • Refresh rate < 1Hz would be sufficient.
  • Only On/Off LED control is necessary although being able to control the radiance of the entire array uniformly would be useful (with every LED being the same brightness).
\$\endgroup\$
  • \$\begingroup\$ You don't centralize the multiplexer, it would be too much wiring: you need each LED be wired to the multiplexer so in this case 8K lines at least. Instead, you distribute the multiplexer to each LED, you use 12 wires as a bus and each LED turn itself on when the 12 wires are the correct combination for itself. There should already be ASIC solution. If you feel one controller per LED is expensive, you can try something like 16 LEDs per controller, to find some tradeoff between wiring cost and constroler's cost. \$\endgroup\$ – user3528438 Oct 15 '17 at 17:49
  • \$\begingroup\$ @user3528438 Have you got a diagram of something similar that I could look at? Part of the problem with having loads of controllers is that they're too large \$\endgroup\$ – user159015 Oct 15 '17 at 17:54
  • \$\begingroup\$ @JamesHughes then I think Transistor's answer is ok for your application (depending on how much are you willing to spend!). \$\endgroup\$ – next-hack Oct 15 '17 at 18:18
5
\$\begingroup\$

Addressable WS2812 LEDs may be what you require. These are used in indicators and common LED strips.

enter image description here

Figure 1. Individually addressable LEDs. Source: Espruino.com.

enter image description here

Figure 2. Strip version.

See Sparkfun WS2812 datasheet for details on communicating with these.

I'm not familiar with these ones but a quick scan of the datasheet reveals

When the refresh rate is 30fps, low speed model cascade number are not less than 512 points, high speed mode not less than 1024 points.

That means you could control them all with four micro output pins.


From the comments:

Unfortunately, the system I need will have them split into 40 10x10 disparate arrays (1mm LEDs).

The arrays can be daisy-chained. The protocol is effectively a one-wire bus. Data is transmitted with values for the nearest chip first. It strips off its data and passes everything else along the line. Each successive chip thinks it is first in line and strips off the first values and passes the rest along.

\$\endgroup\$
  • \$\begingroup\$ That's exactly the sort of thing I need, thank you. Unfortunately, the system I need will have them split into 40 10x10 disparate arrays (1mm LEDs). However, I suppose I could use this as an example of how it can be done. Thank you. \$\endgroup\$ – user159015 Oct 15 '17 at 17:48
  • \$\begingroup\$ See the minor update. \$\endgroup\$ – Transistor Oct 15 '17 at 18:10
  • \$\begingroup\$ @JamesHughes - Note that it may not be possible to find 1 mm LEDs with a built-in serial interface, and providing such an interface externally is going to take an enormous amount of wiring. \$\endgroup\$ – WhatRoughBeast Oct 16 '17 at 4:23
0
\$\begingroup\$

Would using multiple microcontrollers that you've networked together be a viable option? My training trends more towards maintenance than design, but if the problem is "I have too many outputs for one microcontroller to handle", "use more microcontrollers" seems like an obvious solution. You'd need to keep them all in sync, so latency might be an issue, but it seems like it might be solvable depending on how far apart physically the microcontrollers are?

\$\endgroup\$
  • \$\begingroup\$ Part of the issue with this approach (I had considered this) are the size constraints. This whole contraption is likely going to have to fit inside something not much bigger than a large mechanical keyboard. So all of the circuitry is going to be handled via a PCB but there won't be room for loads of microcontrollers. \$\endgroup\$ – user159015 Oct 15 '17 at 17:38

Your Answer

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