Amazing Binary Clock in a LED Matrix




About: Creating projects for Arduino as hobby.

Hello, all !!

This is my project of a binary clock using LED Matrix 8x8 and including interesting features.

All information of day, month, year, hour, minutes, number of the week of year are shown in a binary notation.

Exceptions are the indication of week day and the moon phase. In this cases only one LED is applied for a direct indication.

For the time is used a RTC (Real Time Clock) to update the current time to Arduino and for the display is used a module of LED Matrix controled by MAXIM MAX7219.

To setup and control the features of day, month and year is used an Encoder. This device is has more accuracy in positioning than a simple potentiometer and assures an operation more reliable for the user.

In control of everything is an Arduino UNO R3.

See VIDEO !!

Step 1: Material

Materials used in this project are:

- 01 x LED Matrix module controled by MAX7219

- 01 x Rotary Encoder with push-button

- 01 x RTC module

- 01 x Arduino UNO R3

- 01 x Breadboard

- 01 x Set of jumpers

Step 2: Assembly

The assembly is very simple due the modular construction of components.

Step 3: Operation

The operation of Binary Clock is done by turning the Encoder to left or right.

The push-button of Rotary Encoder selects what you want to update, the day, month or year.

Each click moves for next feature and 2 LEDs blinks at firt column of the matrix to indicate what was selected.

RTC clock has a long life battery but at first use of the module you need the update the time and date and the easiest way to do that is to carry on the example of the DS1307RTC library named SetTime.

Just upload it to Arduino and the clock is updated to current time during compilation of this program.

Step 4: Conclusion

This project is interesting due the amount of information you can apply on a single LED matrix of 8x8.

The use of binary numbers can reduces the spaces necessary to show everything and the use of the mask turn more friendly the operation.

I did another more complex project applyind same concept of LED Matrix: maximum information with minimum resources.

You can also see this project in on my another INSTRUCTABLE in this link:


In this another project I did a full calendar including features of time, date, digital clock and moon phase in a simple LED matrix.

Please, take a look and send your oppinion and sugestions for both projects.

Thank you for your visit,





    • Organization Contest

      Organization Contest
    • Faux-Real Contest

      Faux-Real Contest
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest

    16 Discussions


    1 year ago


    Hope you'll read anytime soon, i've got a question.

    I'd like to show some of your clock (moon phase, day of the month and month number) alongside with a different kind of binary clock. In order to do it, I'd have to invert coordinates and I'm going nuts trying to do it.

    Image to rotate the matrix and you have the connections pin up, I'd have to show moon, day of the month and month number in the first three row from the top.

    I think I should invert coordinates bitwise, but it's out of my reach and I don't know how to do it... Can you help me? give me a hint?

    In the picture you see the project. As you can see, the top row are empty and it would be nice to fill it with other information.

    I followed this one to do what I've already done:

    4 replies

    Reply 1 year ago

    Hi, Big.Jack.Jazz,

    That is not so complicated.

    Basically you need to update the row by column commands according to the position you want.

    Try to exchange a line (setRow) by a column (setColumn) in the code and check the results.

    For more details of LedControl library, take a look on:




    Reply 1 year ago

    It's not as simple as I thought...

    I just discovered that the project I used to build my binary clock, uses the whole matrix, converting each digit of hour, minute and second into a binary number with the function byte(); that gives 8 digit in base 2.

    In the end I have 6 columns, 2 for hour, 2 for minute and 2 for second.

    I'd like to keep this aspect, because is more readable to me, but the empty half of the matrix looks pretty sad...

    Anyway, I will try to figure out something


    Reply 1 year ago

    In this case you can combine both information using the logical function OR:

    byteC = byteA OR byteB

    With the result of byteC you can "print" it into display


    2 years ago

    Testei em outra maquina e funcionou acho que e a versao do arduino que esta isntalada em meu mac.

    Assim que eu montar posto o resultado obrigado.

    1 reply

    Reply 2 years ago

    Que bom! Poste depois uma foto de sua montagem.


    2 years ago

    Boa noite amigo gostei do relogio, mas estou tentando compilar e sempre está dando erro que parece ser da biblioteca Bounce2 você sabe se existe mais de uma versão dessa biblioteca ?

    Esse é o erro que está aparecendo obrigado e um abraço Luciano.

    In file included from F6DR5BCI7RGASC8.ino:1:
    /Users/luciano/Documents/Arduino/libraries/Bounce2/Bounce2.h: In constructor 'Bounce::Bounce(uint8_t, long unsigned int)':
    /Users/luciano/Documents/Arduino/libraries/Bounce2/Bounce2.h:76: error: type 'Bounce' is not a direct base of 'Bounce'

    1 reply

    Reply 2 years ago

    Luciano, boa noite,

    Que ótimo que tenha gostado deste projeto. Obrigado!

    Utilizei a biblioteca "Bounce2" deste link:

    Para download direto, o link é este:

    Fiz este programa há bastante tempo e não tive problemas com esta biblioteca.

    Para testar, recompilei hoje o programa em minha versão atual do Arduino (1.6.10) e não houve erros.

    Por favor, tente refazer o download da biblioteca e me informe os resultados.



    3 years ago

    This is awesome! Nice idea, thanks for sharing :)


    3 years ago on Introduction

    Very nice project. Could you please make and upload a template for the 8x8 Matrix with English Abbreviations?

    Thank you.

    Very nice projeto. Você poderia por favor fazer e carregar um modelo para a Matrix 8x8 com Inglês abreviações ?


    3 replies

    Reply 3 years ago on Introduction

    Thank you very much for your feedback !!

    I have uploaded the template in English version.

    Please, take a look !!