Color Clock
Here is a simple clock made with some rather nice looking displays.
The displays come from clock kits found on AliExpress.
I could not find the display sold separately, or any data on the display boards.
But the clock kits are cheap, so I bought kits and threw away everything but the display.
After a little reverse engineering we have two completely different display boards with the same footprint...
Monochrome board CAI-219
There are a number of monochrome colors available.
These use a AiP650E chip, which is a 4 digit 8 segment EI2C LED driver.
The decimal point segment is used for punctuation (PM, colon, dash, and degrees).
This is a conventional constant current LED driver chip with 8 brightness levels.
It uses EI2C (Evil I2C); that is, it takes up an entire I2C bus.
The code includes drivers for both I2C and bit-banged communication with this display.
Seven Color board CAI-199
This display can mix RGB to make 7 colors, and it has overall brightness control.
The chips used are SM5166P, a 3 to 8 Decoder/Selector and High Side Driver
and SM16306SJ, a 16 channel LED driver similar to 74x595.
The seven color board has 96 RGB LEDs (4 digits * 8 pixels * 3 LEDs/pixel).
To drive the 96 LEDs two 16 channel LED drivers are multiplexed 4 ways (32*4 = 128) and 4 channels on each driver are not used (24*4 = 96).
Dimming is accomplished by PWM'ing the decoder chip select.
A high PWM frequency (25KHz) is required for flicker free dimming.
What are some things you can do with a color clock display?
Choosing a Display
For consistent color, use the monochrome display.
The color display is brighter and obviously more colorful,
but the LEDs are inconsistent so the color tint doesn't match perfectly.
This is only a problem for the 4 mixed colors; the pure red, green, and blue are good,
but white, yellow, aqua, and purple aren't perfect.
Features
Design Documents
Schematic Diagram | color_clock_schematic.pdf |
Source Code | Arduino.ino |
3D Print Files | color_clock_mechanical.zip |
Arduino Implementation
An Arduino (UNO or Pro Mini) has enough pins to drive both displays at once,
so either (or both) monochrome and color displays can be used.
This project drives both displays simultaneously, and doesn't complain if a display isn't present.
The way the boards are designed it's also possible to make a clock that will
accept either type of display in the same socket and the software can automatically identify and use it,
but we didn't do that this time.
A DS3231M RTC is used in this clock, which talks I2C. Since the AiP650E chip can't share the I2C bus,
hardware I2C is used for the DS3231M and bit-banged I2C for the AiP650E chip.
The display is multiplexed at a 1KHz digit rate, or 250Hz frame rate, so there's very little motion artifacts.
The color display multiplex timing and high frequency PWM use ATmega328-specific hardware,
so it won't work on other architectures.
Clock Operation
This is a basic clock, just hours, minutes, and PM.
No alarm, no internet.
But it uses a legit DS3231M from Digikey, and is accurate to about 1 minute/year, and is battery backed up.
I know it looks like a cheap chinese DS3231 module, and it is, but I removed the knock-off DS3231 and installed a legit DS3231M chip.
I also cut the battery charge circuit because a primary cell is being used instead of a rechargable battery.
One knob allows adjustment of the brightness and time setting. Brightness is automatic but can be nudged higher or lower with the brightness adjustment. The color version automatically changes to a new color at midnight.
To adjust the brightness twist the knob. To adjust the time press the knob and the display will start blinking. Twist the knob to adjust the time, press the knob to switch between hours and minutes, press and hold the knob to save changes. The seconds are synchronized to zero when the time is saved.
Build Pictures
Breadboard, driving both monochrome and color displays simultaneously
Front, seven color clock, showing white with some tint variation visible