WordNum Clock

by Gammawave in Circuits > Clocks

56 Views, 0 Favorites, 0 Comments

WordNum Clock

DSCF5031_2.jpg
wordnum.gif

This project is a WordNum clock being a hybrid of a Wordclock and a digital clock using 100 addressible RGB LED's controlled by a Microbit with an RTC.

Displaying the time in 12 hour mode and updated each minute with the addition of text each 5 minutes.

The display and main supporting structure is 3D printed and this is mounted within a deep picture frame.

Size: 206(L) x 206(W) x 40(H) mm (excluding framing).

Currrent: <=200mA at 5V

Supplies

DSCF4999.JPG
DSCF4997.JPG
DSCF5036.JPG
DSCF4998.JPG

Microbit V2 (preferred due to built in speaker, V1 will work but will require an external sounder and code modification.)

Expansion Board for Microbit

DS3231 RTC

Switch DPDT

470R resistor

1000uF capacitor

Flexible RGB LED Strip (aka NeoPixel, WS2812, SK6812), 60 LED's/mtr - Qty 100 LED's.

Brass welding rods 250(L) x 1.6(dia) mm - Qty 8

Pin headers - Straight through hole single row

Jumpers Long Pin to Pin

30 AWG wrapping wire [if utilising wire wrapping]

Countersink screws (non metallic), M3 x 30mm - Qty 7

Pan head screw (non metallic), M3 x 25mm

Pan head screws (non metallic) M4 X 10mm - Qty 2

M2 x 10mm pan machine screws - Qty 3

M2 nuts - Qty 3

Threaded M2 x 5mm threaded spacers - Qty 3

ECW 21 AWG (0.7229(dia) mm)

Acrylic Sheet 5mm thick (White)

Acrylic sheet 3mm thick (Clear)


May prove more cost effective to buy a range of values rather than individual values unless you already have them available. Some components may also have a MOL greater than the quantity specified in the component list.


3D Printer

White Filament - For the display diffuser.

Black Filament - For the display board and grid.

Grey Filament - For the back board

2mm drill bit

3mm drill bit

4mm drill kit

6mm drill bit

Drill

Saw

Pliers

Wire cutters

Soldering Iron

Solder

Sanding paper

Screwdrivers

Countersink bit

Marker

Wire Wrapping Tool (optional)


Know your tools and follow the recommended operational procedures and be sure to wear the appropriate PPE.


No affiliation to any of the suppliers used in this project, feel free to use your preferred suppliers and substitute the elements were appropriate to your own preference or subject to supply.

Links valid at the time of publication.

Background

This is a hybrid clock incorporating the elements of a word clock and a digital clock.

That is used to display the time in 12 hour mode.

The display grid consists of 59 numbers, 40 letters and 1 symbol (+), backlit with 100 addressable RGB LED's on a 10 x 10 grid all controlled by a Microbit.

The numbers enable time combinations that exclude the five minute time intervals whilst the letters display the five minute intervals. In addition to the meridiem's represented by A for AM and P for PM.

The layout is such that the numbers may appear haphazard therefore to clarify its type, colour coding is applied.

Subject to user preference or vision colour perception other colours may be used.

The hours are displayed in green the minutes are displayed in red and the meridiem's in blue.

Example times.

14:00 becomes 2 OCLOCK P

14:10 becomes TEN PAST 2 P

03:45 becomes QUARTER TO 4 A

07:09 becomes 7 9 A

20:19 becomes 8 19 P

Display Creation

wdnumclk3.png
wordnum_clock3.png
worldclock_layers_F3.jpg

The information to be displayed determined how many characters were required.

I laid out the characters for the display in Excel first.

A requirement for the display was that the characters should be of a stencil type.

This would require connected negative space to prevent the centres of enclosed characters falling out.

Examples Q,R,O, P, A, D, B, 4, 6, 8, 9, 0

I found a suitable stencil type font: Aero Matics Stencil Font this is a free font from 1001freefonts.com

Next this TTF file needs to be converted to the SVG file, I used convertio.co

I would then require to turn the layout into an STL file for 3D printing.

For this task I used TinkerCAD which has a custom font option involving the following:

Import the font using the Custom font Text and enter the required characters to be formatted and arrange to a 17mm grid spacing to create the display.

See Custom fonts in TinkerCAD by Penelopy Bulnick for step by step details.

The subtraction of the grouped characters from a 1 mm high square could have been performed here but I had already created the elements on another platform, so finalised the STL there.

*No affiliation to the links provided and other sources may be used.

Coding

microbit-wdclk_nums9.png
swversion.JPG

The code is created in MakeCode for a Microbit V2 (See About image).


On Start

Switch on the Microbit V2 built in sounder. (depault output P0)

Set pull downs on P1 (set mode) and P8 (Microbit display mode), making the pins active high.

Initialise P2 for 100 Neopixel RGB LED's

Show program name.

Set_enable = 0; this stores the state of P1

Set_hr & Set_min store the time value to set the clock.

//LED references are a single two digit string or a multiple of two digits separated by a comma

Test list contains the LED reference for the minute values on the grid.

Test list2 contains the LED reference for the hour values on the grid.


Forever

Setmode

//Determines the set mode based on the digital value of P1

If P1 = 0 NOP else Show the set mode indicator "+"


ubitdisp

//update the Microbit display with the currrent time

If P8 = 1 Show [hour ":" minutes] : pause 200mS

Clear Microbit screen

Call Chime


Chime

If [minute = 0 and seconds < 10] : play sound on the hour


Htime_split (Green)

//Green specifies the colour of the hour value displayed

//convert 24hr Hour to 12hr Hour

//If minute >30 & its a 5 minute interval, increment the hour (for 4:45 the hour becomes 5 and the text; Quarter To)

Lookup the LED reference for the hour and pass to value.

If hour >= 12 display meridiem in blue, P (equal to PM), LED 8 else A (equal to AM) LED 18

Call Pixel (value, Green)


Mtime_split (Red)

//Red specifies the colour of the minute value or text displayed

Lookup the LED reference for the minute and pass to value.

Call Pixel (value, Red)


Pixel (new_value, col)

//new_value contains one of the two types "nn" or "nn","nn"... where nn is a two digit reference on the LED strip.

//Each element in the array references a specific LED, Element 0 = "00,01,02,03,04,05" in this case 6 LED's

//Where 00 is the first LED and 01 is the second LED etc. From the front of the character display the bottom left hand corner is LED 00.

// At the specified LED locations can be found the following "O,C,L,O,C,K".

//Within the array element 1 = "92" = 1, element 2 = "85" = 2 and element 5 = "10,11,12,13,36,37,38,39" = "F,I,V,E,P,A,S,T"

Search new_value for a separator "," and store its position in comma, if no separator is found return -1

If comma = -1 a single LED reference is returned and passed to the strip with the required colour value.

If comma > 0 its a multiple value string and each value is pass to a temporary string array 'text sub'

All values in 'test sub' are passed to the strip with the appropriate colour value.


Show the latest data on the strip

Pause

Clear the strip

//Because the strip is only updated with a Show the Clear only takes effect on the next Show


On Button A pressed

If set_enable = 1 increment set_hr by 1 and reset to 0 if >23


On Button B pressed

If set_enable = 1 increment set_min by 1 and reset to 0 if >59


On Button A+B pressed

If set_enable = 1 Call settime


settime

//Update the RTC with set_hr and set_min

CAD Design

worldclock_layers_F3.jpg
worldclock_diffuser.jpg
wordclock_grid3.jpg
wordclock_backlight.jpg

The majority of the 3D printed elements were designed using BlocksCAD, with all sliced using Cura 5.8.1 and printed on a Elegoo Neptune 4 Pro.

This project requires a printing bed greater or equal to 206(L) x 206(W) mm.

1: Character Display. 204(L) x 204(W) x 1(H) mm, Weight: 51g

2: Diffuser. Size: 206(L) x 206(W) x 1(H) mm, Weight: 55g

3: Grid. Size: 206(L) x 206(W) x 10(H) mm, Weight: 109g

4: Back. Size: 206(L) x 206(W) x 3(H) mm, Weight: 109g

3D Printing

DSCF4987.JPG
DSCF4988.JPG
DSCF4996.JPG
DSCF5009_2.jpg

Filament: PLA (Black : Character Display & Grid, White: Diffuser and Grey: Back)

Layer Height: 0.15mm

Infill: 100%

Wall Thickness: 0.84mm

Wall line count: 2

Bed Adhesion: Skirt

No supports

All parts are correctly orientated within the files for printing directly.

Post Processing

Some post processing may be required to remove aberrations in the cavities and around the edges with sanding paper and needle files in addition to opening and smoothing the holes with a 3mm drill bit.

Retainer Panel

DSCF5004_2.jpg
DSCF5005.JPG

The Acrylic retainer creates a border and support for the Character Board centring it in the frame.

The retainer was created for a frame that was purchased from a used goods store which fitted my decorative requirements for this project therefore subject to requirements the retainer may be sized or omitted as fits the users tastes.

A frame depth of 40mm with the circuit as mounted would keep the circuit from pressing against the wall.

If a frame with a depth of <40mm is used the difference in depth can be made up with a supporting box section made from wood or perspex and used to facilitate hanging.

For the frame used the Acrylic sheet is cut to the inner frame dimensions, the glass in the frame was used as a template.

The 5mm thick Acrylic sheet was cut to a size of 283(L) x 283(W) mm.

From each of the two diagonally opposing corners draw two lines that cross in the centre.

Align the centre hole of the grid with the cross and the centre of the corner holes with the diagonal lines, mark the position of the corner holes.

Drill out the corner holes with a 3mm drill bit and counter sink the holes on what will be the front of the panel.

Into the centre of the Acrylic sheet was cut a square opening of 170(L) x 170(W) mm to show the Character Board.

Circuit

wordnumclock_cct.png

The circuit elements consist of a Microbit V2, DS3231 RTC, Expansion Board, 100 Neopixel LED's, a switch and a RC network.

All the main elements are connected to the Expansion Board.

1: Microbit

2: RTC: VCC to 3V, GND to GND, SDA to pin 19 and SCL to pin 20.

3: Mode switch: COM to 3V, T1 to P1 (set enable) and T2 to P8 (display enable)

4: Microbit P2 via a 470R resistor connects to D1 of the first RGB LED.

5: The RGB LED's are supplied by 5V & 0V across which is connected a 1000uF electrolytic capacitior.

These elements are then mounted on a separate sheet of Acrylic which will be attached by screws to the back board.

Power is provided by a USB power adapter with a micro USB terminated cable.

LED Matrix Assembly

DSCF4991.JPG
DSCF4992.JPG
DSCF4993.JPG

The display consists of 100 addressable RGB LED's supplied on a strip.

The strip is cut into lengths of 10 LED's for a total of 10 strips.

Rather than connecting all three wires on each strip serially, I connected the supplies on a loop.

This means from a power perspective the 10 short strips powered at both ends present a parrallel and lower cumulative resistance reducing the effects of volt drops.

The loop is made from 8 x 250(L) x 1.6(dia) mm brass welding rods.

Four rods are cut to a lengths of ~ 18mm and soldered at the corners to form a connected square.

Four rods are cut to shorter lengths of ~ 19mm and soldered at the corners to form a connected square.

These two squares sit in two separate depressions in the outer part of the grid.

Designate each square frame to a supply polarity and mark part of the appropriate frame with coloured varnish/paint, permanent ink or a label.

Cut short lengths of ECW (Enamelled Copper Wire), and connect the supplies of the strips to the corresponding designated supply on the frame.

With a DMM on continuity/low resistance check the connectivity of the strip supply to the wire frame ensuring there are no shorts between the supplies.

Serially connect the DO to DI pins on each strip with ECW.

Connect the pins of three long jumpers to the strip at 5V, 0V and DI close to the corner.

Display Assembly

DSCF5017.JPG
DSCF5014.JPG
DSCF4995.JPG

Determine the exit point for the long jumpers and file or cut a slot in the grid perimeter.

With the Character Display face down, on top of this place the Diffuser and align the four corner (3mm), holes and repeat the process with the grid.

Feed 4 x M3 x 30mm plastic countersunk screws through the Acrylic retainer and through the holes of the Character Display, Diffuser and Grid sandwich and secure with 4 x M4 plastic nuts.

Align the LED Display on the grid with the first LED positioned over the lower right hand corner (O of the OCLOCK), of the Character Display.

The back panel requires 2 x 3mm holes which are countersunk on the reverse side these will align with two 3mm holes in a 3mm thick clear Acrylic rectangle of 120(L) x 60(W) mm, which are used to mount the circuit elements.

Into the 2 x 3mm holes in the back panel fit 2 x M3 x 20mm countersunk screws and secure with 2 x M3 nuts.

Secure the back panel to the back of the grid with 4 x M3 nuts.

Circuit Element Positioning

DSCF5021.JPG
DSCF5022.JPG
DSCF5023.JPG

The circuit elements are mounted on a 3mm thick clear Acrylic rectangle of 120(L) x 60(W) mm, with 3mm holes drilled to align with the two M3 screws fitted in the back panel and held in place with 2 x M3 nuts.

The Expansion Board is mounted using plastic 2 x M4 x 10mm pan head screws, 2 x M4 washers and 2 x M4 nuts.

The RTC is mounted using 3 x M2 x 10mm pan head screws, 2 x 5mm threaded spacers and 3 x M2 nuts. This is orientated such that its battery is facing uppermost for easy replacement and the IO pins facing away from the USB connector.

The RC network is mounted on a small piece of strip board and 2 x 3pin straight header pins at the input and output.

The mode switch is mounted through a 6mm hole and an additional 6mm hole is placed next to the switch to enable the wires to be routed up and on to the Expansion Board.

The ends of the three wires from the display are vertically soldered to the output pins of the RC network.

I decided to wire wrap the remaining pins as they presented a lower profile that influenced the depth of the frame and which is a more robust and reliable connection than jumper wires. This also offers a tidy solution in a confined space compared to soldering.

Further details on wire wrapping can be found here: Allelcoelec.com which is one of many sources for information.

*No affiliation to the links provided and other sources may be used.

Operation

microbit_set.png

Setting the clock.

Before setting the clock ensure that the RTC has a working battery fitted to retain the time when/if power is removed.

The default time setting format is 24 hour mode.

The mode switch (centre off), has two functions time set and Microbit display.

With the switch in the centre position both the set mode and Microbit display are disabled.

In one position, set mode is enabled and the Microbit display is enabled during setting.

In the second position, set mode is disabled and the Microbit display is enabled for time display.

Being able to blank the Microbit display serves two purposes, 1: to save power, 2: as the Microbit is mounted at the back the Display will not be visible therefore it only needs to be visible when setting and verifiying the time.

Move the mode switch to the set time position a plus symbol will be shown on the display.

Press Button A for Hours. (0 to 23)*

Press Button B for Minutes. (0 to 59)*

*Each press incrementing the number to the maximum value and on the next press resetting to zero.

Press Buttons A & B together to set the time, the entered time values will be displayed.

Move the mode switch from the set position either to the centre or Microbit display enable.

With the mode switch in the centre position the Character Display will update after a short delay.

With the mode switch set for Microbit display enable the Microbit will show the time just before the Character Display updates.


At switch on or after setting.

If the clock has been previously set. after a short delay the time will be shown on the clock face.