Introduction: Modular Display Clock
This project makes use of a previous project Modular Display Element to make a digital clock, using four of the modules connected together and controlled by a Microbit and an RTC.
Microbit V2 (preferred due to built in speaker, V1 will work but will require an external sounder.)
Jumper Jerky Junior F/M - Qty 20
Jumper Jerky Junior F/F - Qty 4
Jumper Jerky F/F - Qty 3
Jumper Jerky F/M - Qty 3
Right Angle Header 2 x (3 ways x 1 row) required.
Enamelled Copper Wire 21 AWG (0.75mm dia.), or other insulated wire.
M2 screws 8mm - Qty 12
M2 screws 6mm - Qty 16
M2 Bolts 10mm - Qty 2
M2 nuts - Qty 2
M2 washers - Qty 2
M2 Hex spaces 5mm - Qty 2
M3 washers - Qty 14
M3 bolts 10mm - Qty 2
M3 bolts 25mm - Qty 4
M3 nuts - Qty 12
M3 Hex spacers 5mm - Qty 2
M3 Hex spacers 10mm - Qty 4
Right angle Brackets (15(W) x 40(L) x 40(H) mm) - Qty 2
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.
White Filament - For the greatest display flexibility.
Black Filament - For the supporting boards.
2mm drill bit
3mm drill bit
5mm drill kit
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.
Step 1: Baseplate Strips
See: Modular Display Element (MDE)
Four "Modular Display Elements" are required to create the clock display and these are held together with baseplate strips which were cut from a larger baseplate.
The baseplate strips measure 32(W) x 144(L) mm or 4 x 18 stubs and each one over laps two MDE's attaching to the stubs on the MDE. However, for added strength four M2 x 8mm screws are fitted close to the corners which pass through the baseplate and into the MDE.
Step 2: Schematic
The schematic shows the components that are used to control the MDE's which contain 56 Neopixels.
The control components consist of a Microbit, RTC, Breakout Board, Switch and protection circuit.
The majority of the soldering is focused on the Neopixels whereas the control components are mainly connected with jumpers.
Step 3: Coding
Code in created in MakeCode.
'on start' procedure.
Initializes the Neoplxel strip of 56 LED's
Display title message.
Initializes the segment_list which contains segment designations per number to be displayed.
Number 0 stored in element  = 0111111
Number 1 stored in element  = 0000110
Number 9 stored in element  = 1101111
Number 10 stored in element  = 0000000 used for digit blanking.
Calls 'set mode' which checks P1and if high enables time setting otherwise displays the current time.
Calls 'Time_split' which joins the two numerical values of hours and minutes in to a 4 character string, prefixing any numbers less than 10 with a leading zero.
Which extracts each of the 4 characters in turn starting with the last character into segment_value
Digit then contains the value in segment_list referenced by segment_value.
(If segment_value = 0 then digit = element  = 0111111)
Inc = index x (LED_SEG) x 7). Where index = which of the 4 characters is referenced, LED_SEG = number of LED's per segment, 7 = number of segments in a digit.
This specifies the start of the LED's to be controlled for the appropriate character.
The for element assigns in turn each number in digit to value.
If value =1 then the pixel assigned by inc is set to red and turned on otherwise it is turned off.
As two LED's per segment are required this process is repeated LED_SEG times.
(E.g. If Hours unit is 9, index = 0,
digit = 1011111 [value = 1, inc = 0 & inc = 1], [value=0, inc = 2 & inc = 3] .... [value=1, inc=12 & inc = 13])
Hours tens [Index =1, inc range 14 to 27], Minutes unit [index =2, inc range 28 to 41], Minutes tens [index =3, inc range 42 to 55].
Once each of the 7 values have been processed and sent to the strip the changes are shown.
A delay is introduced to prevent flicker.
'on button A'
This sets the hours if set_enable = 1
'on button B'
This sets the minutes if set_enable = 1
'on button A+B'
This calls 'settime' which sets the time based on the values assigned with buttons A and B.
Step 4: Back Panel
The components are attached to a baseplate (95(W) x 128(L) mm), which is fitted to the back of the MDE's with M3 X 25mm bolts and 10mm standoffs.
Four bolts are fitted through the holes in the Neopixel support board and the standoffs fitted to attach the baseplate at the corners, 3mm holes are made in the baseplate to align with the bolts.
Position and drill holes for the Edge connector Breakout (2 x 3mm), the RTC (2 x 2mm), and the switch ensuring to leave space (20 x 40mm), to mount the right angle brackets which act as feet.
Connections to the RTC are made with 4 Junior jumpers F/F and the RTC is secured with 2 x M2 bolts.
Connections to the switch are made with 2 Junior jumpers F/M and the switch is fitted through a 5mm hole.
Connections to the CR protection circuit for the Neopixels is made with 3 Jumpers F/F and from this to the Neopixels with 3 jumpers F/M, this is attached to the board with a cable tie fed through one of the holes in the board.
Fit the angle bracket feet to the baseplate with 4 bolts. (The lower corner M3 bolts for attaching the baseplate can be used to hold the feet in place with a 2nd bolt in the lower hole of the bracket.
To prevent scratching the surface on which the clock will sit, attach stick on pads or a couple turns of tape.
The baseplate can now be fitted on to the corner support bolts and secured with nuts.
Step 5: Operation
Power is provided by connecting the USB cable directly to the Microbit.
Setting the clock.
Before setting the clock ensure that the RTC has a battery fitted to retain the time when/if power is removed.
The default time format is 24 hour mode.
Move the 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)
Press Buttons A & B together to set the time, the entered time values will be displayed.
Move the switch from the set position.
At switch on or after setting.
After a short delay the display will be updated with the current time.
Step 6: Finally
The bringing together of a couple of smaller projects resulting in a larger project.
Hope you find this and the preceeding related projects of interest.