The “Clock with Tics” project now comes in two production models:
- Using the SURE 0832 module — the same module used in Media Circus
- Using the JY-MCU 3208 module
The SURE module is an LED matrix with a LED matrix controller built-in. A hand-wired board featuring an ATMEGA328 microcontroller, a DS-1307 battery chip with a button clock backup, and a 5v high-efficiency regulator drives the SURE module.
The JY-MCU 3208 also has the same matrix controller, but also includes an ATMEGA8 controller; no extra wiring is required except for a light sensor attached to a spare data input pin on the ATMEGA.
The JY-MCU 3208 currently sells for just over $12 at DealExtreme.com. It arrives with software that displays date and time using Chinese characters. Fortunately, the module includes a standard six-pin ISP connector that allows hobbyists to upload their own code using AVRISP mkII or other In-System Programmers. This version would not be possible without the replacement code provided by DrJones.
The ATMEGA8 does time-keeping using interrupts, and the program is uploaded to the module using the built-in ISP connector. This is a bare-bones design that does not have a voltage regulator, so you must be diligent in selecting a power adapter that delivers regulated 5v to the unit. I’ve blown a couple of the modules through inattention and stupidity.
My modifications to DrJones’ code include:
- improved typography
- auto brightness
- re-assignment of the three control buttons
Only one hardware modification is required: for the auto brightness feature, connect one side of a CdS cell to 5v, and to the other side of the CdS cell make a direct connection to pin A0 of the ATMEGA8, and connect this point to ground through a 10k resistor. It’s a little tricky if you’re not used to surface-mount soldering; go here and here if you need some tips. If you don’t want to use the auto brightness, comment out lines 352-353 of file clockmtx004.c and recompile.
There are three small pushbuttons on the left side of the module which have been reassigned to provide the following functions, from top to bottom:
- Hour adjust – each press adds one hour, hold press to accelerate
- Minute adjust – each press adds one minute, hold press to accelerate
- “Child-safe” toggle – press once to turn off expletives, press again to turn them on
You can download the code in an AVR Studio 4 package—which includes all the libraries and makefile, and a compiled hex file—here.
As an update to my earlier post on the SURE unit: my clock with the SURE module uses amber LEDS; these have been discontinued by the manufacturer however, and only red and green are currently available. I was able to snatch up the last six amber modules from a Swiss supplier in January 2013. The JY-MCU module is only available in red.
Generaleccentric.net has more videos and photos of the Clock with Tics project.