![]() ![]() Here's the code with comments to explain how things work. Before I wrote any code, I created these maps to show which register and pin should be lit for each word.ġ:05 IT IS FIVE MINUTES PAST ONE OCLOCK 0-6, 1-0, Nġ:10 IT IS TEN MINUTES PAST ONE OCLOCK 0-2, 0-7, 1-0, Nġ:15 IT IS A QUARTER PAST ONE OCLOCK 0-1, 0-4, 1-0, Nġ:20 IT IS TWENTY MINUTES PAST ONE OCLOCK 0-5, 0-7, 1-0, Nġ:25 IT IS TWENTY FIVE MINUTES PAST ONE OCLOCK 0-5, 0-6, 0-7, 1-0, Nġ:30 IT IS HALF PAST ONE OCLOCK 0-3, 1-0, Nġ:35 IT IS TWENTY FIVE MINUTES TO TWO OCLOCK 0-5, 0-6, 0-7, 1-1, N+1ġ:40 IT IS TWENTY MINUTES TO TWO OCLOCK 0-5, 0-7, 1-1, N+1ġ:45 IT IS A QUARTER TO TWO OCLOCK 0-1, 0-4, 1-1, N+1ġ:50 IT IS TEN MINUTES TO TWO OCLOCK 0-2, 0-7, 1-1, N+1ġ:55 IT IS FIVE MINUTES TO TWO OCLOCK 0-6, 0-7, 1-1, N+1 If you are reading this deep in the article, you are probably wondering about the code used to power the clock. Chances are very few people will run into this same issue. Details about the issue are on the Adafruit forums. The issue was a crossdev toolchain problem with the RTC library and my Gentoo Linux laptop. Their tutorial was also quite helpful.Ī small aside: I ran into trouble getting the breakout to work. Luckily Adafruit sells an Arduino RTC breakout board based on the popular DS1307 IC. Instead I opted to add a battery backup RTC (Real Time Clock) to the device. And, it didn't seem like a great option to build a bunch of controls to set the time each time it's powered up. Again, this was time consuming as there were many connections to make.Ī clock is only good if it can tell accurate time. The Arduino ShiftOut tutorial was quite helpful here.Īfter everything was working well, I soldered it up on some perf board. ![]() Theoretically you could have infinite pins under your control.īefore I soldered things up, I created a small prototype to ensure I was able to properly control each LED group. The nice part of the 74HC595, is that they can be chained together. So, from three pins we can control up to 24 output states. In our case, we will use 3 pins from the Arduino to drive three 8-bit 74HC595 shift registers. If you don't know what a shift register is, it's basically a memory buffer that can be used to control a larger set of outputs from a smaller set. With the need to drive lights for 23 words, we will need to use shift registers, as the Arduino UNO doesn't have 23 pin outs. Since the shadow box that would be my final mount had a lot of room, I kept the positive lead on the LEDs sticking straight up. For ground, I used a strip of bare wire along each row. It's a good idea to label each group so you won't make any mistakes while soldering. In retrospect, I wonder if using some LED strips would have looked good enough. I went with individual LEDs for each letter, to ensure an even amount of light would be illuminated behind each letter. Each word was soldered up in parallel, and connected to a pin on a shift register (more on that later). This was also a time consuming process, mainly due to soldering a resistor to each of the 99 LEDs. Be sure to save the middle cutouts for any letters that have one, so they can be glued back in during the final assembly. This was a time consuming endeavor, to say the least. I used an x-acto knife to cut out each letter. I also printed the stencil in reverse and used some rubber cement to temporarily glue the stencil to a thick piece of black oak tag paper, which will make the clock face. I then drilled holes into the center of each letter that will hold an LED for each letter. I created this SVG to guide my stencil, printed it, and glued it to some thick cardboard. If you go with a fixed-width font, you would need to remove the A and all the spaces. Since I decided on a proportional font, I had room for the extra word/letter A in the first row. I went with a layout like this, that has 23 words: ![]() I started to create the clock face by planning out the word placement. Diy word clock driver#The general steps are: 1) Create the clock face, 2) Wire the lights, 3) Build the driver for the lights, 4) Add the clock, and 5) Final assembly. I encourage you to do the same sometimes it's easier to do things the way you want to do them and look to others for inspiration, than follow instructions to the last detail. I decided to build one as a Christmas present for my dad.Īlthough I read a few different designs on the web, I decided to take my own path and design my own. The reported time accuracy is within 5 minutes, which is good enough for a general clock / interesting piece of art. So instead of 10:30pm, it would say, it is half past ten. If you aren't familiar with the term, it's basically a clock that tells you the time as a sentence instead of with digits. A few months ago I came across an interesting project, an Arduino Word Clock. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |