Instructables
Picture of Rainbow Ring Wall Clock
IMG_4480.jpg

I don't know what it is about clocks and watches, but it seems that every second projects is one form of the two. This project follows along in the footsteps too. I have made smaller clocks before, but nothing of the scale of a typical wall clock. This is due mainly to the high price of fabricating one off large PCBs.

I wanted to create something large, not too big. I also wanted to keep the cost down. I managed to solve these problems by making various design choices, which will be covered in detail in the following steps.

I got some initial inspiration from adafruits 12 pixel neopixel ring, and now I notice that they sell a 60 pixel version which wasn't available back when I designed this, but comes as 4 segments to create a full ring. This would be an easy way to create a similar clock, without the need for making PCBs and soldering LEDs and small SMD parts.


I showed my design off over at the 43oh forums at the first prototype, the users there are great. They offered hints and design advice, aswell as helping source cheaper LEDs and PCBs, by buying in bulk via a group buy. If you have a projects that you are working on you should think about taking the time to display it somewhere online. Another great reason, since writing is a creative process, it can definitely help you process ideas and thoughts if you ever get stuck on a project.

Please note, I am writing this more as a project log rather than a tutorial, Basically because I will only make one of these following the steps outlined here exactly, and I know that if I make it again it will be different, and different again after that. Files for the PCBs and BOMs will be provided at the end, I would encourage you to get the PCBs fabricated and solder up a ring if you think you are up for it, I'd love to see your own artistic spin on it. :D

 
Remove these adsRemove these ads by Signing Up

Step 1: PCBs

Picture of PCBs
IMG_0043.jpg
IMG_0039.jpg
IMG_0207.jpg

The design idea was to create a ring, since a few of the cheap PCB manufactures will send you 5 or 10 pieces of your single design, I figured it would be pointless to buy a 20cmx20cm PCB, and then waste 80% of it. Prototyping with boards that large is much more expensive than small 5cm squared boards. Not to mention that I would have paid for 5 pieces, and would only be using 1.

The solution was to create a small arched segment, that would be identical, and could be daisy-chained together. Initial designs involved a data/clock/latch/power data connection between boards. each board would then need a serial shift register and some driving electronics to drive the LEDs, this solution would work perfectly fine, except it would only provide a binary output to the LEDs. I wanted more than colours.

Moving on to another thought, LED drivers. This would have basically been a similar electronics setup to the equinox clock. Which I actually took some inspiration from. This would have used up alot of space on the PCBs and would have actually increased the total cost quite a lot.

Step 2: LEDs

The magic sauce of this project is the LEDs, they are part number WS2812b.

What's so special about them?

at first glance they may look similar to any 5050 sized RGB LED, except that they only have 4 pins.

Looking a little closer, you can notice a small controller inside the die itself.

This controller, drives the 3 colour channels via PWM, it is programmed via a single wire time based protocol.

These LEDs are now very popular in LED strips, 3 lines enable complete 24bit colour control of a theoretically unlimited number of LEDs. Because they only need power and a single data pin, the PCB design becomes very simple. Infact most of the PCB is a filled power plane, that is used to help dissipate any heat generated. The fact that the back of the PCB is bare is very useful for the next step.

One thing to note about these LEDs, they are very smart. 24 bit colour control, internal current limiting, buffering and reshaping of signal, daisy-chainable. But they are not smart enough to display a clock face, or even to light up the colour that you want them to be without some kind of controller that is speaking a language they understand.

A quick search for "WS2812 code" will probably turn up results for your favorite platform. Ideally I would use an AVR, then it could be made arduino compatible, and I could use the arduino buzz-word through out my arduino compatible project summary. Arduino's are great, and would infact work perfectly to drive 120 of these LEDs, but I did not use an AVR for this project.

Step 3: Controller

I mentioned in the last step I did not use an AVR, this means that this project is not arduino compatible. There are a few reasons because of this:

  • I've been experimenting with TI's MSP430 line for awhile now.
  • They have a "capTouch" feature which enables zero component capacitive sensors.
  • I had already developed code to talk to the LEDs on the MSP430 hardware.
  • I was looking at my TI89 when I was first thinking about this project.
  • I already had all the development tools installed on my computer.
  • I've done more research on the hardware architecture.
  • The MSP430 G series is relatively new, and I like the bleeding edge.

Anyway, enough swable. These LEDs needed a master, someone to tell them what to do and when. I chose the MSP430G2553, for it's decent program memory/ram (8kb/512b), it's 28 pin count, and it's relatively small and easy to solder TSSOP form factor.

Almost all the pins are used, I wanted to make this controller a bit more special. So a 12 point touch slider has been fabricated into the edge of the board. It was envisioned that this would act somewhat like a 1d touchpad, as input into the device. like a computer mouse scroll wheel, before they added a middle button, and prev/next switches if you pushed the wheel.

3 other pins are used to interface to a I2C accelerometer, because why not? another pair of pins connects to a 32khz watch crystal for adequate time keeping, this is a clock after all. finally a single pin is used to interface to all 120 LED pixels.

The whole controller fits onto the back of one of the segment, with no disturbance of the LEDs above it, meaning from the front, the only difference between the two segments is a small amount extra traces between the LEDs, and a tiny programming connection, the mounting hole, and daisy connections are identical.

The videos show off the capacitive touch pads embedded in the controller, and a quick demo of the accelerometer.

Step 4: Case options

At this point I have a very nice looking ring, it is covered in bright, colorful, pretty, RGB LEDS. but it still has wires running off to power it, and it's still very fragile.

I never like packing my projects into black plastic ABS boxes, I actually prefer to see the PCB, but that's not wise for something that you want to keep working for a long time. I had a crazy idea to encase the whole ring in clear resin. There were a few problems with this, I had NEVER touched casting resin before. So I went to my local hardware, bought a tin of clear resin, and experimented.

I can't remember where or when, but I recalled that Vaseline can be used to stop resin sticking to surfaces. I still don't know if this is true, but I used it anyway.

This is how the experiment played out (following along with the pictures)

  1. Cut out some wood segments, coat in a thin layer of vasoline
  2. Clamp up the wood to create a cube mold, my final ring would have a cross section about this size.
  3. Get resin supplies, read instructions, twice.
  4. Put on gloves, resin is nasty stuff so go outside.
  5. Mix up according to instructions.
  6. Pour into mold, for this test I suspended a single WS2812 led inside. (notice my mold leaked. u_u)
  7. after 24 hours of curing, I extracted my completed cube.
  8. After some light sanding and polishing.

I identified a few improvements I could do. One was buy more finer grit sand paper, for polishing. Another was make sure that your mold is leak proof. the leaked puddle actually created a chip in the main cubes corner, because it required a bit of force to remove.

Step 5: Making a mold

Another issue with casting the entire project in resin is that I had no idea how to make a circular mold.

I know this would be achieved easily with a CNC mill ( maybe even a laser cutter ;) ). All I wanted was a circular channel in a piece of wood. I didn't want to spend too much money and I wanted to make use of tool I had already invested money into.

Searching router circle shows some simple guides that do exactly this. I decided to do mine just a little differently. I created my jig slightly different, in my setup the router stays in the one place, and my workpiece is rotated

Notice how everything is marked, I tried to be as symmetric as I could when cutting my mounting holes, but they aren't symmetric, so the mold needs to be put back the same orientation for a perfect circle. It is also a very good practice to label and date everything. If you ever need to use it again, you know you're using the right one, and not the one you found was too big, defective, etc.

Overall I spent less than $10 on screws and MDF to make this mold. Money well spent.

Step 6: Setting the Ring

Picture of Setting the Ring
IMG_4227.jpg
IMG_4233.jpg
IMG_4223.jpg
IMG_4235.jpg
IMG_4247.jpg

So now that the mold is made, I need to do a few things to the PCB itself first. Since I can't just take it out of the resin once it's gone in, I need a method for talking to the micro controller. I was thinking a few different ideas, wireless, IR, inductive coils. Then one of my friends slapped me and told me KISS, "Keep It Simple Stupid"

Since I already have a small debug connector (4 pins), I decided to stay with that, I just needed to solder on a connector that will end up flush against the edge of the resin. This has to be sealed, so that resin won't fill the pins, this small one is already sealed from the rear, so all I needed to do was place a carefully cut label over the connector holes.

Secondly the ring needs power, so again I went for simplicity and used 2 threaded solder in standoffs in the board. these will carry the 5 volts and ground to power the ring.

These 3 extrusions from the board are evenly spaced as to provide a stable raised support. I wanted to have the LEDs facing upwards in the mold because I feared that more bubbles would be lodged under them than the bare rear PCB. Now its time to pour the resin.

Pouring a layer of resin just over half the height, then placing the ring in and slowly twisting it while pushing down will reduce the bubbles trapped underneath. Another layer is poured over the top of the LEDs slowly, ensuring no excess bubbles are formed, bubbles in the resin will float to the top and pop with time. Once the resin is poured a needle can be used to poke at the PCB and ensure it is centered in the mold.

One thing I noticed at this point was that the mold was closer to a perfect circle than the ring was :/

Leave this for 24 hours to set.

Step 7: Problems arise

After 24 hours I went to check on the mold. It was still very much a liquid and had not hardened at all.

The trial run with the resin cube had been left outside all night just like this one, but that had been a few weeks before I'd made the mold and it was a much warmer night.

It had been a very cold night, and I had left the mold in the shed to cure. I promptly moved the entire mold out into the sun, I must have knocked it because I came to check on it after an hour and the resin had started to pour out the two corners I had left without bolts. Everything was going wrong, I promptly added the two bolts that I had left off thinking that 2 would be enough. I tilted the mold a bit too much adding the second bolt, resin pored up over the edge and down one side of my mold. I am grateful that I didn't discard the excess resin that I had mixed up. I hastily pored the excess resin into the mold, replacing what was now all over my work bench.

To speed up the curing process a halogen lamp was used to warm up the resin.

If you're repeating this you will need to experiment with you own brand of resin.

Step 8: Removing the mold

Initially I had hoped that I could just kind of pop the ring out of the mold. but with the leaking and long setting time, I began to doubt it would be so easy. The resin had probably seeped into the wood grain by now, I'm using MDF sheets for the mold, so that's a likely outcome.

Using the jig I had designed for routing out circles. I marked where the edge of the ring was. Found appropriate distances to route at. Then I checked these back with the ring. Making a mistake here could result in LEDs being routed in half and a very non-functional timepiece.

I decided it would be a good idea to remove the bottom half of the mold. The tracing paper I used between layers worked very well to keep the resin from the wood. But wasn't exactly flush with the bottom wood layer, so the surface wasn't flat as I had hoped. Ohh and there was an air bubble.

I poked at the surface and noticed that it hadn't fully set yet. perfect. Using an exacto knife the resin was cut out above the bubble. I mixed up a small batch of resin, this time making sure to use plenty of the catalyst. I filled the hole, and traveled around the ring covering the whole back with an extra 2mm. My plan was to sand this down back to a perfectly flat surface.

I used the router to try to get the surface flat, this is called facing off a surface I believe. Unfortunately the jig I was using for the circles wasn't very good at keeping the working material a fixed distance from the router, so I resorted to my coarsest sand paper, P160. I'm using wet and dry sand paper, with water. this is recommended for resin ans the particles clog up the sand paper otherwise. Be prepared to use alot of elbow grease if you are repeating this.

My suspicions were correct when I started milling around the ring. The wood had a darker patch an extra 1-2mm around the circumference. So it is essential to mill out the ring from the wood. Milling was done is small increments, around 3mm of depth each pass.

Once free from the resin mold you'll be faced with hours of arm falling off sanding. If you have some kind of sanding machine this might be easier, but using your hands gives you complete control. I started with the 160 grade wet/dry sandpaper.

Once I had gotten rid of all the impurities I could. I moved down a grade, 240. I sanded away, this grade would be used to remove the scratches left by the 160, But it also leaves smaller scratches behind. Moving down in grades creates smaller and smaller scratches on the surface of your material. Once you're down at 1600, you should have a very smooth ring. but it wont be clear. It's your choice now whether to move on to polishing and buffing. Which will remove the last tiny scratches left by the sanding process. I decided to leave it unpolished.

When sanding I decided I would like rounded edges, so I sanded heavily around the edges with 160 grade paper. This actually gives the illusion that the board is wider than it really is, since the resin acts like a lens and it almost warps the LEDs around the edges a little.

Step 9: Let the programming begin

Before I had even thought about the casing I was programming the ring. But since I started working on the casing I had left the programming side to the end, that is why I had to include a programming socket. Can you imagine if there was a bug in my code and I had no way to fix it!!

Here is where another problem showed itself. A broken LED!! I had written a small test program that would show a pattern on the LEDs when power was applied, this pattern would cycle though colours to tell me that everything was working as intended. However I was only testing every second LED on the outer ring. Once I had programed to use the inner ring I discovered that only the first half worked, the second half wouldn't display anything. Strange enough, if the LEDs were powered from 3.6volts instead of 5, data would pass through this LED, but it still didn't display anything. However the colours given off by the LEDs are much better at 5v. so I decided to cut my losses and just use 60 LEDs of my ring.

This is actually a blessing in disguise, because I had only done a quick calculation in the back of my head while selection the brains of this clock. The chosen MCU the MSP430G2553 only has 512bytes of RAM. Yes, bytes. I had programmed a buffer to store all the LED values, they would then be transmitted in one quick burst to all the LEDs, this buffer takes up 360 bytes of our precious resource, that's a little over 70% of the RAM gone right there.

As it turns out, one of the coolest features of this clock is a capacitive touch sensor arrangement that I embedded into the edge of the PCB, Honestly I didn't even know if it would work, I've never made capacitive sensors that way before. But they did work, and work well. TI, the manufacture of the MSP430 microcontroller line, create an API for reading capacitive sensors, the capacitive touch software library. It is fantastic, however because of all the work it has to do, it uses alot of RAM. The 12 elements I needed to measure use 48 bytes, to store current measure values and a baseline value. then calling the function consumes space on the stack, I debugged some library calls, and found about 30-40 bytes was used.

If you are unfamiliar with computer memory layout, and you are interested in it, I suggest you look that up. Put bluntly when the STACK enters into the HEAP is known as a stack overflow. It was happening to me, I kept getting strange unpredictable results, because two parts of my code were accessing the same location in memory, overriding each others information. Without needing to buffer the middle ring I had freed up more than enough RAM for my code.

Step 10: Coding creativity

IMG_4568.jpg
IMG_0287.jpg

Unfortunately I don't seem to be very creative when it comes to programming. I am when it comes to creating physical things, I mean I designed and created a beautiful ring covered in LEDs, however with coding I can only ever seem to be practical.

This is the code right now.

  • The time is displayed by a single yellow pixel for seconds, a single green pixel for minutes and a block of 3 purple pixels for hours.
  • Touch and holding the sensitive edge enters set mode,
    • Sliding up and down increments or decrements the current item. (initially seconds)
    • Tapping on the sensitive edge moves to the next item (seconds > minutes > hours)
    • Once all the items have been set the clock returns to showing the time

This is basically the bare minimum of what a clock should be able to do. But with the setback of the inner ring not working, and all the issues I had with the resin I am more than overwhelmed to say that this project is finished.

Step 11: Mounting and power

Picture of Mounting and power
IMG_4590.jpg
IMG_4595.jpg
IMG_4584.jpg
IMG_4619.jpg
IMG_4617.jpg

Obvious you'd want to show off your work at this point. But this is an electronic device, and it won't run without power. How will you power it? and how will it be mounted? on a wall? a small base?

I decided to mount it facing the wall, so the LEDs will be reflected off the wall. I hope this will give a softer glow from the ring. For power I am using very thin, 0.5mm magnet wire, or enamel wire. If the LED used too much power, wires this thin wouldn't be able to carry the required current. However with only a few segments lit the clock doesn't consume much power at all. The positive is that these wires are almost too thin to see.

Because the wires are enamel coated you will need to tin the ends of them with your soldering iron before use. I used a small proprietary 5 volt phone charger to power the clock, I removed the plug from the end and soldered on some wires. Be sure to heatshrink over exposed wires.

I used some textbooks to hold up the ring at the correct height when fixing the thin enamel power wires, finally textbooks have a use (I am kidding of course). The ring wasn't steady enough with just the wires holding it, and I was worried about potential breakage down the line, so I used some small double sided adhesive squares, These are made by scotch and won't rip of your paint when you remove them.

Step 12: Conclusion

Picture of Conclusion
IMG_0296.jpg

I stated at the beginning that this would not be a step by step guide. That is because I don't want people to create what I created. Half of it isn't functioning, I'm pretty sure I'll never remove the resin smell from my shed, the back of the ring has a tonne of tiny cracks and imperfections in it, lastly the microcontroller board is wildly underpowered for creating smooth graphics on this beautiful LED ring.

But that being said, I would like people to create more LED clocks. But I don't think they should create something identical to this. I am glad there were things that failed, because you learn more when things go wrong.

Step 13: Downloads

Picture of Downloads
IMG_0207.jpg

This project is licensed under OSHW, I even put the little gear on my boards.

Here are design files for the PCB (gerbers and altium format)

Sorry I can not provide these in another format. That's just the software I used to make these boards, I used my university license. If you want to try it out, and you're a student. check if your school has it.

Please note, these files are as-is. They are exactly what I used to create this LED ring, and they may contain bugs.

The code is also provided as-is. It is written in C. There is lots of testing code. more than 50% of the code I've written isn't being used currently. But I have provided it here, if you wish to comb through it :)

somnath19743 months ago

it is very nice project.

Can I buy a kit ?

SOM NATH ROY

JohannesTN4 months ago

Are you planning on selling this as a kit or something? - very nice work!

16511015015 months ago

我喜欢

16511015015 months ago

The circuit principle diagram can give me?

starphire5 months ago

Very nice project. I noticed your other youtube video regarding some 'damaged' WS2811 devices in a finished clock. I'm curious about that - what leads you to believe it isn't just a manufacturing defect that suffered from early failure? I do love the cost and form factor of these devices, but the fact that it's a near-ripoff of a high-quality (and cost) part and there doesn't seem to be any corporate accountability, brand recognition, or useful warranty from the available sources scares me from using them in my projects. Especially in projects where repair of failed parts would be difficult or impossible after completion!

Greeegification (author)  starphire5 months ago

You do make a good point. I have in the past found bad LEDs in bulk packs I've bought from China. However in those cases the LEDs were DOA or did not perform as well as the good LEDs from day 1. Since I know that every LED on this ring was working before I covered them in resin that leads me to believe that this is not the case. A more likely scenario is that a lead of the LED wasn't soldered and that the resin managed to separate it from the PCB.

Quality control is actually quite decent. I don't think you should let that get in the way of creating an amazing project with these LEDs.

Possible, but actually it's entirely possible for a working component like this to fail early due to poor quality control at the factory. The hairlike bond wires between chips and leads are especially weak sometimes, since they aren't even soldered. Or a bubble in the encapsulant, plus some thermal stress after using it for a while, is enough to do it. I used to deal with defects of all kinds for a major mfr. of LED product - which is why they never shipped anything without burning it in for at least 24 hours. That costs money, and is something a company that doesn't need to defend its brand reputation in consumers' eyes just doesn't bother with.

Also, I've seen enough point failures in cheap LED strips after some weeks/months of operation that it's quite clear to me that they simply aren't made to the same standards that some higher-priced products have for quality control. Not so much an issue if one is just making a cool thing for their own enjoyment, as with this community. But more and more I see folks building these into things for resale, and that's what really concerns me.

So that's why I asked you why you thought it was your fault and not an early failure. I guess if it last worked immediately before being covered in resin and you can't see if it's really soldered or not then you may have identified the problem correctly in this case.

One trick, which may not work if you got resin between connections but can help with 'bad' solder joints in hard-to-reach places - try using a heat gun on the back side of the PCB, if the front side is inaccessible.
Paulbacca5 months ago

Looks great but I think it would benefit from having a nice case to enlose it. It also might look better facing forward no?

robomaniac5 months ago

Very nice project. Nice pictures, nice instructables. I like it. The capacitive on the edge of the PCB is a good idea.

Dr. dB5 months ago

Would vibration "drive out" the bubbles from underneath, or is the resin too viscous?

Greeegification (author)  Dr. dB5 months ago

That might work, resin is quite thick. But as it is hardening it does tend to drive the bubbles out. If I was more careful in placing the ring, I think the bubbles could have been avoided.

qewt5 months ago

Cool clock! I love the 'make it up as you go' approach to the project. (It's how I usually work too :p)

I have no idea if you can cast resin in plaster? If so you could cast a 3D print or any other model of your ring in plaster.
It would make the ring part repeatable even if you have to destroy the mold to get the ring out, as you stil have the master to make a new mold.

Dr. dB qewt5 months ago

Maybe coating it with the same kind of sanding sealer or varnish suggested by @switch62, below, for the MDF mold? Although, I suppose plaster could soak up as many coats (or more?) as the wood, and its surface might disintegrate under the wrong kind of "chemical assault"...

Anyone know for sure?

Greeegification (author)  Dr. dB5 months ago

I didn't mind if the mold was a one time use deal. But if more were to be made then of course a new solution would have to be made.

I believe that silicon is used for molds like this, where the formed object is hard. That was you can just peel away the mold.

fixfireleo5 months ago

neat! but i'd never know what time it is. i was raised on digital clocks and i always have to look at a clock that does have numbers and think, "now if the big hand went to 12, that would make the little hand..."

Greeegification (author)  fixfireleo5 months ago

I was raised with analog clocks. But I know what you mean, I was like that with 24 hours time for so long. I had to think about taking 12 from anytime in the afternoon.

Dr. dB5 months ago

Absolutely gorgeous!

Here's a thought: Looks like it wouldn't take much in the way of laser-cutting, vacuum-molding and/or 3D printing to add a "Stargate" escutcheon...

alcurb5 months ago

Two words: "Very Clever" "KIT!!!!" (okay... those were 3 words)

Spydamonky5 months ago

Beautiful, I love the use of capacitive touch. It looks like it works very well!

bommerbob5 months ago

It looks great!

I am definitely going to build myself one using the NeoPixel ring, thank you for the great idea and the inspiration.

Unfortunately, the ring is out of stock so I wrote myself one in Processing while I wait for more stock. (I can send the code to whomever wants it.)

ochâtelain5 months ago

great! How many hours did you need?

Greeegification (author)  ochâtelain5 months ago

I'm not entirely sure. I probably spent about half the time planning/thinking and the other half actually doing stuff. I also never sat down and worked on it continuously for long periods. To put a number on it, probably around 40-80 hours over a two months or so.

VirtualG5 months ago

fantastic and detailed documentation and the result is great. Thank you for sharing.

Costarus5 months ago

Titanic work... hats Off...

switch625 months ago

Great project, great clock. I love that you designed it all yourself.

I bet you were very nervous trying to get the ring out of the mould, been there ...

... word of advice for next time you make a mould with MDF. Use several coats (3-4) of sanding sealer or varnish. MDF is like a sponge, especially on the edges and where it has been cut. The sanding sealer will stop the MDF from absorbing the resin and give a smoother surface on the casting. You can get a spray on mould release that works better than Vaseline. To stop leaks between the layers of the mould you could use a thin layer of moulding clay (has oil/wax added, won't go hard). When you clamp the mould together it will squeeze out and you can remove the excess with a craft knife.

Greeegification (author)  switch625 months ago

Thanks, I could have actually done more research on resin casting. That is very valuable information. I didn't put alot of effort into sealing the wood because I knew I could use the router to remove the ring.

Next time I do some casting, I'll invest in some sanding sealer. Would save alot of time, and the results would probably be better.

andrea biffi5 months ago

super fantastic!

fred275 months ago

Very nice work!

lindarose925 months ago

Wow, what a great job! I love it!

Greenman25 months ago
Cool! I have always wanted to make something like that!

Wow... that is very cool :)