Introduction: Real Time Clock : Arduino UNO + DS1302 Rtc Module + Buzzer + LCD 16x2 I2C

About: Welcome to School Sur Seine !! Here, we offer step by step tutorials using the Arduino UNO development board, and sometimes we make little projects that combine multiple modules, sensors, motors, and other com…

In this project, the DS1302 (real time clock) module has been used to get the time, the 16x2 LCD screen to display it and the buzzer to make a sound every hour. 

To keep track of time even if the main power source is removed, the DS1302 has a backup battery mounted at the back of the module. The chip automatically switches between main and backup power sources when necessary.

---------------------------------------------------------------------------------------------------------------------------------

Dans ce projet, le module (horloge en temps réel) DS1302 a été utilisé pour obtenir l'heure actuelle, l'écran LCD 16x2 pour l'afficher et le buzzer pour émettre un son chaque heure.

Pour garder une trace du temps même si la source d'alimentation principale est retirée, le DS1302 dispose d'une batterie de secours montée à l'arrière du module. La puce bascule automatiquement entre les sources d'alimentation principale et de secours si nécessaire.

Supplies

-----------------------------------------------------------------------

  • Arduino UNO development board
  • USB 2.0 cable type A/B
  • Breadboard
  • LCD 16x2 I2C
  • Real time clock DS1302
  • RC2032 battery
  • Buzzer module MH-FMD
  • Câbles

-----------------------------------------------------------------------

  • Carte de développement Arduino UNO
  • Câble USB 2.0 type A/B
  • Platine d'essai
  • LCD 16x2 I2C
  • Horloge en temps réel DS1302
  • Pile RC2032
  • Module buzzer MH-FMD
  • Câbles

----------------------------------------------------------------------

Step 1: Circuit Diagram / Schéma

The circuit diagram is made using : thttps://www.tinkercad.com/

------------------------------------------------------------------------------------------

Le schéma est réalisé via : thttps://www.tinkercad.com/

Step 2: Librairies / Bibliotèques

For this project, you will need two libraries:

  • the first one (for the LCD Display), you can find it in the "Library Manager" : go to the top menu of the Arduino IDE then click on Tools => Manage Librairies, then type LiquidCrystal in the search bar then choose the library schowen in the picture above then click on "Install".
  • the secod one (for the real time clock DS1302), you will find it here : http://www.rinkydinkelectronics.com/library.php?id=5 you need to download the file DS1302.zip. Once the Zip library has been downloaded, import it within the Arduino IDE. To do this, go to the top menu, then click on Sketch => Include Library => Add .Zip Library. Then, find the Zip file in the folder in which you downloaded it, then select the Zip file and click on "open".

----------------------------------------------------------------------------------------------------------------------------------

Dans ce projet, vous aurez besoin de deux bibliothèques:

  • la première est pour l'afficheur LCD, vous pouvez la retrouver dans le "gestionnaire de bibliothèque" : allez au menu du haut de l'IDE Arduino, cliquez sur Outils => Gérer les bibliothèques, ensuite tapez LiquidCrystal dans la bare de recherche ensuite choisissez la bibliothèque indiquée sur la figure ci-dessus et au final cliquez sur "Installer".
  • la deuxième est pour l'horloge en temps réel DS1302, vous allez la retrouvez ici : http://www.rinkydinkelectronics.com/library.php?id=5 , téléchargez le fichier DS1302.zip. Une fois c'est fait, importez le dans l'IDE Arduino. Pour cela, allez au menu du haut, ensuite cliquez sur Croquis => Inclure une bibiothèque => Ajouter la bibliothèque .zip. Ensuite, trouvez le fichier .zip dans le dossier où vous l'avez téléchargé, ensuite sélectionnez le fichier .zip et cliquez sur "ouvrir".

Step 3: Source Code / Code Source

Step 4: Video / Vidéo