{"id":1602,"date":"2023-11-10T19:00:13","date_gmt":"2023-11-10T19:00:13","guid":{"rendered":"https:\/\/www.adrian-smith31.co.uk\/blog\/?p=1602"},"modified":"2025-08-08T20:46:43","modified_gmt":"2025-08-08T20:46:43","slug":"6_digit_clock","status":"publish","type":"post","link":"https:\/\/www.adrian-smith31.co.uk\/blog\/2023\/11\/6_digit_clock\/","title":{"rendered":"Build a large 6 digit clock using 1.8&#8243; + 0.8&#8243; LED displays and TPIC6B595 shift registers"},"content":{"rendered":"<p><strong>The project<\/strong><\/p>\n<p>I recently bought a few LED displays as a job lot which were parts for fruit machines; the type you see in the local pub and after testing them I found that they had a nice bright red \/ orange colour to them and decided to use them for a large clock project. As I have not made anything for a while and had some spare time on my hands I thou<a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-scaled.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1624 size-medium\" src=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-300x169.jpg 300w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-1024x576.jpg 1024w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-768x432.jpg 768w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-1536x864.jpg 1536w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-2048x1153.jpg 2048w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-600x338.jpg 600w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_111215-1040x585.jpg 1040w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a>ght I&#8217;d need to brush up on my PCB design skills and C++ coding skills. Hence this project &#8211; a large LED clock which uses 1.8&#8243; high digits for the hours and minutes and the seconds is displayed on 0.8&#8243; 7 segment displays. It is controlled by an ATMEGA168P microcontroller and uses TPIC6B595 shift registers to drive the common anode displays. A DS3231 high precision RTC completes the electronics. It is a large PCB measuring 270x120mm and can easily be seen from 30 feet away making it suitable for large workplaces or people with limited vision. The clock is powered from a 12V regulated power supply which can supply 800mA or more. A fuse and reverse polarity protection diode helps to prevent incorrect power supply connection from damaging the components. Finally three buttons are used for setting the time. There is provision on the PCB for a 4th button which could be used for something else if I wanted to add extra features later or with the code being open source you could make use of it yourself should you make one.<a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-1626 size-medium\" src=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-300x169.jpg 300w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-1024x576.jpg 1024w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-768x432.jpg 768w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-1536x864.jpg 1536w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-600x338.jpg 600w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3-1040x585.jpg 1040w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_110553_exported_3.jpg 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This project was sponsored by <a href=\"https:\/\/pcbway.com\/g\/xvW2xR\" target=\"_blank\" rel=\"noopener\">PCBway<\/a> who kindly offered to make the PCB&#8217;s for them. As I have already made the prototypes using boards from JLCPCB I decided to take up their offer and made a slight design change to the PCB layout. I plan to sell these PCB&#8217;s along with the remaining version 1 PCB&#8217;s on eBay \/ Tindie so you can make your own if you wish. Please see the links to the right for my eBay store where you can purchase one along with a completed, assembled PCB which I will list in the coming weeks once the button boards and new TPIC6B595 chips come into stock. The version 1 PCB&#8217;s are made in green solder mask whereas version 2 has black solder mask. The source code and schematic I will show below and also there is a YouTube video explaining how the circuit and code works.<\/p>\n<p><!--more--><\/p>\n<p><strong>Schematic, code, BOM and YouTube video<\/strong><\/p>\n<figure id=\"attachment_1617\" aria-describedby=\"caption-attachment-1617\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-scaled.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1617 size-medium\" src=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-300x212.jpg\" alt=\"Schematic\" width=\"300\" height=\"212\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-300x212.jpg 300w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-1024x724.jpg 1024w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-768x543.jpg 768w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-1536x1086.jpg 1536w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-2048x1448.jpg 2048w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-600x424.jpg 600w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6-digit-schematic-1040x735.jpg 1040w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-1617\" class=\"wp-caption-text\">Schematic for the ATMega clock<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2025\/07\/clocksim.html\" target=\"_blank\" rel=\"noopener\">Web based simulation of version 2.0 of the clock<\/a><\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6_digit_clock.zip\" target=\"_blank\" rel=\"noopener\">Source code (C++) Arduino IDE<\/a><\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/6_digit_clock_2.0.zip\" target=\"_blank\" rel=\"noopener\">Source code (version 1.9) &#8211; removed leading zero and number 7 tails. Added ability to turn seconds display off.<\/a><\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2025\/07\/6_digit_clock_V2.zip\" target=\"_blank\" rel=\"noopener\">Source code (version 2.0) &#8211; added 12 hour mode, date and temperature display. Optional remote control.<\/a><\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button.zip\" target=\"_blank\" rel=\"noopener\">Button library<\/a><\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Atmega-6-digit-clock-BOM.csv\" target=\"_blank\" rel=\"noopener\">Bill of materials<\/a><\/p>\n<p><span style=\"color: #ff0000;\">Addendum to schematic &amp; BOM &#8211; the 330 ohm resistors should, ideally be 390 ohm instead as with some LED displays the seconds display may be dimmer. There&#8217;s about 3mA difference in segment current between the main digits and the seconds which is not noticeable on the displays I used as shown on the schematic. But to keep segment current within 1mA use 390 ohm resistors instead. Do not reduce the value of the current limiting resistors on the seconds displays to make them brighter as this would result in too much power dissipation through the resistors. Segment current will be approximately 16.5mA.\u00a0<\/span><\/p>\n\n<div class=\"youtube-embed\" itemprop=\"video\" itemscope itemtype=\"https:\/\/schema.org\/VideoObject\">\n\t<meta itemprop=\"url\" content=\"https:\/\/www.youtube.com\/v\/FNXXNWuU0dI\" \/>\n\t<meta itemprop=\"name\" content=\"SPI driver board for large 2-8&#8243; 7 segment displays\" \/>\n\t<meta itemprop=\"description\" content=\"SPI driver board for large 2-8&#8243; 7 segment displays\" \/>\n\t<meta itemprop=\"uploadDate\" content=\"2025-02-02T13:00:05+00:00\" \/>\n\t<meta itemprop=\"thumbnailUrl\" content=\"https:\/\/i.ytimg.com\/vi\/FNXXNWuU0dI\/default.jpg\" \/>\n\t<meta itemprop=\"embedUrl\" content=\"https:\/\/www.youtube.com\/embed\/FNXXNWuU0dI\" \/>\n\t<meta itemprop=\"height\" content=\"340\" \/>\n\t<meta itemprop=\"width\" content=\"560\" \/>\n\t<iframe loading=\"lazy\" style=\"border: 0;\" class=\"youtube-player\" width=\"560\" height=\"340\" src=\"https:\/\/www.youtube.com\/embed\/FNXXNWuU0dI\" allowfullscreen><\/iframe>\n<\/div>\n\n<p>&nbsp;<\/p>\n<p><strong>Basic use instructions<\/strong><\/p>\n<p>To set the time on this clock you press the &#8220;set mode button&#8221; and the clock will show &#8220;SEt&#8221; for 2 seconds and blank the seconds display. The decimal point will light on the last digit to indicate the clock is in time set mode. Then use the hour button and minute button till the correct time is shown then finally press set mode again to return to normal operation. Note that as soon as you press set time to exit setting mode it will zero the seconds. This way the clock can be synchronised to another time source. For example if the current time is 13:56 set the clock to 13:57, wait till the other time source changes to 13:57 then press set mode button.<\/p>\n<p><strong>Button library compilation issues<\/strong><\/p>\n<p>If you have problems compiling it could be due to the version of the library available through the Arduino Library manager is different to the one I used which I got from Github. The file versions appear to be the same but some users have been reporting compilation problems. To avoid this download the button library above and place it in your Arduino libraries folder in your documents folder &#8211; not the Arduino folder in program files. It should look like my example in the image below.<\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1816 size-medium\" src=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-300x172.jpg\" alt=\"\" width=\"300\" height=\"172\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-300x172.jpg 300w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-1024x587.jpg 1024w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-768x440.jpg 768w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-1536x881.jpg 1536w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-600x344.jpg 600w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library-1040x596.jpg 1040w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/Button-library.jpg 1678w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Closing comments<\/strong><\/p>\n<p>And don&#8217;t forget if you would like to make one of these clocks yourself check my eBay page on the right were I will be listing some of the bare PCB&#8217;s and a completed, working PCB when the button board comes in a few weeks. Keep checking my eBay listings for updates. The project is also <a href=\"https:\/\/www.pcbway.com\/project\/shareproject\/Large_1_8_0_8_6_digit_LED_clock_using_ATMega328P_and_TPIC6B595_shift_registe_ad4da5b4.html\" target=\"_blank\" rel=\"noopener\">shared as an open source project<\/a> on the PCBWay community site where you can order a set of PCB&#8217;s directly from PCBWay.com. Finally should you wish to use equivalents of the Kingbright LED displays be aware that the cheap Chinese LED 7 segment displays from AliExpress \/ eBay \/ Amazon often do not have datasheets and \/ or they have non standard pinouts; especially the 0.8&#8243; displays where the pins are on the top &amp; bottom rather than the sides. Also going by what I have found the 1.8&#8243; high Chinese no-name brands have two LED chips per segment rather than three. Whilst this will work just fine you will have to adjust the current limiting resistor values accordingly. Better hope they have that datasheet!<\/p>\n<p>Completed clock in example case.<\/p>\n<p><a href=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-1627 size-medium\" src=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-300x169.jpg 300w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-1024x576.jpg 1024w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-768x432.jpg 768w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-1536x864.jpg 1536w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-600x338.jpg 600w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493-1040x585.jpg 1040w, https:\/\/www.adrian-smith31.co.uk\/blog\/wp-content\/uploads\/2023\/11\/20231103_120920_exported_12493.jpg 1920w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The project I recently bought a few LED displays as a job lot which were parts for fruit machines; the type you see in the local pub and after testing them I found that they had a nice bright red \/ orange colour to them and decided to use them for a large clock project. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Build a large 6 digit clock using 1.8\" + 0.8\" LED displays and TPIC6B595 shift registers - Adrian's electronics blog","description":"The project I recently bought a few LED displays as a job lot which were parts for fruit machines; the type you see in the local pub and after testing them I fo"},"footnotes":""},"categories":[5],"tags":[],"class_list":["post-1602","post","type-post","status-publish","format-standard","hentry","category-projects"],"_links":{"self":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1602"}],"version-history":[{"count":41,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1602\/revisions"}],"predecessor-version":[{"id":1933,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1602\/revisions\/1933"}],"wp:attachment":[{"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.adrian-smith31.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}