{"id":5356,"date":"2026-08-30T16:30:35","date_gmt":"2026-08-30T07:30:35","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/ds3231sn-vs-ds3231m-rtc-comparison-2\/"},"modified":"2026-08-30T16:30:36","modified_gmt":"2026-08-30T07:30:36","slug":"ds3231sn-vs-ds3231m-rtc-comparison","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/diy-repair\/electronics-microcontroller\/ds3231sn-vs-ds3231m-rtc-comparison\/","title":{"rendered":"[Verification] How Much Do the Crystal and MEMS Versions of the DS3231 Drift? A 1-Week Comparison Test"},"content":{"rendered":"<p>To improve the time accuracy of my homemade data logger, I purchased a few of the classic RTCs, the &#8220;DS3231&#8221;. However, upon closer inspection of the chips that arrived, I noticed differences in the engravings.<\/p>\n<ul>\n<li>DS3231SN: The conventional type with a built-in quartz crystal resonator.<\/li>\n<li>DS3231M: A compact type with a built-in shock-resistant MEMS resonator.<\/li>\n<\/ul>\n<p>There are rumors online that &#8220;the MEMS version has lower accuracy,&#8221; and since I was curious, I decided to put them head-to-head in a serious performance comparison.<\/p>\n<h2>Shocking Preliminary Experiment: The Desperate Gap Revealed by the Oscilloscope<\/h2>\n<p>First, I checked the raw signals output from their respective 32K pins using an oscilloscope.<\/p>\n<ul>\n<li>SN (Crystal): 32.7680 kHz (Flawless)<\/li>\n<li>M (MEMS): 32.7334 kHz (!?)<\/li>\n<\/ul>\n<p>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, &#8220;Guess M is no good after all&#8230;&#8221;<\/p>\n<h2>Production Experiment: 1 Week of Continuous Logging<\/h2>\n<p>Before giving up, to measure the actual &#8220;accuracy as a clock,&#8221; I used a Pico 2 (RP2350) to continuously record the time for a full week (168 hours).<\/p>\n<ul>\n<li>Comparison subjects: DS3231SN vs. DS3231M<\/li>\n<li>Measurement method: Read the time from both every minute and record the difference in a CSV file.<\/li>\n<\/ul>\n<h2>The &#8220;True Drift Curve&#8221; Revealed Through Statistics<\/h2>\n<p>While the raw logs on a second-by-second basis only show a binary choice of &#8220;0 seconds or 1 second,&#8221; plotting the hourly average error yielded a surprisingly beautiful result.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e.png\"><img decoding=\"async\" class=\"aligncenter size-large wp-image-2752\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-1024x512.png\" alt=\"Horizontal axis: Elapsed time (in hours), Vertical axis: Average error per hour\" width=\"1024\" height=\"512\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-1024x512.png 1024w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-300x150.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-768x384.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-530x265.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-565x283.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-710x355.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-725x363.png 725w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e-64x32.png 64w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/013c4d1a835045908f7047f8f1b88e3e.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>The graph with &#8220;Horizontal axis: Elapsed time (in hours)&#8221; and &#8220;Vertical axis: Average error per hour&#8221; revealed the following:<\/p>\n<ul>\n<div><\/div>\n<li>Constant lag: M (MEMS version) lagged behind SN (crystal version) at an extremely precise and constant pace of about 0.0054 seconds per hour.<\/li>\n<li>1 second in a week: After 168 hours, the average error hit precisely 1.0 second.<\/li>\n<li>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.<\/li>\n<\/ul>\n<h2>Comparison with Absolute Time (Discussion)<\/h2>\n<p>I also compared them against JST (Japan Standard Time).<\/p>\n<p>*Due to Thonny output lag and visual errors, this discussion should be taken purely as a trend analysis.<\/p>\n<ul>\n<li>Estimated 1-week accuracy against JST\n<ul>\n<li>SN (Crystal): Approx. -1.93 ppm (approx. 1 second delay in 1 week)<\/li>\n<li>M (MEMS): Approx. -3.42 ppm (approx. 2 second delay in 1 week)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Both safely respected their catalog specifications (SN: \u00b12 ppm, M: \u00b15 ppm), proving them to be remarkably honest chips.<\/p>\n<h2>Conclusion: Which One Should You Buy?<\/h2>\n<p>The conclusion of this epic, week-long experiment:<\/p>\n<ul>\n<li>If you want ultimate precision, choose the &#8220;SN (Crystal version)&#8221;: Its accuracy of drifting only 1 second from JST in a week is truly god-tier.<\/li>\n<li>The MEMS version is also more than high-performance enough: The rumor that &#8220;M drifts&#8221; 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.<\/li>\n<\/ul>\n<p>When building a data logger, whichever one you use, you can gain the peace of mind that &#8220;you can&#8217;t go wrong with the DS3231.&#8221;&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To improve the time accuracy of my homemade data logger, I purchased a few of the classic RTCs, the &#8220;DS3 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2752,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=2751","footnotes":""},"categories":[1163],"tags":[463,1054,1053,272,278,270],"class_list":["post-5356","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics-microcontroller","tag-pico","tag-raspberry-pi-pico-2","tag-rp2350","tag-thonny","tag-278","tag-270","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5356","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=5356"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5356\/revisions"}],"predecessor-version":[{"id":5359,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5356\/revisions\/5359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/2752"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=5356"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=5356"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=5356"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}