arduino with a ds1307 rtc and lcd display brands

you can use the basic structure of this project. We have already made various Arduino projects, Embedded projects, and Arduino tutorials on our website. You can visit them if you are new to the world of electronics and Arduino.
to display the time. You can make an Automatic pet Feeder, Automatic Light, time-based plant watering system, and much more using this. This reduces the manual stress on us.
the module is capable of counting seconds, minutes, hours, days, weeks, months, and years. Arduino uses the I2C communication protocol to send data to the LCD display,
which we are using here to display the time. The display updates every second to tell the most accurate time since the module is much accurate to tell the time.
The module is capable of running for more than 5 years continuously without affecting the count in time. this is possible because of the in-built cell.
the most professional PCB manufacturer for prototyping and low-volume production to work with in the world. With more than a decade in the field, PCBWAY committed to meeting the needs of customers from different industries in terms of quality, delivery, cost-effectiveness, and any other demanding requests. As one of the most experienced PCB manufacturers and SMT Assemblers in China, we pride ourselves to be your best business partners as well as good friends in every aspect of your PCB needs. They strive to make your R&D work easy and hassle-free.
NOTE- You need to install the three libraries LiquidCrystal_I2C.h, Wire.h, and DS1307.hwhich can be downloaded from HERE into your Arduino IDE before uploading the code.
Once the uploading of code is complete, LCD Display will be able to show the Time as per the code uploaded. I hope you found this guide helpful in making the project. If you have any doubts, you can put them in the comment section below.

In this project I have created a digital clock. we can watch the current date and time on the lcd display this project uses DS1307 based RTC module to to maintain the time and date value.
this module is build around DS1307 chip which is a real time clock that means we can get hour, second, minutes, day, date, month and year value fromitthis module require external power source so that it can power the module during power failure so if we remove the power supply of our clock it would not lost its time for this we uses a 3V li-ion battery this module support I2C (two wire interface) to talk to master device Like Arduino in this case once we store the current time value of second hour minute day date month and year into their corresponding registers and and then ds1307 maintains the time and updates the register values to know more about ds1307 you can have a look at he datasheet ds1307 stores the data in BCD(binary coded decimal) format
to display time and date I have used used 16*2 lcd because it is easy to control it by Arduino in comparison to 7 segment display we can interface with lcd by the help of LiquidCrystal library of arduino
these resistors are necessary for I2C interface because I2C devices have open collector configuration these pullup resistors pull the SDA and SCL line high

Now that I look again, you are right... BUT.. the actual address is 0x3F! I"m not sure that makes sense either but because I believe the lowest bit is considered the R/(not)W bit. Since its a write only device, I"d think it should be ox3E if anything, but that"s the address needed, so I guess the LCD library I"m using overrides the low bit. And now that you mention it, I see that the board does have places for jumpers (or zero hom SMD parts) to further configure the address. It means I can now drive multiple displays (up to 8) if I even needed to.
Very interesting Thanks! So the likelihood of two devices with completely different purposes using the same addess range is fairly low, and like my DS1882 audio pot chips, they will usually allow the user to configure 3 bits within the lower nibble of the address.
For an i2c based clock/RTC module would use a DS3231 instead of a DS1307. The price is about the same and it is much more accurate. DS3231 modules on ebay (starting at just under $1.50 USD shipped) are cheaper than the price shown on that link you provided to the DS1307.
You do need to be careful with most of these low cost RTC modules in the they have a little charging circuit on them for using with a LIR2032. If you use a 2032 instead, you should cut a trace on the module to disable the charging circuit.
Well that one I linked seems very convenient, and I probably wouldn"t need even 1/10th of it current functions. But I"ll investigate the S3231 too! For my projects, I just need a way to re-set the time if power has been lost for a while. Currently I detect eminent power fail, save the current time in EEprom, and retrieve it on power up. This is just to survive very typical power losses that only last minutes, without resetting to a stupid time like 12:00AM like most household devices do. But I"ll never need millisecond accuracy for any current projects.
And yes... I"ve been meaning to check out those nifty esp8266 modules too, for other projects. I was wondering though (even though its another subject), can they be used without coding them, just using external commands? I"m thinking of the major hassles and expense getting any kind of FCC approval, should I ever use such a module in a product. From my research, if a module has already passed FCC muster with its existing code, and you don"t alter its code, you may have a slightly cheaper path to approval.

Hi, and welcome to this tutorial, it’s about another RTC (Real Time Clock) module, it’s the DS1307, previously I did a tutorial about the DS1302, and a project where I set it up using a keypad, then an Alarm Clock project based on that module, I also did a tutorial about the DS3132.
But today we’re about the DS1307, and I’m gonna use it with Arduino UNO board and I’ll also use a LCD i²c screen and OLED display, to show time and date in different formats.
“The DS1307 serial real-time clock (RTC) is a lowpower, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM. Address and data are transferred serially through an I2C, bidirectional bus. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year.”
OLED libraries: – Download here Adafruit OLED SSD1306 library – Download here Adafruit GFX Library
Important !! First time you must wire the module and upload the “SetTime” example, it sets the module to the compiling time of the code which is technically your real time and date.
N.B: If you are testing the module with multiple things it’s better to close the “SetTime” example, open it again and upload to the board, otherwise your module will be programmed with the first time the “SetTime” example was compiled, and you may think that your module doesn’t work well !!

Antigua and Barbuda, Aruba, Australia, Austria, Bahamas, Bahrain, Bangladesh, Barbados, Belgium, Belize, Bermuda, Bolivia, Brazil, Brunei Darussalam, Bulgaria, Cambodia, Canada, Cayman Islands, Chile, China, Colombia, Costa Rica, Cyprus, Czech Republic, Denmark, Dominica, Dominican Republic, Ecuador, Egypt, El Salvador, Estonia, Finland, France, French Guiana, Germany, Gibraltar, Greece, Grenada, Guadeloupe, Guatemala, Guernsey, Honduras, Hong Kong, Hungary, Iceland, Indonesia, Ireland, Israel, Italy, Jamaica, Japan, Jersey, Jordan, Kuwait, Latvia, Liechtenstein, Lithuania, Luxembourg, Macau, Malaysia, Maldives, Malta, Martinique, Mexico, Monaco, Montserrat, Netherlands, New Zealand, Nicaragua, Norway, Oman, Pakistan, Panama, Paraguay, Peru, Philippines, Poland, Portugal, Qatar, Republic of Croatia, Reunion, Romania, Saint Kitts-Nevis, Saint Lucia, Saudi Arabia, Singapore, Slovakia, Slovenia, South Africa, South Korea, Spain, Sri Lanka, Sweden, Switzerland, Taiwan, Thailand, Trinidad and Tobago, Turks and Caicos Islands, United Arab Emirates, United Kingdom, United States, Vietnam

DS1307 with 8051 Development Board buy including USB Programmer, Li(Lithium) 3V Coin Battery,16×2 LCD Display,On-Board MAX232, and AT89S52 Microcontroller IC
DS1307 with 8051 Development Board Buy from India to learn How to interface RTC DS1307 with 8051 Project Kit & display real-time cloak, alarm on 16×2 LCD. Real-Time Clock RTC DS1307 interfacing with 8051 Microcontroller can be executed using I2C or IIC Serial Protocol. it also supports All Digital Microcontroller such as Arduino, 8051, PIC, AVR, PIC, ARM, MSP, COP8, STM.8051 Development Board with LCD Project Kit Support AT89S51, AT89S52, P89V51RD2, etc. 40-Pin DIP Chip.USB Programmer can be used for both 8051-AVR IC (2in1).16×2 LCD Display has Yellow Back-light.
If you are learning microcontroller programming and want to make a project based on 8051 microcontrollers then this DS1307 with 8051 development board buy online with LCD and
First of all 16×2 LCD is a basic 16 character by 2 line display Yellow/Green Backlight. Utilizes the extremely most common HD44780 parallel interface chipset (datasheet). Even more, it has JHD162A Compatible Pin-out Diagram, so the Command Interface code is freely available. Finally, You will need 7 general I/O pins (If used in 4-bit Mode) to interface to this LCD screen. it also includes an LED backlight. Learn How To Interface 8051 Development Board with LCD 16×2 Display using 8051/AVR USB Programmer for Burn/Flash Hex File into Atmel AT89S52 Microcontroller. The hobbyist can learn the interfacing of DS1307 with 8051 Development Board Buy along with 16×2 LCD.
Features of 16×2 Display LCD:Commonly Used in Student Project, College, copiers, fax machines, laser printers, industrial test equipment, networking equipment such as routers and storage devices
This is the DS1307 Real Time Clock (RTC) Module, this small breakout board that uses the most popular DS1307 to keep track of the current year, month, day as well as current time. The module comes fully assembled and includes a small Lithium coin cell battery that will run the RTC for a minimum of 9 years without an external 5V Power supply. The DS1307 RTC is accessed via I2C Protocol. Finally DS1307 with 8051 Development Board Buy online is the easiest way for Electronics engineers to collect necessary components in a time-efficient way.
USB AVR and AT89Sxx ISP (In System programming) Programmer is a low-cost USB-based programmer. Because it is ISP, so there is no need to take out the target microcontroller from the development Board. This programmer will work with a wide variety of Atmel AVR and also AT89Sxxxx microcontroller. This is quite compact, but the design is really elegant. Even more, The USB interface is achieved by using an atmega8 processor, and the rest is done in firmware.USB Programmer is used to loading Hex file, for example, suppose interfacing code Hex file of DS1307 with 8051 Development Board Buy with 16×2 Lcd and ISP Programmer.
Download Link:(All in 1 RAR file) For How to install driver | Circuit Diagram | Connection | Program 8051 AVR Microcontroller | Driver For All Windows OS 64-bit & 32-bit

The Arduino is an amazing device. It’s useful for prototyping and can also be used to construct a complete project. It has an analog to digital converters (ADC), digital I/O pins, it handles interrupts and it can communicate via a serial port, SPI, and I2C.
A “real time clock” is essentially a digital clock whose output can be read by a computer or microcontroller. It has its own oscillator that it uses to count time and it has registers that allow you to set the current time and date.
The device you are using to read this article likely has a real time clock and if you are attached to the Internet you probably are synchronizing this to a network time server (if your device is a phone it may be time synchronized to your telephone companies carrier signal instead).
Unix time is the number of seconds that have elapsed since midnight January 1, 1970 (which was a Thursday if you’re interested). If you are on Linux (or at the terminal on a Mac, which uses Unix as its underlying operating system) you can type “date +%s” to get the current Unix time.
Unix time is useful when you are writing a program that needs to calculate the time difference between two dates and times, as it involves simple addition and subtraction, without having to worry about days, months and years.
The issue with leap seconds is generally taken care of by synchronizing your real time clock with a local or network time source, which itself will have compensated for leap seconds.
The problem with 2038 is likely to be resolved within the next 19 years, I suspect just shifting to a 64-bit standard would resolve this for several millennia!
One chip is theDS3231, a highly accurate real time clock that uses an I2C interface. This chip has its own internal crystal oscillator, so no external crystal is required.
Another very popular chip is theDS1307. Like the DS3231 it also communicates using the I2C bus, however, this chip requires an external timing crystal.
The board contains the DS1307 chip and all the support electronics, including the timing crystal. It also has a battery holder for a coin cell, this sits underneath the board.
If you order your Tiny RTC online from an overseas source it likely won’t have the battery installed, this is due to international shipping regulations regarding lithium batteries. The module uses a widely available coin cell battery.
As the Tiny RTC uses the I2C bus it is very easy to hook it up to an Arduino. The I2C bus provides power, clock and data signals, so only four connections are required.
Before you hook up your real time clock module it would be a good idea to install the coin cell battery, if you haven’t already. That way you will ensure that the device will keep time even after you power down the Arduino.
Some Arduino clones also have separateSDAandSCLpins, usually located on the same side as the digital I/O pins above theAREFpin. You can use these connections instead of the analog pins if you wish, they are actually just duplicates.
There are several libraries available that will work with the Tiny RTC. I’m going to use two libraries that were contributed by Paul Stoffregen, a well-known figure in the Arduino community.
The Arduino Library Manager can be also used to install two updated versions of these libraries, these were updated by Michael Margolis. You can find them as follows:
Once you have the libraries installed open your Arduino IDE and select theFilemenu item and selectExamples. A sub-menu will appear, scroll down until you get to theExamples from Custom Librariessection.
As you might have guessed from its name theSetTimesketch sets the time on the Tiny RTC module. You’ll need to run this, or something similar, before you can use the clock.
SetTime uses two functions, getTime and getDate, to retrieve the time and date respectively from your computer clock. As most Internet-connected computers synchronize to a network time protocol (NTP) server this will probably be very accurate.
Without using a data structure the time will be reported in Unix time, which I described earlier. ThetmElements_tdata structure breaks this down into elements like seconds, minutes, hours, days, months and years.
Otherwise, the sketch is fairly straightforward. It gets the current system time from the computer running the IDE and writes it to the DS1307 chip on the Tiny RTC module. It does all of this in the Setup section so there is no code in the loop.
We start by including the Wire library, which is the built-in library that facilitates communications using I2C. We then include the two libraries we installed earlier.
Al that is left is to read those time values and print them to the serial monitor. A function calledprint2digitsis used for the hours, minutes and seconds to format the display nicely, with leading zeros for numbers below 10.
The two sketches we have just looked at illustrate how to set and read the time from the Tiny RTC module, and they accomplish this very well. But the module has an additional function, the ability to output a square wave.
You can use this square wave as a timing source for another circuit. It could be used to drive a stepper motor to create an analog clock. And, as I will show you here, it can be used to generate an interrupt for your Arduino.
These frequencies are selected by writing to an internal control register in the DS1307. By default, the device is programmed at the factory for a 32 KHz frequency.
To use the square wave output as an interrupt for your Arduino you will need to connect the SQ output on the Tiny RTC module to one of the interrupt pins on the Arduino.
An LED is also connected to the Arduino to indicate when an interrupt is being serviced. This is actually optional as it is connected to pin 13 and the Uno also has a built-in LED connected to that pin. If you wish you can leave it out and just monitor the LED on your Uno board.
I found a great sketch that shows how to use the square wave output, it was originally published by Robert Ulbricht on theArduino Slovakia website. Fortunately, there is an English translation available.
The functionsetSQWis really where the “action” is. This function writes to the control register in the DS1307 and sets the square wave frequency to 1Hz.
ThehandleIntfunction is the interrupt handler. Every time a pulse is received on the D2 pin it will be called. This is set up in the Setup function using theArduino attachInterrupt function.
The previous sketch illustrated how to use the SQ square wave output from the Tiny RTC module as an interrupt. And while it does a great job of displaying interrupt operation it really doesn’t have many practical uses.
After all, there are many simpler methods of blinking an LED. In fact, if you really wanted to use the Tiny RTC to blink an LED you could just attach it directly to the SQ output, eliminating the Arduino entirely (although you’d need the Arduino to set the SQ output to 1Hz first).
Take another look at theReadTestsketch from the DS1307RTC examples. You’ll notice that it reads the time and then adds two delays that total exactly one second. It then does it all over again.
If you’re just building a clock this will work well, as every second you’ll read the time and it will have advanced one second. But what if you want to do something else in the Loop after you read and display the time?
If the ”something else” takes less than a second then you’ll be displaying the same time more than once. On a display like an LCD or OLED this is not such a bad thing as you might never notice it, but on the serial monitor it will stand out.
If the “something else” takes more than one second you’ll miss reading the clock and it wil skip one or more seconds. You can alleviate this problem somewhat by simply not displaying seconds but still, your minutes may not change at precisely the right time.
To illustrate how to take advantage of interrupts to solve the timing problem I’m going to build a temperature and humidity meter that can also tell time. I’m going to stick to the serial monitor for my display, but you could easily modify the code to use an OLED or LCD display.
The AM2320 is an I2C temperature and humidity sensor. Physically it looks identical to a DHT11 or DHT22, the difference is that it uses the I2C bus to send data to its host.
If you wish you could modify the sketch to use the DHT22 or DHT11, I used the AM2320 because I was already using I2C for the real time clock and because I had one handy!
No matter which sensor you choose for your design you’ll encounter the same dilemma – these temperature and humidity sensors require at least two seconds between readings to stabilize. And so if you read it in the Loop you’ll get an erratic display.
You’ll need another couple of libraries to run this sketch to handle the temperature and humidity sensor. Both can be installed using the Library Manager.
The latter library is not called directly in the sketch, instead, it is used by the AM2320 Library. Without it installed your sketch will fail to compile.
Next, we create a couple of variables that count “ticks”. I’m defining a “tick” as a one second period. Theold_tick_valuevariable will be used to check if the tick value has changed since we last used it.
In the Setup routine we attach the interrupt to the interrupt handler, as we did earlier. I kept the same name for the interrupt handler but have changed its function.
Next we initialize the temperature and humidity sensor, delay for two seconds and then read the temperature and humidity values. This is so we already have a first reading before we enter the loop.
TheprintCurrentTimefunction prints the time, date, temperature and humidity to the serial monitor. It takes the temperature and humidity as an input and reads the real time clock, it then writes everything to the serial monitor.
In the Loop we first check the number of ticks by reading the tick count. If it is 10 then we read the humidity and temperature, then reset the tick counter to zero.
By doing this we only read the temperature and humidity sensor every 10 seconds, which gives it plenty of time to stabilize. You can reduce this number if you wish, but don’t go below two seconds.
We then check to see if the tick count is the same as it was before. If it is then we don’t do anything. If it isn’t then it means a second has elapsed, so we callprintCurrentTimeto read the time and write everything to the serial monitor.
Load the sketch and give it a test. Note that since the temperature and humidity are only updated every 10 seconds it won’t immediately respond to a change in these values. In normal situations this shouldn’t really be an issue.
Adding a real time clock to an Arduino makes it possible to build devices that are aware of the current time and date. This can allow you to create fancy timers and delay circuits, or just build a really cool and unique digital clock.
A Real Time Clock can be added to your Arduino project in order to tell the time. Today I will show you how to use the Tiny RTC, a real time clock based upon the popular DS1307 chip.

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this tutorial will not work! If you have not done follow the steps in this tutorial to setup the Arduino IDE to program Arduino UNO! The Visuino:https://www.visuino.eualso needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
Double click on "Display1" component and in the "Digits" window drag "Text Display 7 Segments" to the left sideOn the left side of the "Digits" window select "Text Display 7 Segments1" and in the properties window set "Count Digits" to 4
Double click on "FormattedText1" component and in the elements window drag 2x "Text element" to the left side, for both set in the properties window "Length" to 2
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download ithereand open it in Visuino:https://www.visuino.eu

So I have this Arduino program wherein the goal is to display the real time (based on my computer) on the LCD display. I have properly configured the time and date but the only remaining issue is I am not sure how to let the program properly indicate if it"s PM or AM. Here"s the code so far:

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

This is what is known as a Real Time Clock (RTC) module and can be used with any Arduino so that it can tell time. The Arduino does not have a RTC on board and therefore can not tell time for an extended period of time with any accuracy. When the Arduino does tell time it uses an internal counter to calculate an amount of elapsed time, this is inaccurate, limited (the clock can only count so high), cannot be related to the real time (i.e. the time on your watch), and is reset every time the Arduino is reset. The RTC allows you to create projects that are time dependent such as automating your coffee maker to make coffee at a set time of the day. It can also be used to create a clock in any of your Arduino projects such as an Arduino with an LCD display showing the values of various sensors.

DS3231 RTC chip is more accurate than DS1307 and also has a built-in temperature sensor. It keeps the time running even when the main power source is down. It uses the I2C interface to communicate with the master device (microcontroller), in this case the Arduino.
DS3231 and SSD1306 OLED share the same I2C bus, but the microcontroller can communicate with only one of them at a time, depending on the address sent. The DS3231 RTC address is 0×68, and the SSD1306 OLED address is 0×3C.
Circuit diagram of the Arduino real-time clock with temperature display is shown in Fig. 3. It is built around Arduino Uno (Board1), 5V regulator 7805 (IC1), 2.4cm SSD1306 OLED display (DIS1), DS3231 RTC module (RTC1), and a few other components.
OLED (organic light-emitting diode) is a flat light emitting device developed with organic thin films that are connected in series between two electric conductors. The OLED display used in this project is shown in Fig. 4. It has improved image quality, full viewing angle, high brightness, better contrast, wide colour range, and low power consumption. It is more efficient and reliable as compared to a simple LCD display.
It is mainly used in such digital display devices as computer monitors, mobile phones, hand-held video games, and television screens. It is easily available in the market as well as online stores.
The display module connects to Arduino using four wires—two for power and another two for data— making the wiring very simple. The data connection is based on the I2C (inter-integrated circuit) interface, which is also known as TWI (two wire interface).
The DS3231 module is a low-cost, highly accurate real-time clock that can maintain time in hours, minutes, and seconds as well as the day, month, and year information. It has automatic compensation for leap years for and months with less than 31 days.
The module can work on either 3.3V or 5V, which makes it suitable for many development platforms or microcontrollers. The battery input is 3V, and a typical CR2032 3V battery can power the module and maintain the information for more than a year. The DS3231 module (front and back) used in this project is shown in Fig. 5.
The I2C communication protocol used in the module makes connections to the Arduino board very easy. All we need are four pins: VCC and GND pins for powering the module, and SDA and SCL pins for I2C communication.
The regulated power supply is designed with a full-wave rectifier built around 1N4007 diodes (D1 and D2), two capacitors (C1 and C2), 5V voltage regulator 7805 (IC1) and 230V AC primary to 12V-0-12V, 500mA secondary step-down transformer (X1). In the project, two power supplies are required: 12V DC for Arduino Uno power jack, and 5V for DS3231 RTC and SSD1306 OLED module.
The heart of the project is the Arduino Uno R3 board, which is based on ATmega328/ATmega328P microcontroller. It has 14 digital input/output (I/O) pins, six analogue inputs, 32k flash memory, 16MHz crystal oscillator, USB connection, a power jack, an ICSP header, a reset button, among others. It can be programmed using Arduino IDE software.
In the circuit, there are two push buttons: S1 for setting and S2 for mode change. These are used for setting the time and date of the real-time clock. The ground connection of Arduino needs to be connected to ground connections of RTC1 module and display DIS1 module.
After making all the connections, test the working of the circuit by pressing the mode button (S2), and then release it. The cursor on display will flash on the day-of-week field. Press and hold the set button (S1) to advance the day of the week to the next day at 5Hz rate, or do a short press to advance to the next setting.
Press and release the mode button (S2) to advance the cursor to the month field. Press and hold the set button (S1) to scroll through the months quickly, or do a short press to advance to the next setting. Press and release the S2 button to advance the cursor to the date field. Press and hold the S1 button to scroll through the dates quickly, or do a short press to advance to the next setting.
Note that the RTC chip knows the correct number of days in each month. Press and release the S2 button to advance the cursor to the year field. Press and hold the S1 button to scroll through the years quickly, or do a short press to advance to the next setting. Valid ranges are 2000 to 2099. The RTC chip keeps track of leap years automatically. When you first power up the clock, the date will be January 1, 1900. Just advance the year to the correct value.
Press and release the S2 button to advance the cursor to the hour field. Press and hold the S1 button to scroll through the hours quickly, or do a short press to advance to the next setting. The clock uses only 24-hour mode in the project. Press and release the S2 button to advance the cursor to the minutes’ field. Press and hold the S1 button to scroll through the minutes quickly, or do a short press to advance to the next setting. Press and release the S2 button to advance the cursor to the seconds’ field. Press S2 button momentarily to reset the seconds to zero, or hold the button to freeze the seconds at zero and release to synchronise with an external time source. DS3231 RTC chip has an inbuilt temperature sensor.
Circuit operation is controlled by the software program (main_code.ino) loaded into the internal memory of Arduino Uno. The program implements all the required functionalities.
The program/sketch is written in the Arduino programming language. Arduino IDE version 1.8.11 is used to compile and upload the program to the Arduino board.
#include
#include
#include
The Arduino code (main_code.ino) requires two external libraries: Adafruit-GFX-Library-master.zip and Adafruit_SSD1306-master.zip. You need to include them in Arduino IDE before compiling and uploading the code to the Arduino board.
After assembling the circuit on the PCB, connect Arduino Uno pins to PCB using jumper wires. Do not forget to upload the source code into the Arduino Uno board before wiring. The circuit works with 230V AC mains using the transformer (X1), as shown in the circuit.
Dr K Sarat Kumar is a professor at KL University. He is also one of the technical members from KL University, providing technical support on RF antenna designs to NARL (National Atmospheric Research Laboratory). He has 22 years of work experience in RF antenna designing, testing and simulation in a real-time environment.

A digital clock is a great invention in electronics science. Nowadays, digital clocks are used everywhere. The analog clocks are quite old-fashioned. So the digital clock takes its place day by day. The Arduino digital clock is looking very modern. It has many additional features also like temperature, alarm, timer, etc.
In this electronics project, we are going to build an Arduino digital clock with or without an RTC (Real Time Clock) module. The first circuit represents without RTC module and the second circuit represents with RTC module. The components we used in this project are quite basic and a little expensive. The circuit connection is very easy.
We build this digital clock with an Arduino, RTC module, and LCD display in this project. Here the clock we made is 24 hours clock. This means the time shows by the clock is 00.00 AM to 23.59. After 23.59 it resets to 0 again.
Arduino is one of the most popular electronics prototyping boards based on the ATmega328P microcontroller. ATmega328P is an AVR architecture based 8-bit microcontroller. Here I am using Arduino Nano for this project to give it a compact look.
A 16×2 LCD display is the most commonly used display unit for microcontroller-based applications. It supports 16 characters in a row with two such rows. It also supports special characters and even custom characters.
I2C Module has an inbuilt PCF8574 I2C chip that converts I2C serial data to parallel data for the 16 pins LCD display. It is currently available with a default I2C address of either 0x27 or 0x3F. With this I2C LCD module, we can able to show data via only 2 wires that are SDA and SCL pins.
The DS1307 real-time clock (RTC) is a low power, full binary-coded decimal (BCD) clock plus 56 bytes of NV SRAM. Address and data are transferred serially through an I2C bus. This clock provides seconds, minutes, hours, days, dates, months, and years.
A serial I2C bidirectional bus made a communication between the Arduino and the DS1307 RTC module. The I2C protocol is a technique for communicating a faster device (master mode) and a slower device (slave mode).
To make the circuit compact and give a professional look, I have designed the PCB after testing all the features of the Arduino Digital Clock Circuit PCB on the breadboard. I will explain in detail how we can design and order PCB for our project.
This project is sponsored by PCBWay.com. PCBWay is a Chinese-based PCB (printed circuit board) prototype, PCB assembly, SMD Stencil, and Flexible PCB manufacturer. They ship to more than 170 countries worldwide and process more than 2100 PCB orders a day. It feels like PCBWay gives an excellent price and customer service factor in one single serving. The quality of the PCB is awesome and its thickness is really great. What is also spectacular about PCBWay to me, as a maker and customer, is their service. From their friendly support staff to their intuitive, user-friendly website features, it all counts towards what makes PCBWay an ideal company and brand for any electronic hobbyists In this article, I will state that how can we order PCB from PCBWay with step by step guide.
They are not only producing FR-4 and Aluminum boards, but also advanced PCB like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price.
SMT & THT assembly starts from only $30 with a free stencil and free worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.
With a real-time clock module, this circuit is working in automatic mode. Although we can manually set the time as our requirements through Arduino code. As we say that this is an automatic clock so the system can set time and date itself like a computer.
First of all, connect all two push buttons’ any one terminal to the ground. Then other terminals of the two buttons are connected to analog pins D8 and D9 of the Arduino respectively.
To make the circuit compact and give a professional look, I have designed the PCB after testing all the features of the Arduino Digital Clock on the breadboard. I will explain in detail how we can design and order PCB for our project.
The first button is for setting up the hour by sending a signal to the D8 pin. The second button is for setting up the minutes by sending a signal to the D9 pin of the Arduino.
The whole circuit is working as a continuous sequence. When the power goes out, the circuit will reset to its initial position. Then we need to again set the time via the push button. So this is a major drawback for this circuit.
For this project, it needs to set the real-time into Arduino code when uploading. But after that, we need not set the time every time when better die. Just remove the old battery and put the new one that’s it.
Yes, there is a few Arduino real-time clock (RTC) libraries in the library manager of the Arduino IDE software. These help to compile Arduino code and upload it into the Arduino board.
To make this clock is too easy. But the only drawback of this clock is when the power cut down, we need to set the time again from the beginning. To build this clock go to this blog and check out the second circuit.
The main purpose of using an RTC or a real-time clock is to provide a precise time and date which is very accurate. RTC is an electronic device in the form of an Integrated Chip (IC) available in various packaging options. It is powered by an internal lithium-ion battery.
An RTC maintains its clock by counting the cycles of an oscillator (32.768KHz Crystal Oscillator) circuit, an internal capacitor-based oscillator, or even an embedded quartz crystal. Some RTCs maintain the oscillator setting at the last known point before it went out of the lock with the power input.
Ms.Josey
Ms.Josey