Section Top Intro Features Operation Coding Display Change 3D Parts Schematic Vero Boards 3D Parts Download Code Download
A 3D printed modular display word clock
Introduction
This clock is an adaption of the WS2812b Strip Word Clock by zozzle / https://www.instructables.com/Minimalist-3D-Printed-RGB-Word-Clock
The clock uses a 100 LED WS281b led strip to show the time in 5 min segments.
Names and dates can be configured if required with a message eg "happy b'day dad" displayed on a 2 different dates.
I have modified the design and my Word Clock is modular with the letters printed individually which allows any letter to be placed anywhere on the Word clock face.
My Word Clock uses a frame with individual letters pushed into place.
I have changed the 5 minute time display to 2 minutes either side of the displayed time rather than 5 minutes after.
The clock is designed to be 3D printed and will required a 3D printer bed of at least 195mm.
I have added PIR and auto brightness control as well as master clock synchrinisation.
I have also added a manual sync button to 30 seconds.
Features
Word Clock tells the time in simple 5 minute intervals as we would say the time.
Below the control panel is mounted on the side of the clock.
The clock auto detects movement and will go to sleep if no movement is detected in the room. In the middle of the night a wave of a hand will bring the clock to life.
The clock auto dims to match the ambient light in the room.
The 3D printed word clock is modular so the display can be customised to add names or say for example happy birthday on a set date.
Below any letter or symbol can be place anywhere on the 10x10 grid.
Summer/Winter time changes are made by pressing a simple "Summer Time" or "Winter Time" buttons.
Display testing. Long press of the Summer Time button selects a "Word test" mode & long press of the Winter Time button selects a "Snake Test" mode.
On power failure real time clocks keep the correct time on the word and digital displays. The analogue clock will need to be set again.
Different colours can be selected in program (defaults) or by using buttons on the side of the clock.
Time can also be displayed digitally if required although this is best read at a distance of at least 10ft.
LED Light Diffuser
The Word Clock case with letters inserted, rear view.
The LED diffuser is made of 2 parts.
The 3D printed diffuser is 0.5mm deep and is printed on clear filament. This goes in first against the letters.
This is followed by a white sheet of paper cut to size using the 3D printed diffuser as a template.
I found this was the best order as if the white sheet was in first it showed up shadows on the letters in bright light.
The Word Clock case with rear view with 3D printed diffuser in place.
The Word Clock case with rear view with white paper diffuser in place.
The LED divider grid is then place on top with all three held in place by the rear panel.
Operation
Controls
There are 5 control buttons four of which have another function if held.
Name | Quick Press | Long Press |
UP | Change Top Word Colour | Digital Clock Mode |
Down | Change Bottom Word Colour | Set Time Mode |
Sync | Set Seconds to 30 | None |
Winter | Retard Clock by 1 hour | Snake Display Test |
Summer | Advance Clock by 1 hour | Word Display Test |
Initial date & time setting
To use the clock to display a message on a certain date the time and date need to be setup in code.
Find the line "// rtc.adjust(DateTime(2021, 12, 10, 7, 52, 0)); //manual adjustment"
Set the time and date in this line. The date is the most important as the time can be fine tuned when the clock is running.
example 31st December 2021 05:54:0
uncomment the line and change it to
rtc.adjust(DateTime(2021, 12, 31, 5, 54, 0)); //manual adjustment
upload to the clock to set the date time in the RTC.
Important comment out the line then upload again.
This prevents the wrong time being set if the Arduino restarts.
Setting word colours
Default word colours are set in startup to top words and AM PM to Purple and bottom words Green.
Set these in Word Clock tab approx line 91/92
bottom_color = 5; //start bottom colour as green
top_color = 10; //start
topcolour as purple
There are 13 predefined colour numbers
Number | Colour |
0 | White |
1 | Red |
2 | Orange |
3 | Yellow |
4 | Lime |
5 | Green |
6 | Mint |
7 | Turquoise |
8 | Light Blue |
9 | Blue |
10 | Purple |
11 | Pink |
12 | Hot Pink |
To test different colour combinations during time display press the "UP" button to cycle the top colours and AM/PM indicators and the "DN" button to cycle the lower colours.
On reset the colours return to the default.
Manual Seconds Sync
Pressing the "SYNC" button resets the seconds to 30 to allow the clock to be synchronised to a time source.
Sync will on happen once every minute when the seconds are 10 or above.
Automatic Sync
The real time clock will keep very good time but will slowly drift over time.
If you have a Master Clock a +ve 5v on Pin D3 will set the seconds to 30 keeping the clock in perfect time.
If the clock is connected to my Time Teaching clock the Neopixel clock acts as a master clock and keep all clocks in sync via the 2 sync outputs on this clock.
Summer/Winter Time Setting
A single press of the Winter button takes an hour of the time.
A single press of the Summer button adds an hour.
Showing the digital clock
To display the digital clock long press the "UP" button.
To return to the word clock long press the "UP" button again.
Setting the time
To enter time setting mode long press the "DN" button.
The clock will display S seconds.
Short pressing the "DN" button cycles through M minutes and H hours setting.
M Minutes
H Hours
Pressing the "UP" button selects that value to be set.
The display changes to show the time in white with the units to set flashing white/red.
Pressing the "UP" button increases the flashing value and the "DN" button decreases the value.
Press & Hold "DN" to return to the setting menu.
Press & Hold "DN" again to return to the time.
Animation below shows cycling through seconds,minutes and hours setting by pressing and holding the "UP" button.
Main Parts
The clock uses an Atmega 328 microprocessors Arduino Pro Mini, UNOs,NANOs could be used instead of the Atmega 328.
There is a real time clocks to store the time on power failure.
The clock parts are designed to be 3D printed.
Changing Display Layouts In Software
Changing the display physically is just a matter of printing out the new letters, popping out the old and pressing in the new.
The software will also need to be changed to matched the display layout.
Viewed from the front the LEDs are numbered in software in vertical strips of 10 LEDs.
Starting from the right the first strip is numbered vertically bottom to top with the next strip labled top to bottom.
This is continued alternately on the remaining rows.
LED numbering
90 | 89 | 70 | 69 | 50 | 49 | 30 | 29 | 10 | 9 |
91 | 88 | 71 | 68 | 51 | 48 | 31 | 28 | 11 | 8 |
92 | 87 | 72 | 67 | 52 | 47 | 32 | 27 | 12 | 7 |
93 | 86 | 73 | 66 | 53 | 46 | 33 | 26 | 13 | 6 |
94 | 85 | 74 | 65 | 54 | 45 | 34 | 25 | 14 | 5 |
95 | 84 | 75 | 64 | 55 | 44 | 35 | 24 | 15 | 4 |
96 | 83 | 76 | 63 | 56 | 43 | 36 | 23 | 16 | 3 |
97 | 82 | 77 | 62 | 57 | 42 | 37 | 22 | 17 | 2 |
98 | 81 | 78 | 61 | 58 | 41 | 38 | 21 | 18 | 1 |
99 | 80 | 79 | 60 | 59 | 40 | 39 | 20 | 19 | 0 |
The schematic of the LED strip connections below shows how the LED strips are connected physically.
To make a display layout I used a spreadsheet to workout the letter numbering and layout.
Each LED number is displayed on the sheet in grey with it's corresponding Letter above it in green.
For example the name "LYRA" uses LEDs 90,89,70 & 69.
If a letter is used in 2 words it is labeled in dark green.
White spaces are spare and any letter can be put in these places on the clock.
L | Y | R | A | I | T | I | S | ||
90 | 89 | 70 | 69 | 50 | 49 | 30 | 29 | 10 | 9 |
T | W | E | N | T | Y | H | A | L | F |
91 | 88 | 71 | 68 | 51 | 48 | 31 | 28 | 11 | 8 |
Q | U | A | R | T | E | R | T | E | N |
92 | 87 | 72 | 67 | 52 | 47 | 32 | 27 | 12 | 7 |
F | I | V | E | T | O | ||||
93 | 86 | 73 | 66 | 53 | 46 | 33 | 26 | 13 | 6 |
P | A | S | T | T | H | R | E | E | |
94 | 85 | 74 | 65 | 54 | 45 | 34 | 25 | 14 | 5 |
F | O | U | R | T | W | O | S | I | X |
95 | 84 | 75 | 64 | 55 | 44 | 35 | 24 | 15 | 4 |
F | I | V | E | O | N | E | T | E | N |
96 | 83 | 76 | 63 | 56 | 43 | 36 | 23 | 16 | 3 |
T | W | E | L | V | E | I | G | H | T |
97 | 82 | 77 | 62 | 57 | 42 | 37 | 22 | 17 | 2 |
N | I | N | E | E | L | E | V | E | N |
98 | 81 | 78 | 61 | 58 | 41 | 38 | 21 | 18 | 1 |
S | E | V | E | N | P | M | A | M | |
99 | 80 | 79 | 60 | 59 | 40 | 39 | 20 | 19 | 0 |
If we wanted to change the name "LYRA" to "JAMES" in the Arduino code.
Open the Word clock sketch in my case C:\My Documents\Arduino\Arduino Sketches\Word Clock 3D\Word-Clock-17.ino
Opens the Word-Clock-17.ino sketch along with the other sketches in that folder under separate tabs.
The words are held under the Word_Fuctions tab.
Click on this tab and scroll down to the "\\Words" around line 277.
This is where all the words are described each letter by it's LED number eg LYRA is LEDs 90,89,70 & 69.
Print out the letters for the new name "JAMES" and insert them in the clock.
Print out the letters for the new name "JAMES" and insert them in the clock in place of the L,Y,R,A and the spare letter.
L | Y | R | A | I | T | I | S | ||
90 | 89 | 70 | 69 | 50 | 49 | 30 | 29 | 10 | 9 |
New letters are inserted.
J | A | M | E | S | I | T | I | S | |
90 | 89 | 70 | 69 | 50 | 49 | 30 | 29 | 10 | 9 |
We now have to change the code in the sketch to match our new letters.
I have commented out the out function for the name "LYRA" and made a new function "james" using the same LED numbers for JAME and added a 5th LED for the S of james LED 50.
The LEDs use the same line for each letter to be lit when that function is called- eg LED number 50 from the spreadsheet is grid.setPixelColor(50, c); .
The only problem now is the S of JAMES is now next to the I of IT and as they will be lit at the same time it will look wrong.
There is not enough characters left on that row so we can change "IT IS" to "IT'S".
Put the spare letter removed when the S of JAMES was added in place of the letter I of "IT".
Move the T of IT along one space and then Print out the letter " 'S" and add it after the T of IT to make the new word "IT'S".
J | A | M | E | S | I | T | 'S | ||
90 | 89 | 70 | 69 | 50 | 49 | 30 | 29 | 10 | 9 |
We now need to show this in the code.
From the code above IT is now IT'S and uses 3 LEDs 30,29 and 10.
IS is no longer used and is commented out.
Once the word functions are completed you need to check when they are displayed.
Go to the "Display Functions" tab and find the line
void display_time(uint32_t c, uint32_t hc){
The functions called here are displayed all the time.
I have commented out the function "is" as it has been included in the "it" functions as it's.
Below this line in the code is the if statement for displaying set words at set times of the day.
The final code to change is under the "misc" tab find the line void test_words(uint32_t c, int t){
This is a display test that will display each word one after the other.
Comment out the function "lyra" and replace with your new function "james".
3D Printed Parts
Download all the parts and view this clock on Thingiverse
Case front & letter holder
Rear view showing screw posts and back LED panel rebate
Letters
Letters are individually printed out to make the 3D Word Clock display layout completely versatile.
Letters are a friction fit and can be popped out and changed if you decide to change the layout.
Font File click to download TC LaserSans font
Each 3D printed letter is 14.5mm x 3mm.
Letters are printed out in batches upside down.
Back LED panel showing slots for LED strips
LED Light Diffuser is position inside the case front/letter holder
The Light Divider has slots for each LED and space for wiring top and bottom
Rear PCB Cover with slots for the control panel, LDR window and wiring
Rear PCB Cover Window.
Printed in clear plastic to allow light to reach the LDR.
Rear PCB Cover Mounting Bracket
2 off required for fixing to the Rear PCB Cover (nuts and bolts) to the Back LED panel wih M2 self tappers
Control Panel Front View
The control panel is fixed with M2 self tappers to the Back LED panel.
The Rear PCB Cover fits over the top into the slot on the control panel formed by the control panel rear.
Control panel front showing slot for rear cover.
Control Panel Rear View.
Control Panel rear view showing all three parts together.
The slot for rear cover to fit into can be seen and the Vero Board spacer position.
Control Panel Rear cover.
This is glued to the front control panel to form a slot for the Rear PCB Cover to fit into.
Control panel slotted onto the rear case
Control Panel Switch Spacer
Fitted to the top of the switch Vero Board so the buttons show above the switch panel by around 2mm.
Schematic
Click to enlarge
Vero board Layout
Vero board layout Atmega 328 removed
Vero Board Rear
Control Panel Vero Board
3D Printed Parts
Complete zip of 3D printed parts including FreeCAD files
Code