Vertical Desk Clock "Vertichron"

by unusualelectronics in Circuits > Clocks

79 Views, 1 Favorites, 0 Comments

Vertical Desk Clock "Vertichron"

Vertichron.jpg

This is a simple desk clock that maximises digit size without occupying much desk space.

Features:

  1. Large 1" Super Bright LED Seven Segment Displays
  2. Low power consumption
  3. Timed and light dependant dimming options.
  4. Able to dim at night
  5. Accurate timekeeping with an RTC module with battery backup.
  6. Easy to configure with a rotary encoder and scrolling option descriptions.


Supplies

Vertichron Parts.jpg
Vertichron_pcb_top.jpg
RTC_Complete.jpg
  1. PIC18F25K22-I/P PIC Microcontroller (DIP type)
  2. Kingbright SA10-21SRWA 1" (25.4mm) Super Bright Red 7-segment LED Display (Common Anode) X 4
  3. DS3231 RTC Module - See my RTC module project
  4. BC327 PNP Transistor TO-92L X 4
  5. Rotary Encoder With Switch type EC11 (12mm long shaft) (eBay or AliExpress)
  6. 100R (or 82R) 1/8W Carbon Film Resistor (5%) X 7
  7. 470R 1/8W Carbon Film Resistor (5%)
  8. 10K 1/8W Carbon Film Resistor (5%) X 5
  9. 100uF Capacitor Radial Electrolytic 16V Working
  10. 0.1uF Capacitor 2.5mm Y5V Ceramic 50V working
  11. Fuse, 0.3A SMD PTC poly Resettable (16v Working)
  12. LDR Photoresistor type GL5528
  13. 28-Pin DIP / DIL PCB IC Socket (0.3”) (for the PIC)
  14. 2.54mm 40 way round-pin socket strip. (cut into 8 X 5way strips (for the LED displays))
  15. JST-XH 2 Way 2.5mm Plug and PCB socket (for power connection)
  16. Knob for Rotary Encoder (3D-printed)
  17. M2 screws for PCB mounting X 4
  18. PLA filament for case
  19. Tinted Black (30%) Solar window film for the display
  20. 5V Regulated DC power supply
  21. 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

vert_clock_v1.png

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

Vertichron_Resistors.jpg
Vertichron_ic_socket.jpg
Vertichron_transistors.jpg
Vertichron_disp_sockets.jpg
Vertichron_disp_trim.jpg
  1. 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)

  1. Fit the IC socket as shown in the photo and Capacitor C1


  1. Followed by the SMD fuse, then the power socket, Transistors and Capacitor C2


  1. Turn over the PCB and fit the Display sockets.


  1. Then fit the RTC module and the rotary encoder.


  1. 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).

  1. 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)

  1. The leads can then be trimmed flush with the surface of the jig.


  1. 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.

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

  1. Press the encoder button until the display shows SET
  2. Press the button and turn to adjust the hours.
  3. press the button again and turn to adjust the minutes
  4. press the button again to quit with the new time now saved.

Set the Date

  1. Press the encoder button until the display shows SET
  2. Turn until the display shows DATE
  3. Press and turn to set the YEAR, then repeat for MONTH and DAY
  4. Press to quit with new date set.

Configure

  1. Press the encoder button until the display shows SET
  2. Turn until the display shows CFG
  3. Press and it shows the first option - 12 or 24 Hour
  4. Continue turning to show the various config options or press to change a selected option.
  5. After changing an option, press to show the next or hold pressed to quit and save.

The available configuration options are:

  1. 12 or 24 Hour mode
  2. Leading Zero (off/on)
  3. PM indicator (off/on)
  4. Opto-Dim enable (off/on)
  5. 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)
  6. Timed dim start time (set start hour and minute in 24 hour format)
  7. Timed dim end time (set end hour and minute in 24 hour format)
  8. Timed dim brightness (1-16) (16 means timed-dim is not enabled)
  9. 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

Case_design.jpg
Vertichron_case.jpg

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.