Introduction: Mini Dotclock

Picture of Mini Dotclock

An array of LEDs randomly changes patterns every 10 seconds or so. To read the time, simply count the number of dots per digit. The main pic shows the time, 22:11. Different colours are assigned to different digits, red-10hours, amber-hours, green-10minutes, blue-minutes. Using 3mm superbrights means the clock can be read daytime or night (though it'd be washed out in full sunlight).
Having a random pattern is a lot less distracting than having numeric digits staring at you...this would also be a great project for adding to the front or size panels of a PC mod.

Step 1: Overview

Picture of Overview

This project was inspired from the TixClock device I saw being advertised at ThinkGeek. That was a little large for my application, I wanted a clock above my DVD because it didn't display the time when playing a DVD.
The design is based around the case, a low profile 'display' case from Jaycar Electronics (www.jaycar.com.au) catalog number HB6083. If you want to put this clock in another case, you'll have to modify the PCB layout.
A zip file with sourcecode, pcb files in EagleCad format and some pics is included in the project.

Some tracks are a bit narrow and have very little clearance. I built this using press-n-peel film, so it can be done....just take a little care not to smudge things and carefully check the result, scratching out any blurred tracks that might be touching another.

The PCB is designed for two layers, however I constructed this on a single sided board to save effort. There are only a few tracks on top, and these can be dealt with by using hookup wire. Note the picture is a little different from the PCB design in the zip file. The changes were connecting the enable pins of the 74hc154 chips directly to ground and an extra diode to step down the voltage across the supercap to make it closer to the 3.3V required by the RTC chip.

Some handy hints when doing double sided board using single layers is to:
- do as much trackwork on the bottom side as possible
- when laying a track on top, always take it to a via, rather than connecting the top layer track directly to a component.
- when using press-n-peel, print out the silkscreen (in reverse) and iron this to the PCB after drilling and etching. This not only gives you component placement, but if you print the top tracks out as well it is an easy guide for hookup wire. Note the black lines in the PCB below....these would be where the top layer tracks would be.

Step 2: Front Panel Design

Picture of Front Panel Design

A handy trick for cool looking front panels aligning with your PCB layouts is to print an image of your silkscreen, then edit out any non front panel items. In this case I have kept only the LEDs. The image was edited in a photo editor and text added. Using a photoprinter you can get colourful designs (although the colour scheme is a bit minimal in this). The LED holes were cut out with a sharp knife and some tracing paper added to the back to diffuse the light a bit.
My little photo printer created prints a little too narrow to fit the entire case, so a little strip was added to fill it out. It looks OK in this case because the front panel is so minimal.

Step 3: Control Switches

Picture of Control Switches

You need to be able to set the time. I used three microswitches I salvaged from an old stereo, mounted them to a bit of veroboard (or stripboard) and gummed the switch assembly using hot glue to the case.
The first switch selects the time set mode, the second selects the digit and the third increments the digit. After changing the time select the first switch again and the clock will run.
The ribbon cable from the switch has 5 lines, vcc/gnd and the three switch inputs. Each switch is momentary closed. On size connects to ground, the other to the switch input line and a resistor pullup to vcc. In other words the inputs are normally high, then pulled low to activate. See the schematic for details on the wiring.

On thing that was useful in using veroboard was that the board itself because the drilling template for the switch holes. Small holes were drilled in exactly the right positions, then squared out with a file. It made a nice fit.

Step 4: Final Assembly

Picture of Final Assembly

The PCB was designed specifically for this case, so simply slid over the mounting posts. Because space was very tight, the switch assembly was soldered directly to the PCB and a piezo buzzer hot glued to a chip. If you want a louder piezo you'll have to add a driver as this is driven directly from the microcontroller. You really do need to glue or fix the piezo to something in oder to increase the volume.
The power supply lead was tied around the bottom mounting post as a strain relief. I've just pocked it out the mounting holes, but you can use a proper grommet if necessary.
That's about it really, the device is powered from a 9V plugpack and sits above my dvd player merrily changing patterns.

Step 5: About the Firmware and Supercap Backup

This firmware was designed with the Sourceboost compiler and uses the Sourceboost I2C library to talk to the RTC chip. I had to modify the i2c driver to use longer delays in order to get reliable operation.
The firmware initialises io, then reads the every ten seconds or so (you can modify this in the code if you want a quicker update or random update times. I found this period to be the least distracting). If keypresses are detected then it goes into the clock time change routine until exited with a press of switch one.

Also in the design is a space for a supercap. I haven't tested this, but installing one should allow the clock to handle power outages for a short period of time.

In the firmware once the RTC data is read, a routine takes the digit values and assigns a random selection of active LEDs to that digit, the same number as the digit value. These are kept in a table. An interrupt routine takes one value out of the table at a time and sends them to the LED driver chips, and an LED is lit (actually two, one per chip). Next entry to the routine gets another and so on. When run fast enough the LEDs active in the table all appear to be lit at the same time. You can change the timing of the interrupt routine to make it faster if you like.

Have fun, and if you build one of these into something cool...send me a picture.
Philip Pulle
www.rgbsunset.com

Comments

binnie (author)2007-01-27

i just lost all i wrote uhhhhhh i had an idea for you to make a diffuser. i made the linux leech that i found on here, and i was going to use a cd cover for a case. i cut it to size using a utility blade and a piece of wood and a hammer ( score the plastic reeealy deep, place the score line on the end of a table and place the wood over the top of the line then smash the open bit with the hammer and it should brake clean off) i was sanding down the rough edges with some wet rub ( in the kitchen sink ) and i scratched the top of it a little accidently i didnt realise this till i finished. when i dryed it i saw what i had done ( there was a square line all along the edge ) i thought it looked cool and knowing how it was going to be treated ( like everything else i own ) it was going to get scratched one day, one big scratch dosent look very nice so decided to just keep scratching it, little fine scratches look way better than big ones ( i just dont recomend it for psp or phone screens and ipods have the same problem ) i did both sides and took it out of the water. it was looking like some frosted glass. i thought it was so good i left you a picture lol it makes the leds inside the hub shine allthe way around the outside, like a big ring. if you make a v2 of this i would say cd covers are the way to go for the diifuser instead of baking paper

rgbphil (author)2006-04-23

nice watch....this would be about the same complexity (not counting the mechanical trickyness of making it so small). You've got some sort of timekeeper...perhaps you could save money by not using an RTC and just clock the microcontroller directly off the watch crystal (pics can have two crystal oscillators or a seconday oscillator...look at pic datasheets for oscillators that connect to the timers).....Also the same sort of thing would be needed for the display, unless you have lots of i/o pins on the micro, you'd need a expander of some sort or a multiplexed display arrangement of the leds.

ian (author)rgbphil2006-04-25

"perhaps you could save money by not using an RTC and just clock the microcontroller directly off the watch crystal (pics can have two crystal oscillators or a seconday oscillator...look at pic datasheets for oscillators that connect to the timers)." I just started thinking about that today for my nixie watch. I need to look at the datasheet, but I recall that the timer can increment while the pic is asleep, then wake the pic on interrupt. That would be a HUGE power saver. Just sleep the pic between interrupts.

ian (author)ian2006-04-25

the 16F684 has this on timer1

rgbphil (author)ian2006-04-25

It'd be great to see your results if you went this way. I went the RTC route because I was not getting accurate enough results on the main microcontroller oscillator with a 20Mhz crystal...maybe a lower frequency crystal is more accurate? In the code you see the display update routine being called from a timer interrupt, this isn't necessary and it can be just updated from a main loop, freeing up timer1 for timekeeping functions.

ian (author)rgbphil2006-04-26

Picture

rgbphil (author)ian2006-04-29

Here goes an attempt at posting a cool little anim of my proposed dotclock. Had to edit the POV file to get the SMD LEDs to rotate right. Ive uploaded the eaglecad project file for this in my library....don't know how to make it appear here. However if you email me I'll post it over.

ian (author)rgbphil2006-04-30

are they 0604 size? looks cool. I read the data sheet and realized the LCD driver wont work with LED because of its funny waveform. I thought I might be able to use a transistor on the common lines to make a DC system out of the AC waveform, but, sadly no.

rgbphil (author)ian2006-04-30

The LEDs are actually 1206......I've had another pass at the design after downloading a few clock designs from Microchip,.....looks like putting a 32.768 kHz XTAL on the timer pins is OK...just need to pick the right load caps. I've re-done it with a more efficient 6 line charlieplex configuration (instead of 8), but haven't got around to routing this new cct. On the rear I I have pads for switch connections and the mcu....not too sure to do with the battery yet. I'm thinking two 3V coin batteries. Incidentally...did the gif animation work out OK...you may need to go to the image page and download the full size pic original.

ian (author)rgbphil2006-05-03

I downloaded the GIF and it displayed right. Cool animation. Do you hand solder SSOP? I'm doing my first surface mount (SOT-23 and SO-28) soldering on this project. I'd like to do SSOP, but the pads seem to be less than 16mils. I think I need to make a few boards at 16 mils first before I try something even smaller.

rgbphil (author)ian2006-05-04

Yep...it's quite possible to do 16mil stuff, even dbl sided....although this'll be my first completly 16mil board....and using the iron/on transfer technique. Just need to be careful and check the board before/after etching. I just finished laying out the improved version based on the microchip app notes...biggest problem will be programming the thing, I don't have an ICSP programmer yet, unless I make an adaptor of sorts for my existing programmer.

ian (author)rgbphil2006-05-05

This is the orig. PCB, I dont think I can attach my eagle files here.

ian (author)ian2006-05-05

instructables at whereisian dot com if you would like the files. Cheers

ian (author)ian2006-05-05

Oh, yeah. I put together an instructable for this watch, but didn't publish it yet. I don't know if you can view it if I give you the link, but here it is:
https://www.instructables.com/ex/i/2806EBB22B071029BC6B001143E7E506/

I'm waiting on the PIC, but my PCB and firmware are done. It is a 4X3 matrix, not so big for the first try. It really can be worn as a (large) watch. Pocket watch is a better discription. The matrix wasn't quite big enough to make a complete font set for menu options, so text scrolls top-to-bottom. This still leaves out some wide letters (W, M). I ordered some 805 sized leds with my PIC, so I will try a 20 led matrix on the next version.

I have a "real life" project that requires SMD components, so this has been great practice! I toasted a few SMD leds at 10 cents instead of something more expensive.

ian (author)ian2006-05-05

Do you know any good/cheap .1uF SMD caps? I just used through-hole on this version. Last year I bought a few hundred TH from mouser for pennies each.

rgbphil (author)ian2006-05-06

Hi Ian, looks good. I've seen your JDM programmer, but you mentioned problems using ICSP via a header.....all solved now. The watch looks nice, though I'd suggest a SMD 78L05 regulator (I presume through hole three pin 'transistor' is the regulator? As for caps, I'll just be using 0805 caps....I just purchased today one of those mix packs of selected values (from Altronics here in Oz)....I'll give those a go. Incidentally I printed out my PCB for the first time.....it's very small, I might move the control switches to the top (not in the animation). I made some eagle SMD parts with a grid, and intending to use a salvaged calculator button style.....I reckon a wrist watch is possible (though I hardly wear a watch!).... If you want to go offline for more collaboration, I've noticed you visit the nixie groups...you can get me there (search for a dotclock post) or at CPF under rgbphil....the link you posted above just defaults to the main intructables page. Phil

ian (author)ian2006-05-05

pov

ian (author)rgbphil2006-05-05

I have an ICSP/18pin socket version of the programmer I posted on this site (JDM2). Let me know if you want the eagle files. It is based on a pcb I found on the internet. I couldn't make a good trnaperency from his GIF, so I just make it myself in eagle. Very similar routing with a few changes to make things easier on myself. I can't really claim it as my own. I used to do toner transfer (and did really small traces with it) but getting the backing off always took so much time. I ended up running a small screwdriver along most of the traces to get bits of paper off. Now I do foto process, which is really quick and easy, but more expensive in materials.

ian (author)rgbphil2006-04-26

I like RTC wherever possible. I have been using a maxim chip (perhaps dallas) with integrated crystal. Its great. For something like a watch, its all about space and power - though primarily space for me, I don't (yet) do surface mount. There is a 32.whatever kHz crystal that is common to watches because it divides evenly into one second. Perhaps there is a combination of prescalers (and pre-loading the registers) that will give an interrupt every second from timer1. This crystal could be used as a clock for the PIC, but it might be easier (program-wise) to use the internal 30kHz low power clock. Then there is no need to futz around with clock input and timer1 (counter) input on the same pin. Flow: 1. PIC sleeps. 2. X number of ticks accumulate on timer 1 (1 second) 3. Interrupt (wake PIC) 4. Increment seconds (update the display if needed). 5. Sleep The picture is a size test for a binary wrist watch with SMD leds.

rgbphil (author)ian2006-04-27

Nice looking little display. A few more LEDs and you could make it a mini-mini pattern watch. It actually got me thinking...a wrist watch might be a bit ambitious (too small) but a little LED keyfob pattern watch might be doable. I've got paying job coming up that needs multicolour SMD LEDs....a few might end up in a teeny little timekeeper. (handily this project will also need some sort of RTC...I can investigate the TMR1 oscillator trick...though I suspect the caps might be an issue. I've also had a look at this thing called charlieplexing....it might be possible to do up to 32 leds with only 8 data lines using this method.....could be something to investigate.

ian (author)rgbphil2006-04-27

I found a PIC with a built in LCD driver. I think with a few transistors it can be made to drive a LED matrix. It has 20 some segments and 4 common lines. (80 pixels?). If I can't get the LCD driver to work (which would be killer) I will just use a software mux. Here is a board put through eagle3d - I have never tried this before, ok results, but no parts for my custom packages (obviously).

rgbphil (author)ian2006-04-28

Thanks for pointing me at Eagle3d.....what a cool program. If I can get my SMD LED packages to render the right way around I'll try to post my version of a charlieplexed micro pattern clock...Not finished yet, but the display is routed...30 leds/1in square...

ian (author)ian2006-04-27

I wish I could upload pictures from here, rather than going back to add them to my library.

ian (author)rgbphil2006-04-26

Picture (resistors at top for scale). LEDs are 0805 size, single in line resistors are to the sides (pad size needs to be changed to save space.

puffin_juice (author)2006-04-24

i think its far beyond me

rgbphil (author)2006-04-23

nice watch....this would be about the same complexity (not counting the mechanical trickyness of making it so small). You've got some sort of timekeeper...perhaps you could save money by not using an RTC and just clock the microcontroller directly off the watch crystal (pics can have two crystal oscillators or a seconday oscillator...look at pic datasheets for oscillators that connect to the timers).....Also the same sort of thing would be needed for the display, unless you have lots of i/o pins on the micro, you'd need a expander of some sort or a multiplexed display arrangement of the leds.

puffin_juice (author)2006-04-23

I saw this new watch called a neolog (at this site http://www.neologstore.com/store/english/). and since im no good at complicated stuff such as your project i was wondering wether it would be hard to make something like a neolog?

About This Instructable

18,279views

16favorites

License:

Bio: update later
More by rgbphil:3D LED Charlieplex Cube from Chrismas Tree LightsCharlieplexing LEDs- The theoryMinidot 2 - The holoclock
Add instructable to: