Arduino electronics hardware software

MAX7219 LED Matrix Module Micro Word Clock

WordClockA Word Clock is a clock that tells the time using words.

In an era when super-accurate digital clocks are available to most people on the planet, it intrigues me that Word Clocks have a place as they only show the time to the nearest five minutes!

Building one has been on my project to-do list for a while, but I didn’t want to invest the time and money needed for the various ‘from scratch’ build projects that I found online.

My inspiration for this project comes from the Adafruit website, where an 8×8 neopixel matrix is used to create a colorful Word Clock. It seemed to me that I could build a mini version using 8×8 monochrome LED matrix run by a MAX7219 IC. The challenge I set myself was making it as small as I could.

The Word Matrix

The word matrix is the main ‘display’ for a word clock and is the starting point for the design, as everything else fits around that. Fortunately the hard work of creating the word matrix for an 8×8 format was done by Adafruit for their project. As you would expect, having a limited number of LEDs means there need to be compromises compared to the larger word clocks, with some words split up.

WordClock Word PlanIn this implementation, the mask is in 3 sections – the top 3 lines for minutes, line 4 for past/to text, and the last 4 lines for the hour. A plan for how the words are built up is shown on the right (click to enlarge). Alternatives for some words  are highlighted in green.

Each letter of the mask is aligned over one of the LEDs of the matrix. I created an appropriately sized WordClock Text Mask using Microsoft Word. The idea was to print the mask on paper and cover the LED matrix. Testing confirmed this would work, with the LEDs able to shine through the paper. As a bonus, the paper also acted as a very satisfactory light diffuser.

System Hardware

Once I was sure that the concept was valid, it was time to consider the system architecture.

WordClock System
System Block Diagram

To simplify the sketch I  use my MD_MAX72XX library to run the LED module, connected through an SPI interface to an Arduino Pro Mini.

WordClock LED Module
Word Clock components

The real time clock is either a DS3231 or DS1307 (I have my own libraries for these) module using the I²C interface. As a word clock has a 12 hour clock cycle, only a few functions of the RTC are used – we don’t care about AM/PM, date or week day. All we use are hours, minutes and seconds. Any RTC that can provide this can be substituted with appropriate changes in the software.

Finally, a momentarily-on switch is used for setting and displaying the time, and the project is powered through a USB socket.

The hardware was prototyped using available existing modules and an Arduino Uno, shown below.

WordClock Prototype
Word Clock prototype


The software for this project is available from my library site. Essentially it does  4 things:

  1. Periodically update the display.
  2. Display the time as digits when the mode switch is pressed.
  3. Manage time setup when the mode switch is double pressed.
  4. Manage Summer Time offset when the mode switch is long pressed.

Display Update. With a time resolution of 5 minutes, this is not a critical activity and it is done every 5 seconds by counting elapsed milliseconds. In displaying the time a few of things needed to be considered:

  • In order to keep things flexible, each word is mapped in a data table, used to turn on the correct LEDs in the matrix. Changing what is displayed is a matter of changing the data table rather than any code.
  • To get to the nearest 5 minutes, each five minute interval encompasses 2 minutes before and 2 minutes after the actual 5 minute mark (eg, 5 past the hour is 3 past until 7 past).
  • Once we are beyond the half hour, the hour needs to be incremented for a word clock (ie, 1:35 is twenty five to two).

WordClock Digits

Actual Time. It is sometimes useful to know the real time! Pressing the mode switch once displays the time in digits on the LEDs, two digits for the hours followed by 2 digits for the minutes. The digits are a small number font defined in the code, where each digit is 3 LEDs wide and 7 high, with one blank column. At 4 columns total width, two digits can be displayed across the 8 columns of the LED matrix.

Time Setup. The time needs to be set up somehow. This is  accomplished by double pressing the mode button. At first the hours are displayed as 2 digits and single presses (or auto repeat, as I am using the MD_KeySwitch library) of the mode button will increment the hour with wraparound. Once the hours are set a double press moves to editing the minutes in a similar manner. Another double press completes the editing and returns to the word display. A 10 second inactivity timeout prevents the display from remaining in edit mode indefinitely.

Summer Time Offset. Rather than change the clock time for the Summer Time period, a long press of the mode switch will set up an automatic +1 hour offset when displaying the current time. Summer Time offset is reset to 0 by another long press. The display will show a ‘+1’ or a ‘+0’ to inform which mode it is in. The current Summer Time mode is stored in EEPROM.

The Clock Case

I wanted the unit to sit on a desk and look like a small old-style computer monitor, so I built a small case to suit. To keep the unit as small as possible, the case was proportioned around the size of the LED matrix.

WordClock Case
Case Components

The case is made from three parts – the main body, a removable back, and a transparent screen. The body is a simple mitered construction using 6mm plywood. To reinforce the mitered joints and add some interest, splines in a darker thin veneer were set into the edges. The back is constructed similarly and is screwed in from underneath.

The front ‘screen’ is a small square of perspex (acrylic) cut to fit the front opening. The size of the window is slightly larger than the LED matrix and the border was sprayed black after masking off the central area.

The inside of the case is painted black to minimize any stray light in the closed box. The outside is finished in a citrus based woodworking oil (smells great!).

Putting it all together

WordClock Mask on Matrix
Mask on Matrix

The first step was to attach the word mask to the LED matrix using thin double sided tape on the flaps and folding them over the side of the matrix, as in the picture on the left.

This was then hot-glue tacked to the acrylic window, which was then placed inside the case and hot glued to it from the inside. With this case design it was easy to align the window flush with the front by placing it face down on a flat surface and pressing it out from the inside. The matrix circuit board was then reattached to the LED matrix, being mindful of orientation.

Inside the Word Clock

The USB connector and the switch were added to the back panel and wired in. Hot glue was again used to lock the USB socket in place and reinforce the wire connections on the back.

All wires were then soldered to the Pro Mini and it was hot glued to the base of the back. The LED SPI connection was then plugged in and the entire unit tested before finally closing the case.

Note: Text updated April 2017 for Summer Time offset upgrade.

WordClock FB
The Finished Product

13 replies on “MAX7219 LED Matrix Module Micro Word Clock”

Its a great project, I’m just starting out trying to build one, I have seen a few mini-word clock projects but I really like the push-button settings you build in. I have a 1.2″ 8×8 led matrix but no max72xx clock driver, im using a sparkfun pro micro, and an rtcds3231; is there any way i can get the project working without the max72xx led driver? I’d really appreciate some help getitng his project off the ground 🙂


You won’t be able to build this project but I am sure you can make something if you put your mind to it. Most of the software won’t work either, so it will need to be rebuilt. Given the modest cost of a MAX7219 matrix module, I guess you have a decision /choice to make.


Thanks – I got the max7219 and rtc1307 and finally got it working via Ruud’s edit nd messing around a bit with the Pro Micro pins – great project!


Nice clock.
But: to correct for the latest library i have changed something.
// Global variables
#define MAX_DEVICES 1
// SPI hardware interface

And then it works good, nice SW. Thanks Marco.


hi, i’m from indonesia.
I have assembled like the instructions above.
Actually the display is correct, but the position is reversed. So to read the clock, have to read from behind the matrix.
How to reverse the appearance?


Did you mean to insert the MD_MAX72xx-master folder in the arduino IDE library? This step I have entered. Is there anything else that I have not done ?? Will you explain step steps ?? Please be advised I am still a beginner. Thank you very much for the response. Greetings from Indonesia.


As a beginner here is a piece of advice – if the author of a library provides documentation with the libraries, please make sure that you read the documentation. In your case you can also read this blog article that covers what you need to know and do


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s