I've been in a clock making sort of mood recently and I've seen tons of word clocks so I thought it was time to give it a try
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Wordclock_lightbox.SLDPRTLightbox Solidworks filesldprt - 951.50 kB - 05/15/2020 at 19:36 |
|
|
Wordclock_lightbox.STL3D Printable Lightbox STLStandard Tesselated Geometry - 171.18 kB - 05/15/2020 at 19:36 |
|
|
word clock.hexFirmware with configuration words included for programming standalone (Fixed typo "Fourty" to "Forty")- 46.50 kB - 09/23/2019 at 13:42 |
|
|
word clock v1.1.zipMicrochip MPLab Project Files (Including precompiled Hex, Fixed typo "Fourty" to "Forty")application/x-zip-compressed - 28.04 kB - 09/23/2019 at 13:41 |
|
|
wordclock_2019-09-23.zipGerber Files for PCB Manufacture (Fixed typo "Fourty" to "Forty")x-zip-compressed - 495.64 kB - 09/23/2019 at 13:11 |
|
Huge thanks to Makerfabs for helping me turn my word clock into a product. Check out the sales link here: https://www.makerfabs.com/small-word-clock-kit.html
Just a quick but huge update. I'm currently working with a company which manufactures electronics kits to turn this project into a viable product. We are still working kinks out of the manufacturing steps, but expect to have my word clock publicly available for purchase as either diy or fully assembled (yet to be determined along with pricing). So those of you who want to get your hands on this word clock but don't want the hassle of manually making one from scratch are in luck. Don't forget to follow this project as I'll post an update linking to the sales page once they are available.
Quick update, files are uploaded so feel free to make your own or modify to your heart's content. I'll add the 3d printed frame stl/solidworks files shortly, but everything else should be good to go. I originally wanted to make a kit but I just don't see that being possible given my current work load. The only restrictions I have are that any derivatives of my board design or firmware must also be released as open source and the original work be attributed to me (Shawn Maxwell, sjm4306). Other than that have at it!
So to start, here's a quick little demo of the current state of the software I described in the last log.
A main concern when I first started this project was that there would be too much light bleed between nearby letters, thus making the display difficult to read for lack of contrast. To help on the pcb side, I opted for black soldermask, and additionally used the copper layer to try and block as much light as possible, but none of these would help with light scattered internally in the pcb's FR4 material which is a yellowish semi-opaque hue that works pretty well as a diffuser. I've gotten tons of suggestions involving using vias around each letter to try and contain as much light as possible within each letter, but I really liked how clean the top surface looked without having to riddle it with vias.
So the main method I could fall back on was the age old method of using a physical separator between each LED to try and contain as much of the light as possible. Luckily I have a 3D printer and was able to very quickly print out a few test prints to iterate a light box design which also doubles as a stand for the clock, holding it up at a slight angle.
In the end this is how this iteration of the design looks:
Definitely not perfect, but at least for me it is good enough considering the trade-off between inter-LED contrast and cost/simplicity of design (I intend to sell a kit of this project so the less complex the design the better).
This may be a little dry but let's go through how/why I designed the software for the clock in the way I did. Keep in mind I'm definitely not a pro software developer so the way I ended up doing things are very likely not optimized or conventional. With that disclaimer out of the way let's get into it.
For starters I needed a way to autonomously scan the 12x10 led matrix so my main portion of code could talk with the RTC chip, generate animations, etc. To do this I've opted to use an interrupt that triggers at something like 4kHz. Each time the interrupt executes it draws the current column of LEDs (stored as a global array) and then increments the column counter so the next time it can draw the next one until it reaches the last column and starts all over again. So you can see how with this method I can update the display image by writing to the display array (acting as a crude display buffer) while the interrupt worries about how to draw it. Additionally by choosing to skip cycles or not it can even make the display look brighter or dimmer!
One small complication though, in order to make the board easier to wire I ended up assigning all the rows and columns to seemingly random I/O (and not neatly/organized in pin order like I normally would). This means that I cant just do a simple quick port write and update all row/column values correctly. To get around this I created a pin map and associated function that takes the desired row and column states and toggles all the pins correctly despite them being out of order. This function basically ended up being a big switch statement.
Now how is the display actually multiplexed/scanned? Well to start an entire column is lit at once. To do this the vertical strip of LEDs in the column have their anodes driven in the pattern we want them to light up. To actually select the correct column we then set the pin attached to all of the cathodes of the LEDs in that column as an output and pull it low, while at the same time setting every other column pin to an input (high impedance so no current can flow). Simple right? There are tons of examples and schematics that explain it much better than me if you google something like "how a led matrix works".
So from the perspective of the programmer, all you have to do to write to the display is set the pixels stored in a display buffer array and they seemingly magically light up the corresponding LED! Cool, right!
So next step is handling button inputs. Well I just used another interrupt that gets triggered when a button input pin changes states (known as pin change interrupt, a feature the PIC supports on certain pins). When my interrupt sees a button pressed it sets a global flag that any part of my program can read, act on, and then clear to let every other program know that the button press has been serviced.
The reason I used an interrupt for the display scanning was to save me from having to manually do it within my main loop and for an asynchronous button input because sitting there and repeatedly reading a button waiting for it to be pressed is a waste of clock cycles. So interrupts handle both of these tedious tasks and leave the main part of my program enough computational freedom to actually do something interesting like telling the time or displaying neat animations.
So how does it keep track of time then? Well I took the easy road and used a DS1302 serial real time clock chip to do it for me. It can even charge a supercap to keep time for awhile when power is removed. I talk to the RTC over a three wire serial interface that is basically SPI, using a soft serial library I wrote so I can use any GPIO pins I want.
The final thing I had to contend with was adding animation modes. So far it has seven modes: chase, random, twinkle, pong, rain, bouncing ball, and ripple. Chase lights up an LED that runs left to right and top to bottom. Random hypnotically fills the screen with randomly lit pixels. Twinkle randomly turns...
Read more »Huge thanks to JLCPCB (who sponsor my various projects and videos as well as provide the pcbs). $2 for 10 PCBs (in 48hours)!!!: jlcpcb.com/m
So a quick intro to the main design philosophy for this project. I've seen tons of word clocks using everything from ws2812s, off the shelf led arrays, transparency masks, etc and I've always wanted to try my hand and making my own. I am sure I'm not the first person to think this, but after making a few projects with the help of JLCPCB, my youtube sponsor, I wanted to push both what I am comfortable with in terms of pcb design and JLCPCB's manufacture process. Here's an overview video of the first prototype (with the firmware partially working):
Basically I wanted to make a word clock that would be small (akin to a small alarm clock) to sit inconspicuously on my desk, run happily off 5V via USB, and be fairly easy/cheap to make. So to achieve this I've designed the front lettering mask as a pcb that snaps away from the rear pcb that contains all the leds and micro as shown below.
To achieve this placed the letters on the top stop and restrict layers to keep both the soldermask and copper from obstructing the light. On the bottom then all I had to do is do the same in a square shape that overlaps the letter. I expect the light will be diffused pretty well through the FR4. And that is really all I had to do to achieve this sharp looking effect.
Now one worry I have will be how to effectively block light between adjacent letters. Well here's hoping a 3D printed light box/midframe will work to box in each led and limit light bleed ...
So one final note, I wanted accuracy down to the minute, but having separate words for all possible minutes would make the array of letters larger than I wanted so I compromised by having words describe the time down to 5 minute intervals and then adding asterisks at the bottom to come up with the exact time. For example: "It is ten fourty five ***" would mean it is 10:48. Works for me!
In the next update I'll explain the software that runs on the PIC16F887 (and hopefully have it fully working and progress on the 3D printed midframe).
Create an account to leave a comment. Already have an account? Log In.
Thanks, yeah I went with the square opening on the back to let more light through as I was worried that following the outline of the letters would block too much light which I would have to compensate by making each led brighter (which would likely make light bleed worse anyway). I don't have any empirical data on that though, just the method I chose based on my gut.
You have a point there. I might just start with the rectangles and see how it works out. Thanks!
@sjm4306 Hi, like your project and build the hardware according to the files here, v1.1, but the hex file always throws errors and I can't open the project in MPLAB. And I only realised after I built the hardware, that there is a version 1.2, are the files for it available somewhere?
What do the errors specifically say? Also what compiler are you using? I built this project using the HI-TECH C complier in Lite mode (the free version).
@sjm4306 It's impossible to program, the errors are not always the same.
It either says " error: failed to detect connected device. unrecognized device with id 0x3fff" or " Failed to Write PGM Memory block 0x0000. Verification failed!" or "The device draws to much current" or it doesn't even do anything when trying to flash. And the second hex file you posted is to big for the controller (the last part in hex is only FFFs). The old is not, but I compiled it myself with mplab.
Ah so it compiles but there's an physical hardware issue where the pickit programmer cant see the pic microcontroller. Double check soldering of the chip and also the wiring between the icsp header and the pickit programmer.
Hi ,if possible I would like to have instructions to set the time and other functions. And if you can find, for a fee, the box, I do not have a 3D printer. Great kit. Thank you
Just received my kit from makerfabs, and love it, but l still have a couple of comments/questions.
I printed the STL file, but when assembled, the buttons are below the surface of the clock, so I cannot push them.
Are the animations supposed to run continuously, or should they cycle back to the time every X amount of seconds? Are you faced with animation OR clock, or is it supposed to show both? If it isn't supposed to cycle between the clock and the animation, has anyone made that change in code?
Thanks, and great work.
hi all! I got my kit in the mail today from Maker fabs... looks great... just being dense here... instructions on how to assemble and set up?..
hi, david, i have try to reply you via email, but seems your email "
dcvidxxxx@yahoo.com" dot not work?
You do not need to program it, the IC is programmed before shipping.
1. There you got 4 boards, stack them(the LED board bottom, and then the 2 , and the board with A/B/C top), and solder the pins via the THT vias
2. Install a CR1220 battery.
3. Connect the USB to a PC USB port, or any power supply..
or you can contact us by service@makerfabs.com
That is all, you will see the outputs there.
I would really like to build this clock with some adaptations, but the BOM seems not to be working. Also i'm missing the resistor values for R1-10 and which LED-s you used?
I like this small word clock, but i dont know, how i set the time. I tried it with the H and M Buttons, but without success. Could anyone help me with a short explanation??
press and hold both the H and M buttons simultaneously until "IT IS" goes out
H to set the hours M to set minutes (there no going back, only forward)
press them both again to exit out of this mode.
I've enjoyed my little clock, but noticed that lately the display is failing. In the third column, the letter is illuminated anywhere any other letter is turned on within a row. eg ITAIS... in the first row or AMZ ** in the bottom row. I'm guessing a diode failure somewhere. Anyone else?
Great project, love the kits (I ordered two already) and that the LEDs are already soldered. ;-)
I’m now planning to modify it to German (with regional specialties), so here’s a few questions:
1. Would it be okay with you if I shared my modified version on GitHub? (Of course putting links in and quoting you as original author.)
2. I ordered a PicKIT3, that should be ok for reprogramming, right?
3. I assume the header is standard-wired ICSP?
4. Which compiler did you use?
5. Do you think your source could be compiled using SDCC (I only have Linux)?
6. Do you still plan on refining the button code to make it more responsive?
Thanks again for making and sharing this, and of course for taking the time to answer a lot of questions! ;-)
Are the header pins defined anywhere? I'd like to power the clock from a new plug out the back vs from the side.
It's a standard pic icsp header (and the pin numbering is on the rear silkscreen)
I read the source to find out how to set it. This is a very nice “kit” and a real bargain. The not easy to find around here CR1220 cost more than half the cost of the kit!
The challenge will be to make a nice stand/housing for it.
As in CR1220 lithium call? If you are willing to wait you can order them online. They are used in many car keys.
OK, I watched the videos again and found the animation controls. My buttons seem a bit sluggish in that there can be quite a delay when you press them. Not sure if they're making contact. All is well.
The way I programmed the display multiplexing and the polling and display update speed are affected by the brightness setting (I meant to rewrite the way this is handled to eliminate this or at least lessen the effect but haven't gotten around to it).
I received my kit a few days ago. Very nicely done!.
I blackened the inside of the grids with a sharpie before assembly. Not sure if that was really necessary. Assembly was fast and easy. I worked out time setting and brightness controls without too much trouble. Are the animations shown part of the kit programming? I'm not finding any "official" instructions anywhere. Maybe I'm missing something.
Hi, I've got the kit, which is great quality btw. What type of battery does it take? I'm having trouble matching it. I'm assuming the battery is only to retain the time while it's unplugged rather than run the leds?
the onboard battery is only for keeping the RTC.. to make the circuit as sample as possible, the LED needs USB power to RUN...
It super cool clock! I loved it ! Thank you for sharing with us.
I have an idea to blacken the LED's surroundings to reduce the scattering around it. I ordered a 1MM thick PCB to reduce the light transmission inside FR4. If you have time to modify the PCB, I think you can add a MICRO USB interface for power supply . I can't use eagle, so I can't make these changes.
hi,i ordered pcbs,but i don't know the value with R1 to R10,they are 470 or 270 or others?
You can actually just bridge them with solder or a small piece of wire. I added them as an option to dim the display but ended up doing it in software instead by limiting duty to reduce average current.
ok,thank you~ And another problem is precompiled HEX file not in the word clock.zip .
Exporting from MPLab must not copy all files in the project directory. I've manually zipped the directory and re-uploaded.
Files are uploaded so feel free to make your own or modify to your heart's content. I originally wanted to make a kit but I just don't see that being possible given my current work load. The only restrictions I have are that any derivatives of my board design or firmware must also be released as open source and the original work be attributed to me (Shawn Maxwell, sjm4306). Other than that have at it!
Exporting from MPLab must not copy all files in the project directory. I've manually zipped the directory and re-uploaded.
Become a member to follow this project and never miss any updates
Hey, that is a really cool clock, really fascinating. Actually, I immediately started to design a 10cm x 10cm version of my larger word clock I built a decade ago. Using the PCB as the front panel and the diffusor at the same time is pretty genius. The controller board is almost ready to go (STM32 in my case), also the front panel. I have one question though: I saw that you used rectangles to remove the solder mask/copper on the back of the front panel. Is this to allow enough light to pass trough? I was wondering wether it would be feasible to use the letters to reduce light bleed even further, but am unsure whether this would be a good idea. My larger PCB might already help a bit with separating the letters (although the letters are probably larger as well, so maybe not too much of a difference).