[Verification] How Much Do the Crystal and MEMS Versions of the DS3231 Drift? A 1-Week Comparison Test
To improve the time accuracy of my homemade data logger, I purchased a few of the classic RTCs, the “DS3231". However, upon closer inspection of the chips that arrived, I noticed differences in the engravings.
- DS3231SN: The conventional type with a built-in quartz crystal resonator.
- DS3231M: A compact type with a built-in shock-resistant MEMS resonator.
There are rumors online that “the MEMS version has lower accuracy," and since I was curious, I decided to put them head-to-head in a serious performance comparison.
Shocking Preliminary Experiment: The Desperate Gap Revealed by the Oscilloscope
First, I checked the raw signals output from their respective 32K pins using an oscilloscope.
- SN (Crystal): 32.7680 kHz (Flawless)
- M (MEMS): 32.7334 kHz (!?)
The frequency of the MEMS version was clearly low, and a simple calculation shows it would fall behind by a minute and a half per day. At this point, I entered a half-resigned mode thinking, “Guess M is no good after all…"
Production Experiment: 1 Week of Continuous Logging
Before giving up, to measure the actual “accuracy as a clock," I used a Pico 2 (RP2350) to continuously record the time for a full week (168 hours).
- Comparison subjects: DS3231SN vs. DS3231M
- Measurement method: Read the time from both every minute and record the difference in a CSV file.
The “True Drift Curve" Revealed Through Statistics
While the raw logs on a second-by-second basis only show a binary choice of “0 seconds or 1 second," plotting the hourly average error yielded a surprisingly beautiful result.
The graph with “Horizontal axis: Elapsed time (in hours)" and “Vertical axis: Average error per hour" revealed the following:
- Constant lag: M (MEMS version) lagged behind SN (crystal version) at an extremely precise and constant pace of about 0.0054 seconds per hour.
- 1 second in a week: After 168 hours, the average error hit precisely 1.0 second.
- Victory for digital: It was proven that the digital correction circuit inside the chip brute-forces a perfect balance for the frequency discrepancy seen on the oscilloscope.
Comparison with Absolute Time (Discussion)
I also compared them against JST (Japan Standard Time).
*Due to Thonny output lag and visual errors, this discussion should be taken purely as a trend analysis.
- Estimated 1-week accuracy against JST
- SN (Crystal): Approx. -1.93 ppm (approx. 1 second delay in 1 week)
- M (MEMS): Approx. -3.42 ppm (approx. 2 second delay in 1 week)
Both safely respected their catalog specifications (SN: ±2 ppm, M: ±5 ppm), proving them to be remarkably honest chips.
Conclusion: Which One Should You Buy?
The conclusion of this epic, week-long experiment:
- If you want ultimate precision, choose the “SN (Crystal version)": Its accuracy of drifting only 1 second from JST in a week is truly god-tier.
- The MEMS version is also more than high-performance enough: The rumor that “M drifts" may be a misunderstanding based solely on viewing the raw waveforms. An error of about 2 seconds in a week should pose no problem for almost any application.
When building a data logger, whichever one you use, you can gain the peace of mind that “you can’t go wrong with the DS3231.""
