Do It Yourself : Real Time Clock DS1307 connected on Arduino UNO | Step-by-step process | in Arduino IDE Dipslay

in #utopian-io8 years ago (edited)

Bonjour Steemians! Will give another shot on Do-It-Yourself methods. Steem On!

Time really matters! It is very essential to give it a shot on how we can display time on the real/standard time with the utilization of current's technology. With this tutorial, I will give you a fresh start on a component which is the RTC (Real Time Clock) DS1307 and how can it be connected to an Arduino UNO. So sit back and relax. Let us bring it on!

What is Real Time Clock (RTC) DS1307?

The Real Time Clock (RTC) is an important part of technology where you are keep on track with the current time (month, year or hour). It keeps running on a battery and keeps time for you notwithstanding when there is a power blackout. Utilizing a RTC, you can monitor long courses of events, regardless of whether you reinvent your microcontroller or detach it from USB or a power plug.

image.png

photocredits

In addition, the DS1307 which was referred on the chip is the Integrated Circuit (IC) present on the chip. Where it acts as what was described. We can also other IC which collaborates with the same function as DS1307.

-Why use Real Time Clock in connecting to Arduino?

As we define the Real Time Clock and even on the name it suggests, it can be deciphered that it is useful when we need a real time display. The Arduino itself can display its time by millis() yet when we stop utilizing the Arduino, then the time will reset and back to zero. Hence, if you wanted to have a real time display then it will suit your standards.

Moreover, on this tutorial, I will give a step by step process on the connections on the two boards with the program itself.

Materials Needed::

  • Real Time Clock (RTC) DS1307
  • Arduino UNO
  • Breadboard (just optional - in case you are not yet confident on the direct connection then use a board for a sure support)
  • coin cell / CR1120 (3V battery)
  • laptop/computer with Arduino IDE

Arduino UNO and RTC DS1307 pin configurations

ARDUINO UNO

image.png

photocredits

On this board, we will be using the highlighted area where:

  • GND and VCC for the ground connection (completion of a closed circuit) and for power supply, respectively.
  • A4 and A5 for the connection to the RTC DS3107
Important points : Of course connect the Arduino UNO on the 5V input to drive the board. I only present the pins which is physically connected on the RTC DS1307.

REAL TIME CLOCK (RTC) DS1307

image.png

photocredits

On this chip/board, we will have the following pins:

  • GND and VCC for the ground connection (completion of a closed circuit) and for power supply, respectively.
  • SDA and SCL for the connection to the Aduino UNO Board.

Real Time Clock(RTC) DS1307 :: Step-by-Step process on connecting to the Arduino UNO Board

Step 1 :: the PHYSICAL CONNECTION between the RTC DS1307 and Arduino UNO

image.png

photocredits

The connections must be followed :

  • VCC and GND pin of Arduino UNO must be connected to the VCC and GND pin of the RTC DS1307 , respectively.
  • SCL (Serial Clock) must be connected to the A5 pin on arduino.
  • SDA (Serial Data) must be connected to the A4 pin on arduino uno.
Step 2 :: the SOFTWARE CONNECTION between the RTC DS1307 and Arduino UNO
  • Go your Arduino IDE and change your board to Arduino UNO by the following steps : Tools>Board>Arduino/Genuino UNO

  • After which, download the library we will be using later on. Go to Sketch > Include Library > Manage Library

    image.png

    Check your library after to see if it was really successfully installed
    image.png

  • Copy the code shown on the image below. (You may neglect the comments)

    image.png

  • The result on your com port window must be this.

    image.png

Sample Circuit ::

image.png

photocredits

Further notes :: You may encounter along the way different packaging with the RTC DS1307 (module), well, do not panic for its the packaging only differs. The pins that we used in this tutorial is common with all RCT DS1307, hence, just follow the connection given.



This is an Engineering DIY post. You may comment down and ask for more DIY topics, be more than happy to post it for you :D For queries/clarifications, you may DM me on my discord or on the steemit.chat @leryam12.

ENJOY AND HAVE A GREAT LIFE AHEAD

Bidding a goodbye, See you then :)

UPVOTE, RESTEEM AND FOLLOW

@leryam12



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for your post!! Will use this info very soon ahah!!!

Very informative tutorial @leryam12. Keep it up!!!

Thank You @japh. I am hoping that this will be helpful.

Good Post....Keep it up!

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

great post @leryam12 :) keep it up!

So interesting 😉 check my channel and see my food posts 🙏💘 if you can vote on my posts 🙏

Hi @aleevillafranca , Thank you so much for your commendment. I will surely visit your blogs :D

Hey @leryam12 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • This is your first accepted contribution here in Utopian. Welcome!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

This post has received a 0.12 % upvote from @drotto thanks to: @banjo.