{"id":118051,"date":"2023-05-09T15:42:00","date_gmt":"2023-05-09T10:12:00","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=118051"},"modified":"2024-09-06T12:38:21","modified_gmt":"2024-09-06T07:08:21","slug":"arduino-real-time-digital-clock","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/hardware-diy\/arduino-real-time-digital-clock","title":{"rendered":"Real-Time Digital Clock using Arduino"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-101636 alignright\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/08\/efy-tested-2.jpg\" alt=\"\" width=\"178\" height=\"164\" \/><\/p>\n<p>This project aims to build a digital clock using a real-time clock chip (DS3231) with battery backup, a liquid crystal display (JHD 204A), and an Arduino Uno board.<\/p>\n<p>Let us try to design our own real-time digital clock that can be used in time-related projects, like keeping the data of a sensor with time, a time-based alarm system, or a power cut-off system.<\/p>\n<h3>POC Video Tutorial in English:<\/h3>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/Qf2aCx7Z7Ss\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h3>POC Video Tutorial in Hindi:<\/h3>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/Z1pBDgsMiVc\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center>You will also learn how to program the DS3231 clock chip and the LCD in an Arduino environment.<\/p>\n<p>A real-time digital clock (RTC) is often required in projects and designs where we need to deal with time. RTC helps in keeping track of time even when the main processor is asleep or switched off.<\/p>\n<p>It is because of RTC that your PC\/laptop clock keeps showing the correct time even after it has been switched off for some time, or even when the computer\u2019s battery is removed for replacement with a new one. RTC module has its own small coin cell that runs for years and helps keep track of time when the whole circuit is powered off.<\/p>\n<p>The components required for the circuit are listed in the Bill of Material table.<\/p>\n<table dir=\"ltr\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col width=\"272\" \/>\n<col width=\"165\" \/><\/colgroup>\n<tbody>\n<tr>\n<td style=\"text-align: center;\" colspan=\"2\" rowspan=\"1\" data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Bill of Material&quot;}\"><strong>Bill of Material<\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Components&quot;}\"><strong>Components<\/strong><\/td>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Quantity&quot;}\"><strong>Quantity<\/strong><\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;RTC DS3231 (MOD1)&quot;}\">RTC DS3231 (MOD1)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;CR2032 coin cell&quot;}\">CR2032 coin cell<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;LCD JHD 204A \/ 1602 I2C \/ SPI (MOD2)&quot;}\">LCD JHD 204A \/ 1602 I2C \/ SPI (MOD2)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;10k pot (P1)&quot;}\">10k pot (P1)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;220\u2126 resistor (R1)&quot;}\">220\u2126 resistor (R1)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Arduino Uno with USB cable&quot;}\">Arduino Uno with USB cable<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Power adaptor (12V, 2A)&quot;}\">Power adaptor (12V, 2A)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:1}\">1<\/td>\n<\/tr>\n<tr>\n<td data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Jumper wires (male-female)&quot;}\">Jumper wires (male-female)<\/td>\n<td data-sheets-value=\"{&quot;1&quot;:3,&quot;3&quot;:20}\">20<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The project has two parts. In the first part, we learn how to interface the LCD to Arduino Uno. In the second part, we add a clock chip to this setup and display the time.<\/p>\n<div class=\"mepr_error\"><div class=\"locked-content\">\n<b>EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.<\/b><\/p>\n<p>Oops! This is an EFY++ article, which means it's our Premium Content. You need to be a Registered User of our website to read its complete content.<\/p>\n<p><b>Good News: <\/b>You can register to our website for FREE! <a href=\"https:\/\/www.electronicsforu.com\/plans\/subscription-plans\" target=\"_blank\" rel=\"noopener\">CLICK HERE<\/a> to register now.<\/p>\n<p><b>Already a registered member? <\/b>If YES, then simply login to you account below. (TIP: Use 'forgot password' feature and reset and save your new password in your browser, if you forgot the last one!)\n<\/div>\n<\/div><div>\n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/www.electronicsforu.com\/login\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/118051\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n      <a href=\"https:\/\/www.electronicsforu.com\/login?action=forgot_password\">Forgot Password<\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This project aims to build a digital clock using a real-time clock chip (DS3231) with battery backup, a liquid crystal display (JHD 204A), and an Arduino Uno board. Let us try to design our own real-time digital clock that can be used in time-related projects, like keeping the data of a sensor with time, a [&hellip;]<\/p>\n","protected":false},"author":206772,"featured_media":118058,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,6070,6072,2119,3713,22],"tags":[1985,110,83,10413,113],"class_list":{"0":"post-118051","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-hardware-diy","8":"category-advanced-projects","9":"category-beginners-projects","10":"category-diy-projects-video-tutorials","11":"category-premium","12":"category-electronics-projects","13":"tag-diy-projects","14":"tag-electronics-projects","15":"tag-featured","16":"tag-may-2023","17":"tag-mini-projects"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/118051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/206772"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=118051"}],"version-history":[{"count":1,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/118051\/revisions"}],"predecessor-version":[{"id":144943,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/118051\/revisions\/144943"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/118058"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=118051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=118051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=118051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}