Analysis and Measurement of Clock -, Counter Drift and Synchronization Questions in the Case of Microcontrollers
In this paper, we investigate the timing accuracy and synchronization capabilities of three microcontrollers commonly used in educational and Do It Yourself (DIY) environments, like managing experiments in school lectures, collecting, analyzing and storing data in different applications, or forwarding data in sensor networks and Kirchhoff-Law Johnson Noise (KLJN) communication schemes. Our work focuses on the clock sources, drift characteristics and synchronization methods, since these inaccuracies impact the overall performance in several, if not all, fields of application. The study includes a comprehensive analysis of the system clock performance over typical lesson durations (45–90[Formula: see text]min), which shows a significant difference in drift and timing stability across the microcontrollers. Our results indicate that the ESP32 performs the best in terms of clock stability and drift, followed by the ATmega328P, with the STM32 exhibiting the highest drift and noise. In the second group of experiments measuring the relative drift between devices, the ESP32 showed minimal time discrepancies, while the Arduino (ATmega328P) exhibited substantial timing errors, particularly over extended periods. In the third and final part of our work, we introduce a simple synchronization method using an infrared (IR) remote control for triggering simultaneous actions across multiple devices. We assess the jitter in response times and find that the ESP32 and Arduino exhibited similar synchronization performance, and the STM32 showed the lowest jitter in relative time differences. The findings highlight the importance of selecting appropriate microcontrollers for time-sensitive tasks like some educational experiments and provide practical insights into their use in real-world settings.
Authors
- Róbert Mingesz (ORCID: https://orcid.org/0000-0002-4817-5948)
- Andor Tönköly
Institutions
- University of Szeged (HU)
Publication Details
- Journal
- Fluctuation and Noise Letters
- Published
- 2025-08-22
- DOI
- https://doi.org/10.1142/s0219477526500057
- Primary Topic
- Network Time Synchronization Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00