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 time-based alarm system, or a power cut-off system.
POC Video Tutorial in English:
POC Video Tutorial in Hindi:
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.
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’s 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.
The components required for the circuit are listed in the Bill of Material table.
|Bill of Material|
|RTC DS3231 (MOD1)||1|
|CR2032 coin cell||1|
|LCD JHD 204A / 1602 I2C / SPI (MOD2)||1|
|10k pot (P1)||1|
|220Ω resistor (R1)||1|
|Arduino Uno with USB cable||1|
|Power adaptor (12V, 2A)||1|
|Jumper wires (male-female)||20|
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.
This RTC clock is to be made using Arduino Uno and programmed in Arduino IDE. So, download Arduino IDE and unzip it in a convenient folder. Fig. 1 shows the Arduino Uno board.
Fig. 2(a) shows the display side (front side) of the LCD, while Fig. 2(b) shows its backside. The time is displayed on liquid crystal display JHD204A. This is a 20-column, 4-row display with a blue backlight but you can also use a 16×2 LCD with two rows of the display. Each character is displayed in a dot-matrix manner.