Introduction: IKEA Ribba Word Clock
My first word clock was 'started' some 5 years ago. It was based on the traditional individual LED clocks with more solder joints and wires than I had the time, or patience for. It was picked up and bits done now and then before being put away gathering dust. Most of this type of clock rely on a series of shift registers and darlington arrays to drive the LEDs. I decided on a different route and went for the popular Arduino Mega with more than enough I/Os. I managed the hardware, but was never quite happy with the light leaking between words, and the code was going to be unique, so was going to be an uphill struggle.
It was Nitrohawk's quite brilliant Word Clock https://www.instructables.com/howto/javelin/ that prompted me to have another go. As this was based on addressable RGB LEDs rather than individuals, there's only 1 data connection required to control the time. Making it much easier to build and code.
So, you may ask, why write an instructable if you've just copied his work? It's a good and valid question and the only answers I can give are as follows:
1) Mine uses the very popular and easily accessible IKEA Ribba 9"x9" box frames, so a White Word Clock is now an 'off the shelf' option.
2) As the Ribba is quite a bit thinner than the original Javelin clock, I've used Arduino Pro Micro instead of full size Leonardo. The clock I'm building while I write this Instructable will use the cheaper Arduino Nano.
3) I've added an element of fun by including appropriate time-bound messages. E.G "TIME FOR A COFFEE", "TIME FOR HOME" etc.
4) It uses the more accurate DS3231 real time clock and the code I have used doesn't require an additional library downloading as the code is self contained.
If you're interested in using the Ribba frames, but want the easier to make version, I believe mine is the perfect, frustration free solution.
I'll be building a second model, and will be taking pictures of each stage so you can follow progress, so keep coming back for more thrilling instalments of WhiteClockCompany WordClock2. I'll list material suppliers and the Arduino code so you can give it a go yourself.... See you soon
Step 1: Foundations
The starting point is always the planning. The great thing about this Word Clock is that some decisions are made for you, so require less planning. For instance, the overall dimensions of the clock are governed by the size of the frame, and for simplicity sake, we'll work with the LED strip's pitch rather than commit to cutting and reconnecting 144 LEDs.
The Javelin clock has a 13 x 13 matrix of LEDS made up of 13 strips. These fit quite nicely into the larger box frame. However, as I'm using Ribba, I decided on a 12 x 12 arrangement.
Materials for the foundations:
- 1 x A3 sheet 5mm foam board - Black - hobby supply shop
- 144 x 60led/m WS2812B 5050 RGB LED strips - addressable - eBay supplier in China
- 10m Red, 10m Black, 10m Green - single core equipment wire 7-0.2mm - easier to work with than multi-strand
Sundries & equipment:
- Craft knife with new blades - #67 angled chisel blade & #17 5mm square chisel blade
- All purpose glue
The first part of the plan is to work with what you've got. The LED's centres are 16.66mm apart. Which, using a little rounding equals 200mm for each strip. The inside dimensions of the frame are 230mm x 230mm. Leaving a 15mm gap all around the clock, very nice.
The first job is to create a base, onto which everything will be fixed, LED strips on the front, Arduino etc on the back.
- Take your A3 foam board, measure and cut a 230mm x 230mm square and put it on one side.
- Cut the remaining large piece across at 230mm and you'll now have 4 pieces of foam board.
- It's now time to sharpen your pencil and mark out the baffles and support foam. Take your time now and you'll be rewarded with nice crisp letters later.
- From the foam board pieces, cut out 26 x 230mm x 10mm - take your time here
- Cut out 4 x 188mm x 13mm and 4 x 47mm x 15mm
You now have the building blocks for the clock foundation - next step baffles
Step 2: Baffles
The baffles do one job, and do it well. To ensure than no light bleeds between the letters. This gives a nice crisp display.
- Take each 230mm x 10mm piece and draw a centre line
- Mark cut centres - all in mm: 15.00, 31.66, 48.33, 64.99, 81,66, 98,33, 114.99, 131.66, 148.33, 164.99, 181.66, 198.33, 215.00
- Use a square 5mm blade if you have one, to cut the centres (check the pictures) and angle the blade so it breaks the cardboard surface with the blade point. Then push down vertically for a nice clean 5mm cut.
- Use your #67 angled blade to cut out the 5mm x 5mm squares.
- You're done, just 25 to go and you can put your baffle matrix together.
- Slot each piece together so they interlock to form a square. If your square goes a bit off, you can use hot glue later to fix it in position.
Have a rest and a cuppa because your fingers with be numb, sore and in need of a rest. I've just finished one at from start to finish in one sitting and it took 4 hours!!
You could (if you really want) have the baffles 3D printed, but you'll first need to design it and have it printed. I found the foam board route quite satisfying anyway, despite the impact on the fingers after 1,043 cuts (yes, I worked it out). You never know, you might just find a use for all those little squares you've just made....
News just in, I've gone back in time and edited this stage, I've just completed another set of baffles for another customer's clock and the 4 hours it took got me thinking about printing again. I have now designed a 200mm x 200mm baffle set for future clocks, so it's only right that I share the news, and files. I've split it in 2 as I thought it would give me more options to get it (them) printed. I found a printer hub through https://www.3dhubs.com and within minutes, my order was accepted, paid for and status changed to printing. A day later, this changed again to dispatched. So once they arrive, I'll take some pics and share them.
This is the hub I chose https://www.3dhubs.com/chester/hubs/chris
2 short days have passed... and they're here. They look superb and will be used in future clocks. They're not cheap cheap compared to the foam board route, but it's 4 hours work saved!...............
Next stage - The LED Strip - Application, connections and a glimpse of the code principles..
Step 3: The LED Strips
In this stage, we'll mark out the positions for the LED strips. I've seen many people use paper templates and punch holes through etc. I prefer to measure and mark.
- Mark up the 230mm x 230mm foam board using the dimensions we worked with earlier for the baffles
(all in mm):15 - 31.66 - 48.33 - 64.99 - 81.66 - 98.33 - 114.99 - 131.66 - 148.33 - 164.99 - 181.66 - 198.33 - 214.99
Join all of the points up and you have a grid of 144 squares with a 15mm border.
It might sound a bit strange to go to 2 decimal places, but the first one I did, I tried simply measuring 16.6mm along, then move the ruler. By the time I got to the other end, I was 7mm out!! So it's just a tip....
- Take your first strip of LEDs and carefully cut into 12s.
- Pick up 1 of the strips and look closely, you'll see writing next to each brass terminal. On one side (+5v, Din, Gnd) if you follow the direction of the small arrow, you see on the other side of the LED marked (+5V, Do, Gnd).
- The first strip should be applied from right to left on the bottom row.
- Remove the backing and apply the first strip, with the centre of each LED in the centre of each square.
- The next strip should be placed with arrows going from left to right.
- Continue with this zig zag pattern until the board is full with 12 rows or 12 LEDs. Have a look at the pictures, this should make it clear where the arrows should point.
Next we need to attach equipment wire to each strip to join them together. But first, we'll have a look at some theory and how these delightful little things work with just 1 lonely data wire.
Step 4: The LED Matrix - Build, Test, Theory
With the matrix complete (thank you postman for delivering my next batch of strip), it's on to the wiring.
- First job is to de-solder the wires which came with the LED strips.
- Then apply solder to each copper contact at the ends of each row - much easier to do this first that trying to apply solder with wire later.
- Cut holes in the foam board bottom right and top right. This allows you to feed the 3 wires (5V+, DATA, GND) to bottom right, and 2 wires (5V+, GND) to top right. The top right acts as a power booster, so the matrix doesn't run out of juice by the time it's travelled through 144 LEDs.
- Cut suitable length wires and solder in place.
- Secure all wires by filling each hole with hot glue.
- Time to test before you commit to an hour of soldering.
We're going to test just 12 LEDs, the bottom row that we've connected wires to.
I've used the brilliant Adafruit NeoPixel Library - https://github.com/adafruit/Adafruit_NeoPixel
In principle, you programme the code to light a specified LED a certain colour. Simple!!
LED 1 in the strip in code terms is LED0 and LED 12 in the strip is LED11. Remember that these are RGB LEDs, which stands for Red,Green,Blue. The colour you send to the strip is based on each colour being defined as a value between 0 and 255, where 0 if off and 255 is full blast!. So (0,0,0) is off, (255,0,0) shows full on bright RED, (0,0,255) is full on BLUE and yes, you guessed it (255,255,255) is WHITE.
So, as an example, and i'm going to use simplified english rather than code:
* please light up ( LED4, colour(0,255,0))
This will light up the 5th LED a nice bright GREEN.
In my application, I'll turn on different LEDs dependant on the time (but more about that later.
So, the next stage is to put together a very simple Arduino circuit to test the first row, it's your first chance to see some pretty lights.
Arduino Test Rig
I've used an Arduino Mega as it's easy to push the wires into a breadboard.
- Connect a 1000uF capacitor across 5V+ and GND
- Connect a 300k resistor between Arduino pin 6 and your LED strip data line
- Connect your 5V+ and GND wires to the breadboard
- Load up the Adafruit NeoPixel strandtest sketch and change NUMPIXELS variable to 12
- Upload and enjoy
If you go back to the actual LED strip, I hope the direction of the arrows is starting to make sense??
We'll next solder the contacts together to effectively make a strip of 144 LEDs. If you look at the screen shot of the spreadsheet, you'll see the LED address of each element in the LED matrix. Later, in code, we'll determine which to turn on (set above (0,0,0)) and which to turn off (set to (0,0,0)).
Right, I'm off to solder all the joints, see you at the other side for the Arduino, real time clock and power supply.
Step 5: The Finished LED Matrix
Going the strip
Armed with 3 rolls of equipment wire, scissors, wire cutters, solder, soldering iron and some great music, I was set for a bit of soldering.
I used black multicore for GND, red single core for 5V+ and green single core for DATA. I'm in 2 minds about which is right to use, single core doesn't need tinning to keep the strands in order, but does put more pressure on the solder joints as you bend the wires to connect to the next strip. You decide which you prefer.
The task of soldering doesn't really need much instruction, just join GND to GND etc at the end of each strip. Not exciting, but necessary.
Next job after all of the LED strips are joined, is the Arduino. Mounting it, powering it and connecting data line to it. Mounting it was the easy part, a short strip of cushioned double sided tape. There's no right place to put it, but it'd look rubbish if it's not straight. The other thing to consider is the position of the real-time clock module which 'should' be as close to the Arduino as possible to ensure you get accurate results.
Think back to the initial testing, I mentioned a capacitor in the power line and a resistor in the data line. We'll come back to the resistor in a minute, but let's have a look at the best place for the capacitor.
A 1000 µF capacitor isn't a tiny component, and the components for the whole project have being chosen because they're thin and will fit in the tiny gap between the back of the LED matrix and the frame back-plate.
If you check the pictures, it's been mounted on a board and bent over. Underneath the board, the pins of the capacitor are soldered to the terminal pins we'll later solder the 5V+ and GND wires to for power, LEDs and real-time clock. This board was hot-glued in place.
We used the Arduino Mega to power the LEDs for testing, and I did have to reduce the colour intensity as even the Mega can't provide enough current to light them all up. I won't labour the point, but each colour at full brightness pulls 20ma. That really adds up. The Arduino Nano certainly can't supply the current we need. So I've hacked 2 USB cables. Cutting the end leaving 6" will allow you to tap in to the usb cable to get the full 500ma from a usb socket, while also powering the Arduino and transferring data. This 'tap' is then connected to the terminals on the power board along with the wires to the LEDs.
So, we have power to the Arduino, and power to the top and bottom of the LED matrix, all we need now is to connect the data line to the Arduino, remembering we need a resistor in line. In the test rig, the resistor is on the breadboard, but we're not using one for the final project. So i've soldered a resistor to the data wire and encased it in heat-shrink. The other end of the resistor is soldered to pin 6 on the Arduino. It's worth noting that while not necessary, the capacitor and resistor are now considered 'best practice' by Adafruit.
Next stage is to load the same sketch we used on the Mega, onto the Nano and cross your fingers!!!!!!!
Next step (once we've verified all the LEDs are working, is to fix the baffle grid and cut out a button slot.
Step 6: Baffles Meet LEDs, Real-time Clock and Switches
Baffles fixed to main board
Attaching the baffles with hot glue will ensure we get the best, crisp light path through the letter stencil later. So it's worth taking a bit of time and glue each corner in turn. Making sure it's as square as possible.
Next job is optional and dependant on the type of switches you're using. The ones I ordered are quite deep and wouldn't fit in the gap, so I've cut a slot in the top right of the main board where the switches can fit.
The matrix was then retested to ensure I haven't damaged any wires. All good.
Real-time clock module (RTC)
For the prototype, I did realise that the RTC module was 'quite tall' and actually cut a small piece of foam board out, then glued the module in. This resulted in the back-up battery being hot glued in! Not ideal. So for this one, I've made the battery remote.
- Carefully desolder the battery holder from the RTC module
- Add red and black equipment wires to the terminals on the battery and corresponding solder points on the module. Fortunately, theres a symbol of the battery holder showing polarity on the underside on the module.
- Decide where the module will sit, remembering you still need to wire it up to 5V+, GND, DATA & Clock.
- Hot glue or double sided tape the module and battery in place.
- Solder equipment wires and connect to main power terminals and Arduino pins A4 - SDA & A5 - SCL.
I edited the code to comment out the switches to test the RTC module. As you see from the pictures. It's working just fine. Sending data to the screen terminal as well as lighting up the appropriate LEDs.
The switches are simple momentary switches from eBay.
- Connect red equipment wire to one of the poles
- Connect green equipment wire to the other
- Connect a 10K resistor to the same pole as you've connected the green data wire
- Connect a black equipment wire to the other side of the resistor
- Heat shrink the 2 sets of wires to tidy them up
- Repeat, so you end up with 2 completed switches for Hours and Minutes
- Solder one green data wire to Digital Pin 9 and the other to Digital Pin 10 on the Arduino
- Connect both red wires to the 5V+ terminal on our power board
- Connect both black wires to the GND terminal on our power board
- Hot glue the wires in place around the Arduino and other areas to keep it all from moving
- We're now done with wiring, so hot glue the power terminals
- Mark out where the holes will go through the frame back plate and drill appropriate holes
- The switches will now fit nice and snug into the gap cut in the main board earlier, that way the frame back sits nice and square.
The mechanics and electronics are now complete. Just the vinyl stencil and coding to do.. call back soon
Let's see if anyone is reading this!! Please comment if you like the way this is going, do you like the style? should I keep going, or stop now..... it's great to get feedback, so please leave a comment...
Step 7: Stencil
The whole project so far has been building up to the moment we shine light through a letter stencil to spell out words with light. So it's time to look at the design and production of the stencil.
Excel first(Other spreadsheets could be used)
I've seen some word clocks with a bare minimum of words \ letters in them. I wanted to add an element of fun with extra phrases and messages. So went for 144, the bare minimum to display time to the 'FIVE' minute intervals is 96. So I have 48 character to play with.
For the first model, I went for the following word set: TIME - FOR - A - COFFEE - TEA - LUNCH - HOME!
These words were well space so the whole clock message flowed.
I used a spreadsheet as it was easier to move letter around before heading to Adobe Illustrator to get the design ready for cutting.
I'd used illustrator to design NixieClock1 and other small items I've made. So know my way around it. I like the fact that you work in exact dimensions and output can be sent to laser cutters, printers etc, safe in the knowledge that the sizes are going t be right.
This stage was critical as I need the centre of each letter aligned to the centre of each LED (top marks if you've remembered they are 16.66mm apart.
This was easy in illustrator to create a 12x12 grid of squares, each 16.66mm wide and high. The choice of font is important as more intricate fonts will be difficult to remove the letters from the vinyl.
Once I was happy with font size and spacing and put a cutting border around it. I saved the file as an EPS file and emailed it through to the printers. Any printers who offer labels and vinyl designs should have cutting capabilities, ask.
I took the glass from the Ribba frame and they applied the stencil straight to the glass.
Putting it together
- Take the empty Ribba frame, add a sheet of 1mm acrylic sheet to the frame.
- Ensure the back of the acrylic and the front of the glass, (now complete with stencil), are dust free.
- Add the glass into the frame - noting which way round the lettering is.
- Add 2 sheets of white frosted window film - available from your local DIY stores - these will diffuse the light.
- Now add your main board \ baffle assembly, again, make sure you have it the right way round for the stencil.
- Attach the back of the frame with the metal clips.
- You're done!!!!
Now the code..............
Step 8: Code
If you've got this far, well done and thank you.
I'm not going to explain every line of code right here. But it is available and it's yours to use and play with. What I will explain, briefly, is how it works:
The principles are quite simple:
- Sets array variables for all of the words - the address of each LED in a given word is stored in an array and each LED lit up.
- Write the time and date to the real Time Clock module (once) this is why the 'settime' statement in void setup is commented out.
- Set up and initialise the library which runs the LEDS.
- Run a small routine which sets brightest dependant on the time of day.
- Run a small routine which reads the time from the Real Time Clock and changes the time if hour or minute buttons are pressed.
- The main routine runs through a series of IF statements and displays the time and activity by checking each statement against the current time - For Example:
- If it's 10:12am - it will display "IT'S ABOUT TEN PAST TEN TIME FOR A COFFEE"
- Colour variables are set, so any work, letter, LED can be lit any colour.
- A series of 'effects' have been programmed to add interest, the sky is the limit on what can be done
I've included my code in this instructable, it's quite well commented, so do have a look.
I do hope you've enjoyed this instructable and please leave a comment, it'd be great t know someone has been inspired to have a go........
Step 9: Post Script - WordClock1
As I completed this instructable earlier in the week, I cast my mind back in time to the first, shameful example of a word clock. I've found some pictures, so just HAD to share. So ladies and Gentlemen, I present WordClock1..... Urghhhhhh.....
mosivers made it!