RV3028 — Ultra Low Power RTC Library
RV3028 is an Arduino library I wrote for the Micro Crystal RV-3028-C7 real-time clock (RTC) module, focusing on low power consumption and high accuracy. It was designed to reliably maintain date-time information with ultra-low consumption, especially in battery-powered IoT projects in embedded systems.

Obtaining a free developer kit for RV3028 is quite a simple process. After entering Micro Crystal's official RV-3028-C7 product page, you can access the sample request form through the "Free Samples" link in the table. When the form opens, there is a checkbox at the top stating that the products will not be re-exported to Russia; you need to check this box to proceed. Then you have the right to select up to three products. In my own application, I chose RV-3028-C7 and RV-3028-C8 models. When you mark the Demo Board option as "Yes", the development kit is also sent; you can also request five chips by marking the "5 pcs Sample" section as "Yes". In the usage area section, I selected "Consumer", and in the target application section, I chose "Home Automation". In the description field, it is sufficient to write a brief project description stating where you will use the module. Finally, you can enter your address and contact information and submit the form. They usually respond quickly and if your application is approved, they send both the chips and the demoboard for free.
Summary
RV-3028-C7 is an RTC module containing an integrated CMOS circuit and 32.768 kHz crystal in a ceramic package sealed under vacuum.
This module:
- Very low current consumption (nanoampere level),
- Wide operating voltage range (1.1 V – 5.5 V),
- Factory high time accuracy,
- Backup supply and charging support
with features such as these, is very suitable especially for IoT nodes that will stay in the field for a long time.
This library allows you to use the core features of RV-3028 with a simple but controlled API.
Basic Features
The library helps you use the following capabilities of RV-3028:
-
Calendar and clock
Year, month, day, day of the week, hour, minute and second management -
32-bit UNIX Time Counter
Ideal for long-term logging and timestamped data -
Alarm and Interrupt Support
Wake-up or event triggering according to a specific time -
Counter and Timer Functions
Can be used for periodic tasks or time-based triggering -
Internal EEPROM & RAM
Non-volatile memory area reserved for the user -
Backup Supply & Trickle Charge
Automatic switching between battery and main supply -
I²C Interface (400 kHz)
Compatible with standard Wire/I2C infrastructure
Why Should I Use RV3028?
Although MCU internal RTC, software counters or NTP seem sufficient for date-time tracking in many projects, these solutions can be insufficient in terms of reliability and accuracy in low-consumption devices that will stay in the field for a long time.
- If the device stays asleep for a long time,
- If it is not always connected to the internet,
- If power consumption is at a critical level,
- If you have to keep time information reliably and permanently,
an external and ultra low power RTC becomes inevitable. RV-3028 stands out at this point with its power consumption + accuracy combination.
You can review Micro Crystal's official resources for RV3028's technical documents, application notes and demoboard details:
https://www.microcrystal.com/en/products/real-time-clock-rtc-modules/rv-3028-c7
Installation
Via Arduino IDE
- Open Library Manager
- Search with
RV3028keyword - Select the library with
Gunce Akkoyunin the author section - Add it to your project by clicking Install
Alternatively, you can add the ZIP you downloaded from GitHub via Sketch → Include Library → Add .ZIP Library.
Via PlatformIO
In platformio.ini:
lib_deps = akkoyun/RV3028
is sufficient.
Basic Usage
Initialization
#include <Wire.h>
#include <RV3028.h>
RV3028 RTC;
void setup() {
Wire.begin();
Serial.begin(115200);
if (!RTC.begin()) {
Serial.println("RV3028 not found!");
while (1);
}
// One-time date-time assignment can be made during initial setup:
// RTC.setDateTime(2025, 1, 1, 12, 0, 0); // YYYY, MM, DD, HH, MM, SS
}
void loop() {
RTC.update(); // Update internal time information
Serial.print("Date: ");
Serial.print(RTC.getYear());
Serial.print("-");
Serial.print(RTC.getMonth());
Serial.print("-");
Serial.print(RTC.getDay());
Serial.print(" Time: ");
Serial.print(RTC.getHours());
Serial.print(":");
Serial.print(RTC.getMinutes());
Serial.print(":");
Serial.println(RTC.getSeconds());
delay(1000);
}
Note: For function names and signature details, be sure to check the header files in the src folder and the GitHub README.
Alarm and Wake from Sleep Scenario
You can use RV-3028 as an alarm source that wakes the system from sleep.
A simple example flow:
- Set an alarm on RV-3028 for a specific minute/hour
- Connect the alarm pin to the MCU's interrupt pin
- Put the MCU in deep sleep mode
- When alarm time comes, interrupt is triggered, MCU wakes up
- Sensor measurements, LoRa/GSM transmission etc. are performed
- Set the next alarm and go back to sleep
In this way, a node in the field can operate for months–years with very low consumption.
Bu kütüphane, gerçek sahada kullanılan projelerden gelen ihtiyaçlara göre sürekli gelişen bir açık kaynak projedir. Kullanıcı geri bildirimleri, yeni fonksiyonların eklenmesi ve mevcut yapının iyileştirilmesi açısından kritik öneme sahiptir.
Bu kütüphaneyi hem kişisel hem de ticari projelerinde özgürce kullanabilirsin. Herhangi bir lisans kısıtı uygulanmamaktadır; amacım, bu kütüphanenin mümkün olduğunca fazla gerçek dünya projesinde yer almasıdır. Özel bir entegrasyon ihtiyacın, ticari bir planın veya teknik bir sorunun varsa bana e‑posta üzerinden her zaman ulaşabilirsin: akkoyun@me.com Geri bildirimlerini veya kullanım senaryolarını paylaşman, projeyi geliştirmem açısından büyük katkı sağlar.