kair.us/ projects/ seven segment wall clocks/ kello version 3

Kello version 3

Red digital 2.3" clock

The first two versions of the clock were not really DIY friendly because of the Altera CPLD used. I decided to design a new version with a PIC microcontroller and SAA1064 LED drive ICs. When I started the design some time in 2009 or so, the NXP SAA1064 seemed to be a good choice: easily available, cheap, uses I2C so just 2 I/O required, supply voltage up to 15V so can drive large displays directly, drive current programmable via I2C for easy brightness adjustment.

The project was stalled for years but at 2013 I was bored enough to finish the design. Even then there was no indication that the SAA1064 would be discontinued. But now NXP has obsoleted it, and last time buy will be 30.9.2014. If you are planning to build one I recommend to build the version 4 which has non-obsolete and cheaper hardware, and more features.

Here's the clock in action on Youtube.



The version 3 uses slightly larger, 58 mm (2.3") displays, which can be obtained from eBay at cheap price, around 12 EUR for a pack of ten. The best matching flat top LED for the displays that I've found is Kingbright WP483SRSGW (or older code Kingbright L-483SRSGW). This is actually bi-color LED but when mounted as in assembly drawing, it lights red. I've also used shrink tube around the LEDs to prevent light leakage from side. The Youtube video above still has different LED type which is dimmer and different color than 7-segment displays, without shrink tube. The image on top of this page has the mentioned Kingbright type.

One major drawback of previous clock versions was lack of battery back-up, which meant that after power outage, you would need a chair to climb to the wall to re-adjust the time. Version 3 uses Maxim DS3231 RTC which provides very accurate timekeeping at very low power (and a price tag to match...). But very clever chip altogether. Another improvement is IR remote control, which allows to change clock to display time, date or temperature (currently using internal temperature sensor of DS3231 which is not that good since the electronics warm it up quite a bit).  Also the brightness can be adjusted. A compatible remote control can be acquired from eBay very cheaply, search for 'keyring universal remote' and choose the cheapest one you can find. In case the remote is lost, there is also a joystick-style switch on the clock which can be used to control the clock.


The schematics are pretty straight forward. The PIC18F14K50 firmware makes most job. It decodes IR messages from the TSOP4838 receiver, reads joystick switch, controls the displays connected to the three SAA1064 drivers and communicates with the DS3231 RTC. A 7805 provides +5V to PIC, DS3231 and the IR receiver. The SAA1064 chips operate directly from input supply to be able to control the large displays. I recommend using +9 V input supply to reduce power loss on the display drivers, but +12 V works also OK. The schematic is available in PDF below:

kello_v31.pdf Schematic version 3.1, changed one joystick line from pin 18 to pin 16 with added pull-up R6 as pin 18 was not working properly as digital input for some reason.


The PCB for the clock is again designed using Cadsoft Eagle. The design is single-sided with two jumpers. I have designed it to be possible to etch at home, but after some research ordered from a Polish company http://en.obwody-drukowane.com/ The price is very competitive and the quality is good. The design tries to minimize the board area and keep display side as clean as possible. So mostly SMD at back of the board. The segment order for SAA1064 chips is chosen to allow simple single-side routing. This causes some more work in FW but not bad. The assembly drawing in PDF, Eagle design in .zip and BOM can be downloaded below:



The firmware for the clock is written with CCS PIC-C Compiler. The source files package including compiled .HEX file are available for download below. The main source file would benefit from some clean-up and/or partial rewrite, especially the menu is coded in awful style. But it works.

The IR receiver code is based on San Bergmans's NEC reveiver code, but (mostly) converted to C. The SAA1064.h is based on a version found in the CCS forums. I can't remember where I've gotten the ds3231.c code. It's quite probably based on some other Maxim RTC code with my modifications, as I remember doing the temperature readout part myself.

Kello_v3_110.zip 1.8.2014 Source files for HW v3.1, FW v1.1. Contains .HEX compiled with CCS version 5.021.
Kello_v3_130.zip 5.9.2014 New features added: Saves brightness level and display mode to DS3231 NVRAM. Adds 'toggle' mode which alternates time, date and temperautre display modes. Possibility to adjust brightness also via 'set' menu, earlier only possible with remote button.

kair.us/ projects/ seven segment wall clocks/ kello version 3

page created 1.8.2014
last updated 14.7.2018 webmaster@kair.us