Vertical Desk Clock "Vertichron"
by unusualelectronics in Circuits > Clocks
57 Views, 1 Favorites, 0 Comments
Vertical Desk Clock "Vertichron"
This is a simple desk clock that maximises digit size without occupying much desk space.
Features:
- Large 1" Super Bright LED Seven Segment Displays
- Low power consumption
- Timed and light dependant dimming options.
- Able to dim at night
- Accurate timekeeping with an RTC module with battery backup.
- Easy to configure with a rotary encoder and scrolling option descriptions.
Supplies
- PIC18F25K22-I/P PIC Microcontroller (DIP type)
- Kingbright SA10-21SRWA 1" (25.4mm) Super Bright Red 7-segment LED Display (Common Anode) X 4
- DS3231 RTC Module - See my RTC module project
- BC327 PNP Transistor TO-92L X 4
- Rotary Encoder With Switch type EC11 (12mm long shaft) (eBay or AliExpress)
- 100R (or 82R) 1/8W Carbon Film Resistor (5%) X 7
- 470R 1/8W Carbon Film Resistor (5%)
- 10K 1/8W Carbon Film Resistor (5%) X 5
- 100uF Capacitor Radial Electrolytic 16V Working
- 0.1uF Capacitor 2.5mm Y5V Ceramic 50V working
- Fuse, 0.3A SMD PTC poly Resettable (16v Working)
- LDR Photoresistor type GL5528
- 28-Pin DIP / DIL PCB IC Socket (0.3”) (for the PIC)
- 2.54mm 40 way round-pin socket strip. (cut into 8 X 5way strips (for the LED displays))
- JST-XH 2 Way 2.5mm Plug and PCB socket (for power connection)
- Knob for Rotary Encoder (3D-printed)
- M2 screws for PCB mounting X 4
- PLA filament for case
- Tinted Black (30%) Solar window film for the display
- 5V Regulated DC power supply
- Custom PCB
Display
The Kingbright SA10-21SRWA datasheet is here
It is a Super Bright Common Anode display with two LEDs per segment for even illumination.
If not available, there are alternatives such as an 1106BS from eBay or AliExpress.
RTC Module
You will need my DS3231 RTC module for this project.
PCB
Below are the main Gerber files for the PCB.
There are also 2 optional drill map files that can't be attached here. If you need them for your PCB manufacturer, they can be downloaded from my website
I had my PCB manufactured by JLCPCB.
Schematic
The four Common Anode displays containing 2 LEDs per segment are multiplexed and transistors Q1 - Q4 drive the anodes. Each segment has a current limiting resistor (either 100 or 82 ohms depending on required brightness).
The DP segment only has one LED and needs a 470R resistor to limit brightness.
Timekeeping is handled by the DS3231 RTC module which has a coin cell to retain time.
Settings etc. are controlled by a rotary encoder.
Downloads
Construction
- Fit the resistors first.
Resistors R6, - R10 & R12 can be either 100R for lower brightness or 82R for a higher brightness.
(If you prefer the display to be able to go very dim at night - use 100R)
- Fit the IC socket as shown in the photo and Capacitor C1
- Followed by the SMD fuse, then the power socket, Transistors and Capacitor C2
- Turn over the PCB and fit the Display sockets.
- Then fit the RTC module and the rotary encoder.
- Fit the LDR using a 3D-Printed spacer so that it protrudes the correct distance from the PCB.
(The STL file for the LDR spacer is included with the 3D printed case files).
- Trim the LED display leads to the correct length to fit their sockets using my 3D-printed jig that fits onto the leads as shown.
(The STL file for this jig is included with the 3D printed case files)
- The leads can then be trimmed flush with the surface of the jig.
- Insert the displays into their sockets and check they are all level with each other.
Firmware
Here is the firmware HEX file for the PIC microcontroller.
Program the chip using a suitable programmer and PIC programming software.
A programmer such as Microchip "PICKIT2" or "PICKIT3" or similar can be used.
Microchip have discontinued these older programmers and no-longer update their stand-alone software for them. But there is a great project by "kair.us" called PICkitminus that has updated the original software and added some new features.
Downloads
Initial Checks and Setup
Connect a 5V Regulated DC supply or a lead to a USB outlet socket - ensuring correct polarity.
The display should show 12:12
Set the time
- Press the encoder button until the display shows SET
- Press the button and turn to adjust the hours.
- press the button again and turn to adjust the minutes
- press the button again to quit with the new time now saved.
Set the Date
- Press the encoder button until the display shows SET
- Turn until the display shows DATE
- Press and turn to set the YEAR, then repeat for MONTH and DAY
- Press to quit with new date set.
Configure
- Press the encoder button until the display shows SET
- Turn until the display shows CFG
- Press and it shows the first option - 12 or 24 Hour
- Continue turning to show the various config options or press to change a selected option.
- After changing an option, press to show the next or hold pressed to quit and save.
The available configuration options are:
- 12 or 24 Hour mode
- Leading Zero (off/on)
- PM indicator (off/on)
- Opto-Dim enable (off/on)
- Opto-Dim Sensitivity (1-80) (Higher number means the display dims even in bright light, lower means it has to be darker before the display dims)
- Timed dim start time (set start hour and minute in 24 hour format)
- Timed dim end time (set end hour and minute in 24 hour format)
- Timed dim brightness (1-16) (16 means timed-dim is not enabled)
- Crystal Aging (-128 to 127) timekeeping adjustment -(+1 to +127 decrease the clock speed)
(0=No Compensation
(-1 to -127 increases the clock speed by reducing the value of a capacitor inside the RTC chip)
Each increment = 0.05ppm approx. (about 1.6 sec/year))
10.Encoder reverse (off/on) - reverse the turn direction of the encoder knob
3D-Printed Case
I designed the case with RS Designspark Mechanical.
The plinth can be attached to the case using superglue.
Cover the display with the tinted solar film and trim it with a sharp knife.
Push the PCB into the case - check the display is flush with the front and then fasten with four M2 screws.
Plug in the power lead and fit the case back - it should click into place and the LDR should fit into the hole for it.
Print the bezel and glue it in place then fit the encoder knob.
Using the Clock
The rotary encoder can be used to adjust the brightness manually.
Press the encoder button to show the date for a short time.
The clock can be configured to automatically dim at night with the optical and timed dimming settings.