- 1 Assembling the Word Clock
- 1.1 Check all the pieces
- 1.2 Assembly
- 1.3 Setting up software
- 1.4 Modification
Assembling the Word Clock
Check all the pieces
In the word clock kit, there should be the following:
- 3x acrylic face plates
- 4x acrylic sides
- 1x acrylic back plate
- 1x baffle layer
- 1x LED matrix holder
- 1x acrylic middle layer
- 1x 8×8 LED matrix + header
- 3x jumper cables
- 9x M3 bolts
- 9x M3 nuts
- 4x M2.5 bolts
- 4x M2.5 nuts
What else is needed?
- Soldering iron + solder wire
- 1 piece of plain paper
- Raspberry Pi B+/2/3 or Zero + working SD card
- Soft, lint free microfibre cloth
Soldering the header
First step is to solder the header in place. If you aren’t comfortable with soldering, or never tried it before, you can follow our guide here on soldering. If that hasn’t inspired you to take up this fantastic skill, there are many Hackspaces around that someone attending will happily will help you out with.
Flip the matrix panel over, and locate the holes labelled DIN, +5V and GND. The DOUT is for daisy chaining further WS2812 LEDs, but for this kit, isn’t required.
Place the header in the pins, and flip over again.
Solder the 3 pins, take care not to keep heat on the panel for too long, and not touch any LEDs with the soldering iron as they are made of plastic and will melt easily.
That’s the hard part done!
Assembling the acrylic box
Next step is to peel the protective plastic backing off all the layers of acrylic. This is kept on after being laser cut to protect the surfaces during packing and transportation. Peeling this off can be done easily by using a finger nail and pick at the corner, and slowly peel away.
Do not use anything sharp such as a knife or scissors as this will scratch the surface of the acrylic!
If any layer still has pieces stuck in the holes, such as the front word panel, or screw holes in the side layers, just poke them out using a flat screw driver, cocktail stick or pen.
With all the layers ready to assemble, it might be handy at this point to have a microfibre or very soft cloth to hand, as the acrylic can become very static and attract dust which can be very annoying to remove afterwards.
Attaching the Raspberry Pi B+/2/3
Make sure a working micro SD card is inserted before assembly, as it can be difficult to add or change afterwards.
Using the M2.5 nuts and bolts, screw the Raspberry Pi to the back plate, with the word “Raspberry Pi” readable to you, place the Pi on top with the USB and Ethernet hanging just over one edge as pictured:
Attaching the Raspberry Pi Zero
Building the box
Locate the side panel with the USB and Ethernet cut out (even if it is being assembled with a Pi Zero).
Place this piece so the lugs fit within the holes and hold in place. Take the side piece with the connector holes (HDMI, power and audio) and place fitting the lugs for this piece.
Take an M3 nut and screw, and carefully balance the nut in-between the two side pieces within the cut out. Insert the M3 bolt in the hole and screw in to the nut.
DO NOT use an electrical screw driver to tighten any screw, this can cause cracks and stress fractures in the acrylic resulting in breakages or a horrible finish. Hand tighten until sufficiently tight enough, the nut should help relieve any extra tightness by spinning in its place.
Flip the box over, and locate the screw and nut underneath the Pi (the hole is still there if a Zero is being used) and tighten this to hold both sides to the backplate.
Continue by attaching the next side as shown below behind the Pi and screw in place. DO NOT add the last side just yet, this needs to be kept off to add the middle layer before finishing off the sides.
Attach the jumper cables to the matrix panel, taking attention to the colour coding shown.
Feed the jumper cables through the hole of the middle layer. The hole should be to the left, with the lugs located on the left and right sides. The assembly so far should have the USB cut out at the top.
Attach the jumper cables to the Raspberry Pi, pay extra attention to the pins, as damage to the matrix and Raspberry Pi can be done if connected incorrectly. We are not responsible for damage caused by failure to spend time checking connections! You have been warned!
Insert the middle layer in to the enclosure, ensuring the lugs line up correctly, and feed the jumper cables through the hole.
Finish off by attaching the final side to complete the enclosure, and screwing this in place. Be sure to have a final screw check for the enclosure, that all screws have been inserted and tightened.
Place the clear matrix holder, there is a ‘T’ mark indicator to show the top of the layer, this will hold the matrix in place helping the alignment of the baffle layer.
Creating the diffuser
Take the sheet of paper, and place the baffle layer in 1 corner. You can either trace and cut this layer out with scissors, or use the baffle layer itself to cut the paper to the right size.
Tear the paper down both sides of the baffle layer.
As this diffuser won’t be seen, its your choice to clean up the edges, but you may need to trim down to fit neatly.
Place the baffle layer on top of the matrix, it may need a little wiggle to get the LEDs lined up nicely. If the baffle doesn’t sit correctly, rotate it by 90 degrees, it will only fit one of two ways.
Place the paper diffuser on top.
Finally, place the chosen front plate on top of the clock, and screw in to place with the remaining 4 nuts and bolts.
Setting up software
An internet connection is required to complete this step. After the software is installed, an internet connection is still required to obtain the correct time from the NTP servers.
Plug in the Raspberry Pi and login to the command prompt. Run the following commands to install the needed software;
sudo apt-get update sudo apt-get install build-essential python-dev git scons swig
Now download the latest WS2812 drivers for the Raspberry Pi;
git clone https://github.com/jgarff/rpi_ws281x.git cd rpi_ws281x scons cd python sudo python setup.py install
Due to changes in the core system used for the Pi Zero and Pi 3, the audio driver needs to be forced to use HDMI (even if it isn’t connected);
sudo nano /boot/config.txt
Use the arrow keys, and go to the end of the file and add the following two line;
Hold CTRL, and press X. Follow up by pressing Y and Enter. This will save the config.txt file that is used during bootup with the changes in audio to allow the WS2812 library to work.
Now to let the changes take effect;
Once the Pi has rebooted and is available to use again, all that is needed now is to download and install the wordclock example python script;
git clone https://github.com/CyntechUK/Wordclock.git cd Wordclock sudo python main.py
If everything went well, the LEDs should spring to life with the current time – Within a couple of minutes accuracy.
Automatically start on power up
It is possible to have the script start automatically once the Raspberry Pi has booted up, to do this, first we need to create a cron job. Type;
If this is the first time, you’ll be asked which editor to use. Press 2 followed by Enter.
Go down to the bottom, and add a new line to the end;
@reboot sudo python /home/pi/Wordclock/main.py
If you moved the file somewhere else, or renamed it, replace the example with the full path location to the file.
Save the file with CTRL + X, Y and Enter and follow up with a reboot to try it out;
As the heart of the clock is the WS2812 panel, which has been heavily developed on other platforms such as Arduino (and clones such as Gemma or Teensy) or Photon Spark Core, with a drill/dremel (or contact us for a quote on a replacement backplate for a chosen MCU).
Arduino (and clones) – FastLED library
Code/Instructions for other platforms
This will updated when other platforms appear