|
Arduino_UNO_R3 |
x 1 | |
|
SRD-05VDC-SL-CSONGLE
|
x 1 | |
|
BC547Onsemi
|
x 1 | |
|
1N4007ST
|
x 1 | |
|
25RX301000M12.5X20Rubycon
|
x 1 |
![]() |
Arduino Web Editor |
DIY RTC Digital Clock with Professional PCB Design
In this blog post, we will guide you through making a DIY RTC Digital Clock using an Arduino UNO and an I2C LCD. We will also explain the provided circuit diagram, how to design and order a PCB from PCBWay, and why PCBWay is the best choice for high-quality PCBs.
Circuit Diagram Explanation
The schematic consists of an ATmega328P microcontroller, an RTC module, an I2C LCD, and other supporting components. The microcontroller manages the real-time clock functionality and displays the time on the LCD screen.
Key Components Used:
- Microcontroller: ATmega328P-PU
- Real-Time Clock Module: DS3231
- Display: 16x2 LCD with I2C interface
- Voltage Regulator: 7805 for 5V regulation
- Diodes: 1N4007 for reverse polarity protection
- Transistors: BC547B for switching
- Capacitors: 22pF and 220uF for stability
- Resistors: 10kΩ, 1kΩ
- Crystal Oscillator: 16MHz
- Relay Module: For controlling external devices
- LED Indicators: For power and status indication
Hardware Connections & Explanation
- I2C LCD: The I2C LCD is connected to the ATmega328P microcontroller via SDA (A4) and SCL (A5) lines. This reduces the number of GPIO pins required for communication.
- RTC Module: The DS3231 RTC module communicates via I2C and provides accurate timekeeping.
- Power Supply: The circuit operates at 5V, regulated by the 7805 voltage regulator.
- Relay Control: The relay is controlled by a transistor to switch external loads.
Working Principle
- The RTC module keeps track of the real-time clock and communicates with the microcontroller via I2C.
- The microcontroller reads the time data and displays it on the LCD.
- A relay is incorporated to control external devices based on time settings.
- The system is powered by a stable 5V regulated supply to ensure smooth operation.
How the RTC Module Works & Calibration
The DS3231 RTC module is a highly accurate real-time clock with an inbuilt temperature-compensated crystal oscillator. It maintains time even when power is removed, thanks to its onboard battery backup.
Calibration with Arduino UNO
Connect the RTC Module to Arduino:
VCC → 5V
GND → GND
SDA → A4
SCL → A5
Upload the following code to set the correct time:
#include <Wire.h>
#include <RTClib.h>
RTC_DS3231 rtc;
void setup() {
Serial.begin(9600);
if (!rtc.begin()) {
Serial.println("RTC not found!");
while (1);
}
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
Serial.println("RTC Set to Compilation Time");
}
void loop() {}
Verify RTC Time: Upload the code below to read and display the RTC time.
void loop() {
DateTime now = rtc.now();
Serial.print(now.year(), DEC);
Serial.print("/");
Serial.print(now.month(), DEC);
Serial.print("/");
Serial.print(now.day(), DEC);
Serial.print(" ");
Serial.print(now.hour(), DEC);
Serial.print(":");
Serial.print(now.minute(), DEC);
Serial.print(":");
Serial.println(now.second(), DEC);
delay(1000);
}
Arduino Code for RTC Digital Clock
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
RTC_DS3231 rtc;
void setup() {
lcd.begin();
lcd.backlight();
if (!rtc.begin()) {
lcd.print("RTC ERROR");
while (1);
}
rtc.adjust(DateTime(__DATE__, __TIME__)); // Set to compile time
}
void loop() {
DateTime now = rtc.now();
lcd.setCursor(0, 0);
lcd.print("Time: ");
lcd.print(now.hour(), DEC);
lcd.print(":");
lcd.print(now.minute(), DEC);
lcd.print(":");
lcd.print(now.second(), DEC);
delay(1000);
}
Code Explanation
RTC Initialization: The DS3231 module is initialized using the RTClib library.
LCD Display: The I2C LCD module displays real-time clock data.
Time Adjustment: The RTC is set to the current compile time when the program is uploaded.
Loop Function:
Continuously reads the RTC time.
Displays the time on the LCD.
Refreshes every second to keep it updated.
PCB Design & Ordering from PCBWay
Conclusion
By following this guide, you can build a professional RTC Digital Clock using an Arduino UNO and an I2C LCD. This project provides a practical way to understand RTC communication, LCD interfacing, and relay control. Using PCBWay for PCB manufacturing ensures high quality and reliability. Happy DIYing!

DIY RTC Digital Clock with Professional PCB Design
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.

Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW
ESP32-S3 4.3inch Capacitive Touch Display Development Board, 800×480, 5-point Touch, 32-bit LX7 Dual-core Processor
BUY NOW
Raspberry Pi 5 7 Inch Touch Screen IPS 1024x600 HD LCD HDMI-compatible Display for RPI 4B 3B+ OPI 5 AIDA64 PC Secondary Screen(Without Speaker)
BUY NOW- Comments(0)
- Likes(0)

- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Estiak Khan
-
Make a 16-Channel Home IoT project using NodeMCU ESP32 WROOM Module If you're looking to build a versatile IoT device capable of controlling up to 16 appliances or devi...
-
DIY Pure Sine Wave Inverter Making At Home DIY Pure Sine Wave Inverter Making at Home Using EGS002 Module: A Complete GuideBuilding your own pu...
-
Build a MIND-BLOWING Mini Oscilloscope at Home with EST Projects Build a MIND-BLOWING Mini Oscilloscope at Home with EST ProjectsEver wondered how you can measure an...
-
Best IOT Project Making At Home using Microcontroller || PCBway https://www.pcbway.com/?from=technology4powerEvery electronic device needs PCBs. Are you looking for...
-
Universal Battery AutoCut Charge Controller with LCD - DIY at Home Are you looking to build a reliable and efficient battery AutoCut charge controller? Look no further...
-
PIC16F877A Trainer Board Build Your Microcomputer || Home-Made Microcontroller Master Trainer Tutorial Banglahttps://www.pcbw...
-
Autocut DC Mini IPS for DC 12V Load Autocut DC Mini IPS for DC 12V LoadIf you are looking for a reliable Autocut DC Mini IPS for DC 12V ...
-
Build a 12V Battery Autocut System with LCD Display Are you looking for an efficient and affordable way to protect and monitor your 12V battery system? ...
-
DIY Transistor Tester | Build Your Own LCR Meter at Home with Arduino Nano Are you fascinated by electronics and want to create your own tools for testing components? Building...
-
🎮 DIY Arduino Nano Snake Game Console with OLED Display DIY Arduino Nano Snake Game Console with OLED Display and ButtonsDo you love retro games? Want to bu...
-
DIY 150W IPS Making At Home with Auto Changeover System | Mini IPS 2025 How to Make an Automatic 150W IPS Using Two Circuit ModulesAre you looking for a reliable and effici...
-
DIY RTC Digital Clock with Professional PCB Design In this blog post, we will guide you through making a DIY RTC Digital Clock using an Arduino UNO and...
-
🚀 DIY Long Backup Mini DC IPS | Make at Home Using a UPS Transformer! 💡 DIY Long Backup Mini DC IPS | Make at Home Using a UPS Transformer! IntroductionBuilding a Mini DC I...
-
How to Make a Simple DIY Mini DC Automatic IPS at Home Looking for a reliable power backup solution for your DC appliances? Building a Mini DC Automatic IP...
-
DIY Easily Make a Universal Any Type of Battery Charge Controller At Home DIY Easily Make a Universal Any Type of Battery Charge Controller At HomeIf you’re into DIY electron...
-
Make a 16-Channel Home IoT project using NodeMCU ESP32 WROOM Module If you're looking to build a versatile IoT device capable of controlling up to 16 appliances or devi...
-
DIY Pure Sine Wave Inverter Making At Home DIY Pure Sine Wave Inverter Making at Home Using EGS002 Module: A Complete GuideBuilding your own pu...
-
Build a MIND-BLOWING Mini Oscilloscope at Home with EST Projects Build a MIND-BLOWING Mini Oscilloscope at Home with EST ProjectsEver wondered how you can measure an...
-
Best IOT Project Making At Home using Microcontroller || PCBway https://www.pcbway.com/?from=technology4powerEvery electronic device needs PCBs. Are you looking for...
-
Universal Battery AutoCut Charge Controller with LCD - DIY at Home Are you looking to build a reliable and efficient battery AutoCut charge controller? Look no further...
-
PIC16F877A Trainer Board Build Your Microcomputer || Home-Made Microcontroller Master Trainer Tutorial Banglahttps://www.pcbw...
-
Autocut DC Mini IPS for DC 12V Load Autocut DC Mini IPS for DC 12V LoadIf you are looking for a reliable Autocut DC Mini IPS for DC 12V ...
-
Build a 12V Battery Autocut System with LCD Display Are you looking for an efficient and affordable way to protect and monitor your 12V battery system? ...
-
DIY Transistor Tester | Build Your Own LCR Meter at Home with Arduino Nano Are you fascinated by electronics and want to create your own tools for testing components? Building...
-
🎮 DIY Arduino Nano Snake Game Console with OLED Display DIY Arduino Nano Snake Game Console with OLED Display and ButtonsDo you love retro games? Want to bu...
-
DIY 150W IPS Making At Home with Auto Changeover System | Mini IPS 2025 How to Make an Automatic 150W IPS Using Two Circuit ModulesAre you looking for a reliable and effici...
-
DIY RTC Digital Clock with Professional PCB Design In this blog post, we will guide you through making a DIY RTC Digital Clock using an Arduino UNO and...
-
-
-
-
Modifying a Hotplate to a Reflow Solder Station
1003 1 6 -
MPL3115A2 Barometric Pressure, Altitude, and Temperature Sensor
543 0 1 -
-
Nintendo 64DD Replacement Shell
443 0 2 -
V2 Commodore AMIGA USB-C Power Sink Delivery High Efficiency Supply Triple Output 5V ±12V OLED display ATARI compatible shark 100W
1272 4 2 -
How to measure weight with Load Cell and HX711
763 0 3