I am planning to build a LED polar clock, so it will need about 181 LEDs (12 Month, 31 Day, 7 Day-of-week, 12 Hour, 60 Minute, 59 Second) and I need to control each one individually. I will be buying everything from scratch so I ask for help on:

  • Which arduino to use
  • How to make it keep time
  • How to control the LEDs

The LEDs need to stay on once they're lit, e.g. at 5 o'clock, the 1-5 LEDs would be on. This is why I don't know that multiplexing or charlieplexing will work, as I read that it is better if the LEDs wont be remaining on/only a few are on. The most that could be on is 179 (Friday, December 31, 11:59:59 [Won't happen until 2021]).

Thanks in advance.


4 Answers 4


Instead of a multiplexer you can use a "shift register"; the difference is that it keep the last state of the pin, while the multiplexer goes unconnected (and this is because you need at least 30fps, and even so you'll get low light as you are PWMing the leds). This is why shift register are also called "led driver".

Official tutorial can be found here http://arduino.cc/en/Tutorial/LEDDriver


Check out the TLC5916. It has two advantages over the HC595:

  • it can sink a lot of current
  • it only needs one resistor

I use it with seven-segment displays. Basically, you tell it "I'm about to send a command." Then you send it, say, "01010101" to turn on every other light. Then you say "okay, make that live." You can chain them together.

Many use the MAX7219 but for me the cost is a drawback.

I might come back and edit this post later to add a Github link to demonstrate...

  • I use the TLC59116 lots - I2C version with PWM.
    – Majenko
    Dec 29, 2014 at 19:15

If the cost is allowed to be moderately higher, your simplest solution could be to use WS2012b individually-addressable LEDs. Since longer chains sometimes have timing problems with the serial communication, I’d probably split them into three groups, attached to three digital pins.

Multiplexing probably requires some flip-flops or other buffers; else, the LEDs may not be bright enough.

  • Came here to say that. For a clock, the color-selecting ability of a chain of RGB LEDs connected with WS2801s or something would be perfect. It only requires one wire, and the programming is very simple.
    – Jasmine
    Dec 29, 2014 at 17:25

Multiplexing will work fine in this case (Charlieplexing isn't practical here).

You create an array of leds, and light up only one row at a time. If you rotate through all the rows at more than 50 times a second your eyes won't notice it.

In the case of 181 leds, you'd need and array of e.g. 13x14. This will mean you need a minimum of 27 IO-pins. More than the regular Arduinos provide.

So you probably need some additional ICs. You could use simple shift registers, or dedicated led-matrix drivers like the max7219 or some other IC. The Max7219 is probably the easiest, as you don't have to do the multiplexing yourself. The can light upto 64 leds (8x8), so you'd need 3 of them.

PS I get a different number though; 12 (month) + 31 (day) + 7 (weekday) + 23 (hours) + 59 (min) + 59 (sec)= 191

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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