Accéder au contenu principal

How to simply use DS3231 RTC module with Arduino + OLED display



              Hello and welcome to this tutorial about DS3231 Real time clock module, and we gonna interface it with Arduino board, I’m using Arduino UNO as usual but today instead of the over-used (in this website/channel) LCD screen, I’m using 128*32 OLED display which is small and classy for little projects.



           Before continuing, you can check my previous tutorials and projects about another RTC module which is the DS1302 :

Or if you’re not familiar with the OLED display: Use OLED display + Arduino with examples


        If you checked my previous DS1302 tutorials or tested it, you gonna notice that it isn’t very reliable as a module and has few problems, like if you’re using it for a long time you will notice that the time is late by few minutes which is a big problem if you need precision in your projects, but don’t forget that it’s very cheap.

     But for the one I’m using today, it’s also a low cost module but it’s claimed to be « extremely accurate i²c module », and thanks to it’s oscillator which is « Temperature compensated crystal oscillator (TCXO) and crystal », also a good monitoring of the main power, when it goes off the battery automatically start to keep the time, and by my little experience with this module it’s very accurate a nice to use also don’t forget that it has a built in temperature sensor that can inform you of the ambient temperature which can come very handy in projects.








       Both modules use i²c bus so the SDA and SCL for both are on A4 and A5 pins on the Arduino Uno board, those pins have double terminals as you can see, then for power the RTC uses the 5V while the OLED uses the 3.3V.


Download Adafruit GFX library


The codes I’ve used are from the library examples : « Simple », « Dateformat » and « Temperature ».

The other ones that I’ve used for the OLED display: Download here (Don’t forget these codes don’t setup the date and time, so it’s better to run the « Simple » example first).


Hope you like it and if you have any problem contact me, and consider a subscribe to the channel 😉




Yassine Tout afficher

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

One thought on “How to simply use DS3231 RTC module with Arduino + OLED display Laisser un commentaire


Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:


Vous commentez à l'aide de votre compte Déconnexion /  Changer )

Photo Google

Vous commentez à l'aide de votre compte Google. Déconnexion /  Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

%d blogueurs aiment cette page :