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 | |
Components | Quantity |
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.
Please register to view this article or log in below. Tip: Please subscribe to EFY Prime to read the Prime articles.
Sir,
“Fig. 5: Connection for SPI to I2C converter display”
As per the schematic we are using I2C lines from the Arduino Uno. I don’t understand what is SPI to I2C converter.
The dipslay that you find in market is SPI based but because of so many wire connection in SPI based display it become hard to work with because even any one of wire connection is loose then display wont work so to make it ease I used SPI to I2C converted and solder te pins to I2C driver so you can easily use the display
Sir, can I use a single I2C bus for both RTC and LCD display? In the Fig.5 we are using separate I2C connections for RTC and LCD display.
Yes , In fact both i2C pins are inter connected on arduino board . so you can use th SCL and SDA pins of arduino to connect both RTC and Display I2c driver
The dipslay that you find in market is SPI based but because of so many wire connection in SPI based display it become hard to work with because even any one of wire connection is loose then display wont work so to make it ease I used SPI to I2C converted and solder te pins to I2C driver so you can easily use the display
Sir, Thank you for the detailed explanation and clarification. Much appreciated.