Home    Master Clock   LCD Master Clock    Kenley Weather

Section   Top   Credits   Perspex Case Option   Picture Frame Option   Control Chart    Touch Control    Display Modes    Modules    Display Mask      MAX2719 Mod  Frame Build    Perspex Case Build    RTC Mod    Mod Interconnects     Word Mapping    Veroboard Picture Frame   Veroboard Perspex Case    Case Fixings    Schematic  Clock Setting  Code

 

 

 

 

                      

Anniversary Word Clock

Word Clock using a Arduino Nano and four MAX7219 32mm Dot Matrix Display Modules

Choice of styles, picture frame or Perspex cube with various base options.

Mini Arduino Word Clock with minute resolution of time in words and linear display of seconds.

 Uses an Arduino Nano and Four MAX7219 32mm Dot Matrix Displays giving 256 LEDs the same as my large Word Clock

There are modes for digital clock, analogue clock, temperature & humidity, & also three games, Game of Life, Simon & Tetris.

The clock can be stand alone or run as a slave off a Master Clock if required.

In stand alone mode the clock runs off it's built in temperature compensated real time clock with an accuracy of 2ppm from 0C to +40C

When running as a slave off a Master Clock time is synchronised on every 30seconds past the minute.

There is an option for PIR/Microwave Radar Sensor control so the clock automatically turns off when no one is in the room.

The Clock display measures 64mm x 64mm and is designed to be desk mounted although the picture frame version could go on a wall.

There are touch pads in each corner to setup and control the clock.

A mini USB socket allows software programming in situe.

 

Plugging in an Android phone/PC allows setting of the time and choice of what mode to display on startup.

The clock draws 20mA (all LEDs off)  to 40mA  (LEDs max brightness) from it's 12v supply.

There is a choice of designs on the site a Picture Frame Clock as above or a Perspex Cube Clock

Each design uses a different Vero Board layout but shares the same code.

 

 

 

 

 

 

 

 

Credits

This clock is a miniaturised version of my Word Clock  and is in turn based on the original Word Clock by Wouter Devinck full details on Facebook      Instructable      GitHub

and the "Catalan" Pijuana Word Clock software based on Wouter Devinck's clock (this is a fork off the original Wouter Devinck design) here GitHub.

 

 

 

 

 

 

 

 

 

 

Perspex Case Option

With Radar Controlled display and PWM LED backlight.

 

 

There are two case styles a Shadow Frame Top or a Perspex Cube above.

The 100mm x 100mm Perspex Cube can be stand alone or have a MDF base to house the Temperature/Humidity sensor

and also a PIR to blank the display when no one is in the room.

A 20mm thick Perspex base can also be fitted see picture below. In this case the temperature/humidity sensor is fitted inside the case along with a

Microwave Radar Sensor RCWL0516 to sense movement.

 

 

 

Transparencies are fitted to the sides, rear and top and can be plain or have messages printed as required.

A LED in the rear illuminates the transparencies at night.

 

 

Rear of Clock

Below Inkjet Transparencies made from Wedding certificate and original invites fitted to sides of the clock these are illuminated by the on board LED.

 

 

 

The backlight LED is also controlled by the display PIR so the clock will illuminate when you enter the room.

 

 

 

 

 

Picture Frame Option

I have used a plain black 6"x6" (150x150mm) picture frame with a white card mount reducing the frame size down to 4"x4".

Enough to see the display with a bit of space all around.

 

The Perspex glass was replaced with real 2mm glass as the Perspex was attracting too much dust.

 

On the rear of the frame I have added a box from thin plywood 170mm x 170mm x 40mm deep.

I have used Mitre Glue to fix the box together then cut and glued corner braces from wood off cuts.

The box lid is fixed by small wood screws to these corner braces.

The box is fixed to the frame with 2 angle brackets I cut from some angled aluminium.

 

The touch sensors can be seen at the rear of the frame with Perspex covers.

 

Wooden feet are cut from blocks of wood and hold the frame at an angle on the desk or table.

Rubber feet are glued to the wooden block feet to stop the clock slipping on the desk or table top.

 

As this clock is for a first wedding anniversary a label is attached to the back behind a Perspex sheet.

Not shown in this photo are the 12v power lead and short USB cable coming out of the rear of the box.

 

 

Front of picture frame with light sensor showing on the side of the backbox.

 

 

The dot matrix displays are fixed to show through the front of the card mounts. On the completed clock

the LEDs are fixed behind the letter mask and a sheet of dark neutral density Perspex sheet and will only be visible

when an LED is on illuminating a letter on the mask.

 

 

Below my original Word Clock on the wall with my Word Clock Mini sitting on the table with the Perspex case option on the floor. This shows the huge difference in display size.

The large Word Clock is best viewed from a distance whereas the Mini clocks are best suited to a desk/coffee table close to the viewer

 

 

 

 

 

 

 

 

 

 

Clock Controls

The buttons have different functions depending on what mode the clock is in, see chart below.

  Button Location
Clock Mode Top Left Top Right Bottom Left Bottom Right
Credits Previous Mode Next Mode None None
Word Clock Previous Mode Next Mode PIR On (Enabled) PIR Off (Display always on)
Digital Clock Previous Mode Next Mode Set Time Set Time
Temp/Humidity Previous Mode Next Mode None None
Analogue Clock Previous Mode Next Mode None None
Game of Life Previous Mode Next Mode    
Simon Previous Mode Next Mode Start Game Start Gane
TETRIS Previous Mode Next Mode Start Game Start Game
         
Digital Clock Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Set Time (Hours) Hour Decrement Hour Increment Set Minutes/Accept Time Reset Seconds to 0
         
Digital Clock Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Set Time (Minutes) Minute Decrement Minute Increment Set Hours/Accept Time Reset Seconds to 0
         
Simon Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Game Contols Select Top Left Select Top Right Select Bottom Left Select Bottom Right
         
TETRIS Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Game Contols Move Left Move Right Select Bottom Left Select Bottom Right

 

 

 

 

 

 

 

Touch Sensitive Button Demo

The picture frame version has four touch buttons located on the rear of the main frame on each corner.

Buttons are activated by gently squeezing a corner between your thumb and index finger. 

 

 

 

On the Perspex case version there are 5 Touch Buttons. One is located on the back of the case and just sets the backlight On or Off.

The other four touch buttons are located around the four corners of the sides of the display.

 

Below view from rear of case with case transparencies removed showing touch button locations.

These buttons are repeated on the other side as well.

Unless in a sub menu the "top left" button steps to the previous display mode and the "top right" button steps to the next display mode.

When a touch location on the case is touched the LED indicator on the touch button lights while you are touching it to indicate it is active.

 

Below touch buttons glowing behind the main display to show their locations. The buttons only light when touched, normally they are off.

 

 

 

 

Lopped animation showing touch buttons in use.

1 top left button steps from "Word Clock" mode  to the  previous mode "Message display"

2 top right button steps from "Message display" mode back to next mode "Word Clock"

3 in "Word Clock" mode pressing the bottom right button turns the PIR/Radar Module Off "PIR NO" is displayed for 2 seconds

4 in "Word Clock" mode pressing the bottom left button turns the PIR/Radar Module On "PIR ON" is displayed for 2 seconds

 

 

 

 

 

 

 

 

 

 

Display Modes

The clock has three time modes word clock, digital clock, analogue clock a temperature & humidity mode and also three games, Game of Life, Simon & Tetris.

It also has a message mode where a message is displayed on start up or if mode 1 is selected. As this is an 1st Wedding Anniversary Clock the start up message

shows the wedding date and also the names of the bride and groom.

The display modes are the same on the picture frame clock or the Perspex Cube clock.

 

Clocks/Utilities

Mode 1 Message

Preset looped message played on start-up or if mode 1 is set

 

 

 

 

Mode 2 Word Clock

Time displayed in words and linear seconds shown on bottom of display

 

 

 

 

 

 

 

 

Mode 3 Digital Clock

Digital clock with linear seconds on bottom of the display

 

 

 

 

 

Mode 4 Temperature & Humidity Display Mode

 

 

 

 

 

 

Mode 5 Analogue Clock

Analogue clock with linear seconds

 

 

 

 

 

Games

Mode 6 Game of Life

 

 

 

 

 

 

 

Mode 8 Simon Game

 

 

 

 

 

 

Mode 9 Tetris Game

 

 

 

 

 

 

 

 

 

 

Parts Required

To keep the costs and build times downI have tried to keep the number of parts to a minimum by using pre-built modules.

Depending on the clock design you will need to construct 1 or 2 Vero Boards as well.

The following Modules are required.

The Nano

 

 

 

 

 

 

Microwave Radar Sensor RCWL0516 (Picture Frame Design) or when using Perspex base on Cube Clock

 

Size: approx. 1.7 x 3.5cm / 0.67 x 1.38"

Operating voltage: 4 - 28V

Operating current: 2.8mA (typical), 3mA (max)

Probe distance: 5-9m

Transmitting power: 20mW (typical), 30mW (max)

Output voltage: 3.2 - 3.4V

Output voltage driving capacity: 100mA

Output control low level: 0V

Output control high level: 3.3V

Operating temperature: -20 - 80 ℃

Storage temperature: -40 - 100℃

Trigger way: repeat trigger

Adjustable distance, high sensitivity, the module has a far sensing distance, reliable, large induction angle and has a wide supply voltage range

Widely used in a variety of human induction lighting and burglar alarm and so on.


Pin definition:

3V3: 3V3 power output

GND: ground

OUT: control output; when probe moving objects, it will output high level

VIN: input voltage, 4-28V

CDS: enable control chip, lower than 0.7V, OUT will output low level all the time

 

 

 

 

HC-SR505 PIR Motion Sensor Module (Perspex cube design) 

 

 

 

TTP223 Capacitive Touch Switch Module

4 off Picture frame design or 5 off Perpex Cube

 

The TTP223 is a touch pad detector IC which offers 1 touch key built into a tiny module 15mm x 11mm that can be fed from a 2.5 to 5.5v PSU. The touch detection IC is
designed to replace traditional mechanical push buttons and works very well through Perspex and glass.

 

 
Trigger setting mode:(1->Short;0->No Short)
AB=00:No-lock High TTL level output;
AB=01:Self-lock High TTL level output;
AB=10:No-lock Low TTL level output;
AB=11:Self-lock Low TTL level output;

 

 

 

 

 

DHT22 Module

The AM2302 is a capacitive humidity sensing, digital temperature and humidity module and sends data over 1 wire to the Arduino.

I have used the module form that includes the resistor across the 5v to output pin.

 

 

 

 

 

RTC (real time clock)

The RTC uses a DS3231 AT24C32 I2C Precision Real Time Clock Module with an accuracy of 2ppm from 0C to +40C.

The module comes supplied with a Lithium-Ion rechargeable battery but I use a non rechargeable battery so have removed resistor R5

from the module as below.

 

 

 

 

 

 

Power Module

This DC/DC step-down voltage converter is based on MP1584, it converts input voltage between 4.5V and 28V into a smaller voltage between 0.8V and 18V, capable of driving a 3A load with excellent line and load regulation.
 

 

 

The module is based on the MP1584 IC


Wide 4.5V to 28V Operating Input Range
Up to 92% Efficiency
Programmable Switching Frequency from 100kHz to 1.5MHz
High-Efficiency Pulse Skipping Mode for Ceramic Capacitor Stable
Internally Set Current Limit without a Current Sensing Resistor
Cycle-by-Cycle Over Current Protection
Input Under Voltage Lockout

 

 

 

 

MAX2719 Dot Matrix Display Modules (4 off required)

Each module contains a MAX2719 driver chip and an 8x8 LED dot matrix display.  Each module is controlled is connected to the Nano by daisy chaining from one module to another.

The are three control wires and also 5v and 0v to each module.

Each module is modified to work with the software see details further down the page.

You can of course modify the software if you find it easier (let me know if you manage to work it out).

 

 

 

 

 

 

Other Parts/Components

Apart from your chosen case you will also need some additional electronic components (see the schematic for details) along with various nuts bolts.

 

 

 

 

 

 

 

 

Construction

Display Mask

The display mask is printed out on inkjet transparency paper.

The mask is drawn up in Inkscape. Inkscape is professional quality vector graphics software which runs on Windows, Mac OS X and GNU/Linux.

 It is used by design professionals and hobbyists worldwide, for creating a wide variety of graphics such as

illustrations, icons, logos, diagrams, maps and web graphics.

I used the original file from my large word clock and scaled it down in Photoshop so the letter border is 6.2 cm square. The black border is then added

by increasing the canvas size. I add the extra black border at the bottom to allow for adjustment over the LED display.

To create your own mask download the original Inkscape file here modify it then scale it down.

 

 

 

 

 

 

 

Modifying The MAX2719 Display Modules

The original design of this clock used a custom built PCB. To use the standard MAX7219 modules with the software six connection need to be changed on each of the MAX2719 modules.

This could be done in software but instead of working out the software rotation I found it quicker to change the wiring to match the software.

If you want  do it in software and get it working please let me know and I will modify my code.

 

The modification is quite straight forward.

First of all bend the following LED Matrix pins 90the top pins up and the bottom pins down.

Pins 16, 15, 3, 4,10 & 11

 

 

Connections to make

LEDA to Dot Matrix Pin 16

LEDB to Dot Matrix Pin 15

LEDG to Dot Matrix Pin 3

LEDF to Dot Matrix Pin 4

LEDE to Dot Matrix Pin 10

LEDC to Dot Matrix Pin 11

 

The six wires are soldered to the back of the LED matrix first.

 

 

Take the six wires down through a mounting hole of the PCB.

 

 

 

Finally solder the wires to the LED pins on the PCB.

The wires soldered on should correspond to the pins bent pins on the LED Matrix.

 

 

Image below shows the rear view of the module rotation

 

 

Rear view of modules with completed wiring modification

 

 

Front view of modules with dot matrix displays unplugged

 

 

 

MAX7219 Dot Matrix Module Wiring Test program

I have modified the Word Clock sketch to enable the MAX2719 Module to be tested after the wiring mod.

All this program does is light each LED in turn from the top left to the bottom right of the matrix.

Just connect 5 wires to the NANO and MAX2719 Module and power the NANO from it's USB port.

Load the sketch and let it run.

 

 

 

 

Once all the Modules are modified and tested they can be plugged into the Vero Board.

A wooded frame is built around the edges of the displays to hold them tight together so the LEDs line up with the words.

The frame is just thin wood bonded at the corners with mitre adhesive.

 

 

 

 

 

 

 

Frame layers

Frame, White Mount and glass fitted

 

 

 

 

Frame removed and a sheet of neutral density Perspex is cut to the same size as the mount/glass.

This is fitted behind the mount.

 

 

Frame mount and glass fitted but Neutral density Perspex sheet removed to show Vero board and display matrixes

 

 

 

 

White mount and neutral density Perspex removed and frame shown semi transparent to reveal how the Vero Board sits within the glass rebate in the frame.

The wooden box at the rear of the clock fits up to this rebate allowing the vero board to be removed.

 

 

Neutral density sheet fitted in place. LED Matrix has gone black and disappeared.

Layers in this order- Frame, glass, White Mount board, Neutral density Perspex, Letter Mask on inkjet transparency, Vero Board.

Note bolts through Neutral density Perspex sheet and Vero board only.

 

All layers in place and display on. The LEDs shine through the letter mask and are visible in the frame.

All layers are held in place in the frame by the frame nails on the inside of the rebate.

 

 

 

 

 

Below the Picture Frame Word Clock is designed to sit on a desk or table.

 

 

 

 

 

 

 

 

Perspex Case Option

The 100mm x 100mm Perspex case has 5 sides and a removable base and was purchased from Amazon here.

The Perspex case can be left clear or be fitted with transparencies containing messages or pictures.

These are backlit by an LED that can be PIR controlled if required.

 

 

The case has a dark neutral density Perspex sheet fitted to the front. The LED matrixes are fitted against this with the neutral density sheet hiding the unlit LEDs from view.

 

 

 

 

Various bases can be fitted to the case as required in this case a 20mm thick Perspex Sheet.

 

 

 

Below an MDF base fitted to the clear case. The display Vero Board holding the LED matrix is bolted to the front of the case with the neutral density sheet in front.

The main Vero Board can be seen fitted to the base of the case and hold the Nano and other components.

The PIR and temp/humidity sensor are fitted to the case front and base respectively.

 

 

 

 

 

 

 

 

RTC Modification

Modification of DS3231 AT24C32 I2C Precision Real Time Clock Module

My clock uses a DS3231 AT24C32 I2C Precision Real Time Clock Module.

The module comes supplied with a Lithium-Ion rechargeable battery see diagram above. I use a non rechargeable battery so have removed resistor R5

from the module as below.

 

Location of R5 on the DS3231 module.

 

Charging Resistor R5 removed.

 

 

 

 

 

 

 

 

 

Module Interconnections

 

The diagram above shows how the modules are connected. Most modules connect directly to the Arduino Nano.

The MAX7219 boards only connect to the NANO via module 01. The other modules are daisy chained together.

Each 8x8 LEDs matrix is then connected to a MAX7219 module.

Keep the distance between the NANO and the 1st MAX7219 module and MAX7219 module to modules as short as possible.

Also make sure you supply power to both ends of the daisy chained MAX7219s as most of the power is drawn by this part of the circuit.

Four Touch sensor modules are required unless a 5th is used on the cube clock design to control the LED backlight.

 

 

 

 

 

 

Time to Word Mapping Chart

The chart shows how each minute of the day is mapped to words.

 

Hour Words     Minute Words
0 TWELVE AT NIGHT     0   O'CLOCK
1 ONE IN THE MORNING     1 ONE MINUTE PAST
2 TWO IN THE MORNING     2 TWO MINUTES PAST
3 THREE IN THE MORNING     3 THREE MINUTES PAST
4 FOUR IN THE MORNING     4 FOUR MINUTES PAST
5 FIVE IN THE MORNING     5 FIVE PAST
6 SIX IN THE MORNING     6 SIX MINUTES PAST
7 SEVEN IN THE MORNING     7 SEVEN MINUTES PAST
8 EIGHT IN THE MORNING     8 EIGHT MINUTES PAST
9 NINE IN THE MORNING     9 NINE MINUTES PAST
10 TEN IN THE MORNING     10 TEN PAST
11 ELEVEN IN THE MORNING     11 ELEVEN MINUTES PAST
12 TWELVE IN THE AFTERNOON     12 TWELVE MINUTES PAST
13 ONE IN THE AFTERNOON     13 THIRTEEN MINUTES PAST
14 TWO IN THE AFTERNOON     14 FOURTEEN MINUTES PAST
15 THREE IN THE AFTERNOON     15 A QUARTER PAST
16 FOUR IN THE AFTERNOON     16 SIXTEEN MINUTES PAST
17 FIVE IN THE AFTERNOON     17 SEVENTEEN MINUTES PAST
18 SIX IN THE EVENING     18 EIGHTEEN MINUTES PAST
19 SEVEN IN THE EVENING     19 NINETEEN MINUTES PAST
20 EIGHT IN THE EVENING     20 TWENTY PAST
21 NINE AT NIGHT     21 TWENTY ONE MINUTES PAST
22 TEN AT NIGHT     22 TWENTY TWO MINUTES PAST
23 ELEVEN AT NIGHT     23 TWENTY THREE MINUTES PAST
          24 TWENTY FOUR MINUTES PAST
          25 TWENTY FIVE PAST
          26 TWENTY SIX MINUTES PAST
          27 TWENTY SEVEN MINUTES PAST
          28 TWENTY EIGHT MINUTES PAST
          29 TWENTY NINE MINUTES PAST
          30 HALF PAST
          31 TWENTY NINE MINUTE TO
          32 TWENTY EIGHT MINUTES TO
          33 TWENTY SEVEN MINUTES TO
          34 TWENTY SIX MINUTES TO
          35 TWENTY FIVE TO
          36 TWENTY FOUR MINUTES TO
          37 TWENTY THREE MINUTES TO
          38 TWENTY TWO MINUTES TO
          39 TWENTY ONE MINUTES TO
          40 TWENTY TO
          41 NINETEEN MINUTES TO
          42 EIGHTEEN MINUTES TO
          43 SEVENTEEN MINUTES TO
          44 SIXTEEN MINUTES TO
          45 A QUARTER TO
          46 FOURTEEN MINUTES TO
          47 THIRTEEN MINUTES TO
          48 TWELVE MINUTES TO
          49 ELEVEN MINUTES TO
          50 TEN TO
          51 NINE MINUTES TO
          52 EIGHT MINUTES TO
          53 SEVEN MINUTES TO
          54 SIX MINUTES TO
          55 FIVE TO
          56 FOUR MINUTES TO
          57 THREE MINUTES TO
          58 TWO MINUTES TO
          59 ONE MINUTE TO

 

 

 

 

 

 

 

 

 

Vero Board Layouts

The number and types of Vero Boards will depend on the case design.

The picture frame style has 1 single board whereas the Perspex Cube design has 2 boards.

 

Picture Frame Vero Board Layouts

Board showing minor components, module socket locations and 5v/0v runs. Note LDR connector, preset R, DHT22 and touch sensor connectors are mounted on the rear of the board.

Mounting bolts shown will attach via the neutral density display filter. Any horizontal mounted connector will need the tracks cutting in between the holes with a craft knife- see rear view.

 

 

 

Board layout with all modules barring LED matrixes in place. Note MP1584 mounted vertically and RTC mounted vertically and bent at an angle to be level with the top of the LED Matrixes.

This will keep it clear of the Neutral density Perspex sheet when fitted later. The battery holder is de-soldered from the RTC and mounted on the back of the Board.

This allows for easy battery change by just removing the back cover on the working clock.

The Microwave motion detector is fixed off it's 3 pin mounting socket with support from some hot melt glue.

 

 

LED matrixes fitted in place on the MAX2719 boards. Note the thin wooden support frame on the outside of the LED Matrixes to hold them tight in alignment together.

 

 

Finally the inkjet transparency with the letters is placed on top of the LED matrixes. Note not shown this is cut-out of the sheet with large tabs top and bottom to allow for alignment once

the Neutral density Perspex sheet is bolted in place.

 

Rear of the Vero Board.

Note the preset resistor and RTC battery holder mounted on the rear for easy access when the rear cover is removed.

Similarly the connectors for the 4 touch sensors, DHT22 and LDR are also mounted on the rear of the Vero Board.

Any horizontal mounted connector will need the tracks cutting in between the holes with a craft knife-see below.

 

 

 

 

 

 

Perspex Case Layouts

Base Board without modules.

 

 

Base board with modules.

Note with an MDF base the DHT22 and PIR modules are mounted in the base with cables routed via the cut-out in the board.

If a Perspex base is used then the DHT22 is mounted direct to the socket. This will measure the temperature/humidity within the case

not the room so higher temperature readings will be expected. Note 2 some modules are mounted vertically.

 

 

Rear Vero Board layout

 

 

 

Display Board

Bare board showing module connectors (MAX2719 and touch sensor connector to main board are mounted on the rear of the board).

Note, any horizontal mounted connector will need the tracks cutting in between the holes with a craft knife- see rear view.

 

 

Display board with MAX2719 boards in place. Note the orientation of each board.

 

 

LED Matrixes fitted to MAX2719 boards. The wooden frame holds the LED matrixes in alignment.

 

 

Finally the inkjet transparency with the letters is placed on top of the LED matrixes.

Note not shown this is cut-out of the sheet with large tabs top and bottom to allow for alignment once

the display board is bolted to the front of the Perspex case.

The Touch sensor modules are shown in position vertically. These will be fitted with some foam single sided tape and bent angled out from the board so they are in contact with the case.

This allows the touch sensors to work through the Perspex case.

 

 

Rear of the display board showing the Touch Sensors and MAX2719 to main board connectors mounted on this side of the board.

Note sockets shown for illustration only able connections to the main board are soldered direct at this end.

Any horizontal mounted connector will need the tracks cutting in between the holes with a craft knife- see below.

 

 

 

Display Board Wiring Showing Touch Sensors on side of the Board.

I have not used socket connectors for the MAX2719 and Touch Sensors to main board wiring as shown in the rear Vero Board layout above

but have soldered the wires direct to the boards. The 2 black plugs shown are these two connection that are plugged into the main board.

Note the black cotton ties supporting these two connection cables near the solder joints. This will prevent the cables from breaking away at the solder joints.

The aluminium angle bolted to the top and bottom of the Vero board stop it distorting around the LED matrixes when the mounting bolts are tightened.

 

 

 

Vero Boards shown in position from the rear of the Perspex case.

The Neutral density Perspex sheet is bolted to the front of the display. The display board is then fixed to the same bolt pulling the LED Matrixes against the

Neutral Density Perspex Sheet with the display Inkjet Transparency lettering sandwiched between the two.

Note the rubber washer under each mounting bolt. I found if the bolts were too tight the touch sensors would not work. The rubber washers keep the bolts from working

loose and also (I think) help insulate the bolt from the touch sensors.

The 5 touch sensors (1 at the back of the case to turn the backlight on/off) can be seen with singe sided foam pads attached to allow contact with the case.

 

 

 

 

 

 

The main board is fixed through the case into the base. Fix with Wood screws for an MDF base or M2 bolts if a Perspex base is used.

The case top is fixed using 2 this copper strips bent at an angle with M3 bolts solders in place.

 

 

 

Below detail of case fixing. There are two of these on either side of the case.

Steel washer on outside of case remove for clarity.

 

 

Below detail of 3rd case fixing. Steel washer on outside of case remove for clarity.

 

 

 

 

 

 

 

 

Schematic

Note Touch Sensor LED is for Cube Clock only. Use PIR or Radar Module as required.

 

 

 

 

 

Clock Setup and Use Instructions

The clock has four touch sensors in the wooden frame see picture below.

Using your thumb and index finger on the front and rear of the frame very gently squeeze the frame momentarily to activate a sensor.

 

In most screen modes the Top Left sensor moves back a mode and the Top Right sensor moves to the next screen mode.

The modes are

1 Credits or Start-up message

2 Word Clock

3 Digital Clock

4 Temperature & Humidity Display

5 Analogue Clock

6 Game of life

7 Simon Game

8 Tetris Game

 

The Bottom left & Right buttons only work in some display modes.

 

Setting the Time

Time is set in the Digital Clock Display mode.

Press the Top Left or Top Right Touch sensor until you get to the Digital Clock Mode

 

 

 

In Digital Clock mode press the Bottom Left or Bottom Right touch sensor.

This will start clock setting mode for hours indicated by the hours flashing and the seconds stopping.

 

 

 

Seconds can be reset to zero by pressing the Bottom Right touch sensor.

The Top Left sensor will now step the hours down & the Top Right Sensor will step the hours up.

Once the hours are correct press the Bottom left Sensor.

 

 

 

 

 

 

The hours are now set so the clock moves to minute setting mode indicated by the minutes flashing.

If you have not done it already the Bottom Right sensor resets the seconds to zero.

The Top Left sensor will now step the minutes down & the Top Right Sensor will step the minutes up.

Set the minutes to the next actual minute and when the correct time reaches zero press the Bottom Left sensor to start the clock at exactly the correct time.

 

 

 

The clock restarts at the time you have set.

 

 

On the Perspex case version clock setting is the same the only difference being that the touch sensors are on the left and right sides of the clock case. 

 

 

 

Touch button locations. There is another set on the right of the clock.

 

 

Battery Backed RTC Battery Change

The clock has a built in battery backed up Real Time Clock and will remember the time when the clock is turned off.

The battery should last many years but if the clock stops remembering the time the battery can be changed by removing the back of the clock (four screws).

The battery is a CR2032 coin cell make sure you get a standard cell not a rechargeable cell. The battery is located in a black plastic battery holder on the Vero Board facing the rear of the clock.

Pop the battery out making note of the polarity and replace with the new cell.

The charging circuit has been removed from the RTC so a standard battery is used instead of the rechargeable battery included with the RTC module.

 

 

Sensor Button Function List

The buttons have different functions depending on what mode the clock is in, see chart below.

  Button Location
Clock Mode Top Left Top Right Bottom Left Bottom Right
Credits Previous Mode Next Mode None None
Word Clock Previous Mode Next Mode PIR On (Enabled) PIR Off (Display always on)
Digital Clock Previous Mode Next Mode Set Time Set Time
Temp/Humidity Previous Mode Next Mode None None
Analogue Clock Previous Mode Next Mode None None
Game of Life Previous Mode Next Mode    
Simon Previous Mode Next Mode Start Game Start Gane
TETRIS Previous Mode Next Mode Start Game Start Game
         
Digital Clock Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Set Time (Hours) Hour Decrement Hour Increment Set Minutes/Accept Time Reset Seconds to 0
         
Digital Clock Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Set Time (Minutes) Minute Decrement Minute Increment Set Hours/Accept Time Reset Seconds to 0
         
Simon Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Game Contols Select Top Left Select Top Right Select Bottom Left Select Bottom Right
         
TETRIS Button Location
Sub Menu Top Left Top Right Bottom Left Bottom Right
Game Contols Move Left Move Right Select Bottom Left Select Bottom Right

 

 

 

 

 

 

 

 

Code

Program Files Modules

Brett_wordclock_v3_4.ino  Main program
brightness.cpp/.h  Brightness autoadjustment
character.cpp/.h    Character (digit) definitions
credits.cpp/.h  Ending Credits
display.cpp/.h Display & LED functions
life.cpp/.h Game of Life
serial.cpp/.h Serial port setup menu
simon.cpp/.h Simon Says game
temphum.cpp/.h  Temperature & Humidity display
tetris.cpp/.h Tetris game
time.cpp/.h Wordclock, digital clock
timeanalog.cpp/.h Analogue clock
touchbuttons.cpp/.h Touch buttons, mode switching
   

Third party libraries:

Chronodot.cpp/.h Chronodot library (for DS3231)
DHT.cpp/.h Temperature sensor library (for DHT22)
LedControl.cpp/.h LedControl library (for MAX7219)
stc.cpp/.h/platform.h Simple Tetris Clone library
pitches.h Note frequencies from the Arduino webpage

 

Download Code  v5.6 This code works on both the picture frame and Perspex Cube clocks

 

 

  

 

 

Changing The Code

When you want to make changes to my code you can compare my code to the "​Catalan Code" to make it easier to understand what changes you need to make.

I have added  //Brett to my code to highlight my changes.


 

Changing the code.

If like me you are not very good at coding just play around with the code to get an understanding of how it works.

I just save a different version each time I make even a tiny change. This way if I mess up I can go back a version and start again.

If you are keeping my linear seconds display update the version number on the display so you know what version  you are trying out each time. This is done in the module credit.h around  line 47.
 


 

It would take far too long to explain all the code but here is a very brief guide on how to change the words and when they are displayed.


 

 The WORDS are set in time.h

On line 52 we have 

const byte              w_the[3] PROGMEM = { 0,  0, 3 };

The word "THE" is described in this line with the LED location in the curly brackets "{ 0, 0, 3 }"

This is the co-ordinate of the LEDs we are gong to light when we call "w_the"

The LED matrix numbers starts top left and start from 0 so "{ 0, 0, 3 }" is the first LED across and down the 3 just means the 3 LEDs across including this one will light. As the letters THE are in this position the word "THE" is displayed.


 

Similarly  the word "TIME" would be lit by lighting the four LEDs here { 0,  4, 4 } or row 0, 5th LED along and light 4 LEDs (remember to count from 0).

Working you way down the page shows the position of all the words.


 


 

Photo 2 Controlling when words are lit 

This happens in the module time.cpp

Here you just make a list of rules to tell the clock what words to light at certain times.

Photo 2 shows part of the code starting with line 695

At midnight we want to make the clock say "THE TIME IS TWELVE OCLOCK AT NIGHT"

Midnight is 00 00 

"THE TIME IS" is always displayed from lines 687 

So we add the rules if minutes are 0, then if hours are 0 show the word for hours "TWELVE" and the word "OCLOCK" the word "AT" and the word "NIGHT"


 

If you follow the code down all the possible time combinations are covered.