{"id":978,"date":"2026-06-24T16:21:27","date_gmt":"2026-06-25T00:21:27","guid":{"rendered":"https:\/\/salemdata.net\/johnpress\/?p=978"},"modified":"2026-06-24T16:21:27","modified_gmt":"2026-06-25T00:21:27","slug":"testing-satellite-time-synchronization-across-seven-t-beams","status":"publish","type":"post","link":"https:\/\/salemdata.net\/johnpress\/?p=978","title":{"rendered":"Testing Satellite Time Synchronization Across Seven T-Beams"},"content":{"rendered":"<div class=\"gfmr-markdown-container\"><div class=\"gfmr-markdown-source\" style=\"display: none;\">&lt;p&gt;The LilyGO T-Beam Supreme has a real time clock, aka &#8220;RTC&#8221;, circuit powered by a small hidden rechargeable battery that can hold a charge for 2-3 days.\u00a0 If your T-Beam is without power from A) its larger battery, a 18650 Li-Ion battery or B) a powered USB connector, then your stored date and time value will be lost after 2-3 days. <span id='easy-footnote-1-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-1-978' title='See &amp;lt;a href=&amp;quot;https:\/\/github.com\/Xinyuan-LilyGO\/LilyGo-LoRa-Series\/issues\/300#issuecomment-4641606721&amp;quot;&amp;gt;Issue #300&amp;lt;\/a&amp;gt; &amp;#8220;External RTC backup battery present but undocumented \/ missing from specifications and schematic&amp;#8221;.\u00a0 The photo is of the side opposite of the main battery circuit board; this region is hidden by the second circuit board, removed for this photograph, that contains the ESP32-S module and is plugged into the 2 connectors.\u00a0 The button battery, Seiko 3V 5.5mAh, is not meant to be serviceable, see &amp;lt;a href=&amp;quot;https:\/\/github.com\/Xinyuan-LilyGO\/LilyGo-LoRa-Series\/issues\/300#issuecomment-4310386357&amp;quot;&amp;gt;comment&amp;lt;\/a&amp;gt; of LewisHe.'><sup>1<\/sup><\/a><\/span> The loss of current date and time can be easily fixed, if your firmware anticipates this condition, by fetching satellite time and synchronizing the RTC and maintaining a date-time register (memory storage). When you want to synchronize to satellite time, you do have to expose your T-Beam to several satellites by taking it outside or placing it near a window that can see several satellites. To establish its own full position-and-time solution, a GNSS receiver normally uses signals from at least four satellites. The receiver compares the transmitted timing information with when each signal arrives, solves for its own position and clock error, and then can provide an accurate timing reference.&lt;\/p&gt;\n&lt;img class=&quot; wp-image-980&quot; src=&quot;https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260623_045648_Tue.png&quot; alt=&quot;circuit board with button battery&quot; width=&quot;536&quot; height=&quot;483&quot; \/&gt; Real Time Clock Circuit\n&lt;p&gt;The RTC precision is down to the second, not milliseconds. This precision should be adequate for everyday use where sub-second precision is not needed. But for testing and logging what happens within the T-Beam using Reticulum&#8217;s transport, millisecond precision of time along with synchronization of all units involved in the test is warranted. For example, if you log that AMY sends a message at 14:02:33.407 (the &#8220;407&#8221; represents milliseconds, or thousandths (407 of 1,000) of a second) and BOB logs receipt of the same transmission at 14:02:33.023, you want BOB to be in sync with AMY, otherwise a BOB log entry of 14:02:33.023 means BOB is on a different time scale. You want to see BOB receiving the message at 14:02:33.407 or later depending on how long it takes to actually transmit and then for the LoRa circuitry to demodulate the incoming message.&lt;\/p&gt;\n&lt;p&gt;Thus, the goal is to have the T-Beams share the same &#8220;wall clock&#8221;<span id='easy-footnote-2-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-2-978' title='&amp;#8220;Wall clock&amp;#8221; refers to a clock on the wall that everyone sees.\u00a0 For example, in a classroom, every student has a watch, but their watches tell different times.\u00a0 So to assure uniformity, the students are instructed to reference the clock on the wall as the official time source.\u00a0 &amp;#8220;Pencils down (a phrase meaning stop writing your exam essay) at 3:00 p.m.&amp;#8221; means what the wall clock says, not your own watch says or what you would have it say.'><sup>2<\/sup><\/a><\/span> time so that their logs match the same time as close as possible. Using the RTC stored seconds-precision is not precise enough as units could be off synchronization by as much as 1 second or more. A lot can happen in radio land during one second.\u00a0 Without time synchronization, correlating logs files generated by several T-Beams becomes almost impossible &#8212; you would have to know how much each unit varies from another. Therefore, one cannot rely upon the RTC to provide commonality of time among several units.\u00a0 For precision analysis of logs, the date and time stamps must be as synchronized as possible.&lt;\/p&gt;\n&lt;h2&gt;Synchronizing Time&lt;\/h2&gt;\n&lt;p&gt;Back in the Age of Reason, i.e. the 1960s, if you wanted to know what the current time was, you could dial 853-1212 and the telephone company would have a recording answer with &#8220;At the tone, the time will be 3:45 and 20 seconds&#8230; BEEP&#8221;.\u00a0 &lt;a href=&quot;https:\/\/salemdata.net\/public\/telephone_time.wav&quot;&gt;Here&lt;\/a&gt;&#8216;s a recreation of such a message<span id='easy-footnote-3-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-3-978' title='And for the romantics reading this, &amp;lt;a href=&amp;quot;https:\/\/salemdata.net\/time_french_20260622_1546_beep.wav&amp;quot;&amp;gt;here&amp;lt;\/a&amp;gt;&amp;#8216;s a version in French.'><sup>3<\/sup><\/a><\/span>.\u00a0 When you heard the BEEP, you would know that US time was 3:45:20.\u00a0 You could then set your clock accordingly and feel that your clock is now synchronized close to a second.\u00a0 Remember, though, clocks drift, and one month from now, your clock may be off, so you could call telephone time and reset your clock.\u00a0 When daylight savings time would start or end, calling time was a convenient moment in the year to reset clocks.\u00a0 Also, at New Year&#8217;s Eve parties when midnight approached, someone could call time so everyone would know precisely when the new year started and thus set off their firecrackers with joy.&lt;\/p&gt;\n&lt;p&gt;The critical component of calling telephone time is that your are fore-warned with the necessary information, e.g. &#8220;at the the tone&#8230;&#8221;, about an event which is about to occur: the BEEP, so you could have your electric clock set to the second and then when you heard the BEEP, you could power on your clock.&lt;\/p&gt;\n&lt;p&gt;In sporting events, such as track and horse racing, every contestant needs to start from the same time, so instead of beeps, you have a starting gun.\u00a0 When everyone hears the starting gun blast, they know they can begin the race and everybody is starting from the same event: the gun blast&lt;\/p&gt;\n&lt;img class=&quot; wp-image-982&quot; src=&quot;https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/track_race_with_dog.png&quot; alt=&quot;1950s style cartoon of 440 track race with a dog as a contestant&quot; width=&quot;513&quot; height=&quot;385&quot; \/&gt; BANG! They&#8217;re off!\n&lt;p&gt;See the article &#8220;&lt;a href=&quot;https:\/\/dev.to\/rezmoss\/monotonic-clocks-and-precise-time-measurement-210-2ah5&quot;&gt;Monotonic Clocks and Precise Time Measurement&lt;\/a&gt; &#8221; for a more complex analysis of time in computer networks.&lt;\/p&gt;\n&lt;h2&gt;Satellite Time&lt;\/h2&gt;\n&lt;p&gt;The same concept as the starter gun in a track race, or the telephone company BEEP, is used in satellite time.\u00a0 A constellation of satellites is in the sky, they are coordinated by atomic clocks to send time signals as pulses and the GPS units on the T-Beams collects several satellite&#8217;s signals and calculates its position to determine the loss of time it takes to send the signal to the current location.\u00a0 This is called getting a &#8220;fix&#8221;, you usually want to have 3 or more satellite signals.\u00a0 In my backyard, surrounded by tall trees, I can see 12 satellites.\u00a0 Here&#8217;s a simplified diagram showing 6 satellites sending time signals.\u00a0 The satellites continuously broadcast precisely timed radio signals. Because every satellite is at a different distance, each signal reaches the receiver after a different propagation delay. The GNSS receiver solves those delays, its position, and its own clock offset. Once it has a stable solution, the receiver produces a local electrical timing signal: one pulse per second, commonly called PPS [pulse per second].\u00a0 You will see in the documentation of time-related software &#8220;pps&#8221; or &#8220;PPS&#8221; commonly used.&lt;\/p&gt;\n&lt;a href=&quot;https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/constellation_of_satellites.svg&quot;&gt;&lt;img class=&quot; wp-image-983&quot; role=&quot;img&quot; src=&quot;https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/constellation_of_satellites.svg&quot; alt=&quot;diagram of planet surrounded by six satellites&quot; width=&quot;539&quot; height=&quot;539&quot; \/&gt;&lt;\/a&gt; A Few GPS\/Time Satellites\n&lt;p&gt;The ESP32 has a continuously running timer that can report elapsed time with microsecond resolution. By itself, that timer will drift relative to UTC. Exercise 28 repeatedly anchors it to the GNSS receiver\u2019s PPS edge, allowing the firmware to interpolate the microseconds between one precisely marked second and the next.&lt;\/p&gt;\n&lt;h2&gt;T-Beam pps Synchronized Software Clock&lt;\/h2&gt;\n&lt;p&gt;In a T-Beam exercise <span id='easy-footnote-4-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-4-978' title='Exercise &amp;lt;a href=&amp;quot;https:\/\/salemdata.net\/repo\/jlpoole\/microReticulumTbeam\/src\/branch\/feature\/fieldtest-beacon-sd-provision\/exercises\/28_GNSS_PPS_Clock&amp;quot;&amp;gt;28_GNSS_PPS_Clock&amp;lt;\/a&amp;gt; '><sup>4<\/sup><\/a><\/span> each T-Beam receives a very precise \u201ctick\u201d from the GPS receiver once per second, called PPS\u2014short for &lt;em&gt;pulse per second&lt;\/em&gt;. Think of it as seven runners all hearing the same starting pistol every second. The GPS messages tell the T-Beam which numbered UTC second that tick represents, while the ESP32\u2019s own continuously running timer fills in the tiny fractions of a second until the next tick arrives. By repeatedly lining up its internal timer with these GPS second marks, each T-Beam can assign an accurate time, down to microseconds<span id='easy-footnote-5-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-5-978' title='Microseconds = .000001 or one &amp;lt;b&amp;gt;millionth&amp;lt;\/b&amp;gt; (1\/1,000,000) of a second.\u00a0 Often denoted by the symbol: \u03bc (the Greek letter &amp;lt;a title=&amp;quot;Mu (letter)&amp;quot; href=&amp;quot;https:\/\/en.wikipedia.org\/wiki\/Mu_(letter)&amp;quot;&amp;gt;mu&amp;lt;\/a&amp;gt;). '><sup>5<\/sup><\/a><\/span>, to events it sees or sends. The small battery-backed clock on the board is not being used as this precision clock in Exercise 28; it is only a separate, coarse clock that can retain ordinary date-and-time information when the unit is powered down.&lt;\/p&gt;\n&lt;p&gt;To visualize when the PPS arrive, I have the units display for 18 milliseconds on the OLED display a &#8220;flash&#8221;.\u00a0 Thus, when all 7 units have stabilized their time readings, they should all be flashing at the same time.\u00a0 I recorded the flashing sequences using a camera that can take 59.94 frames per second. &lt;a href=&quot;https:\/\/salemdata.us\/videos\/tbeam_PPS_sync.mp4&quot;&gt;Here&lt;\/a&gt;&#8216;s a sample of the video.&lt;\/p&gt;\n&lt;p&gt;But we must not rely on the naked eye to witness &lt;em&gt;if&lt;\/em&gt; the units are all in sync.\u00a0 Instead, I inspected some select frames from the video.\u00a0 Here is some math: $$1\/59.94=16.68 ms$$&lt;\/p&gt;\n&lt;p&gt;The display time I arbitrarily set for 18 ms: $$kPpsFlashMs=18 ms$$&lt;\/p&gt;\n&lt;p&gt;Therefore: $$18\/16.68=1.08 frames$$ which should be a sufficient strobe. Because the 18 ms flash is only slightly longer than one 16.68 ms video frame, a PPS event may appear in one frame or be divided across two adjacent frames, depending on where the camera\u2019s frame boundary falls. The video therefore provides a useful visual check, but not a measurement at microsecond precision.&lt;\/p&gt;\n<h2 id=\"tablepress-9-name\" class=\"tablepress-table-name tablepress-table-name-id-9\">Frame Captures (59.94 fps)<\/h2>\n\n<table id=\"tablepress-9\" class=\"tablepress tablepress-id-9 pps-frame-grid\" aria-labelledby=\"tablepress-9-name\" aria-describedby=\"tablepress-9-description\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Frame<\/th><th class=\"column-2\">Photo<br \/>\nLeft -> Right: AMY BOB CY DAN ED FLO GUY<\/th><th class=\"column-3\">Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">37<\/td><td class=\"column-2\"><figure id=\"attachment_1006\" aria-describedby=\"caption-attachment-1006\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon.png\" alt=\"7 T-beams lined up with OLED displays facing the camera\" width=\"900\" height=\"628\" class=\"size-full wp-image-1006\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon-300x209.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon-768x536.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1006\" class=\"wp-caption-text\">Frame 37<\/figcaption><\/figure><\/td><td class=\"column-3\">No Strobe<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">38<\/td><td class=\"column-2\"><figure id=\"attachment_1007\" aria-describedby=\"caption-attachment-1007\" style=\"width: 875px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon.png\" alt=\"\" width=\"875\" height=\"592\" class=\"size-full wp-image-1007\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon.png 875w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon-300x203.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon-768x520.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><figcaption id=\"caption-attachment-1007\" class=\"wp-caption-text\">Frame 38<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: BOB<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">39<\/td><td class=\"column-2\"><figure id=\"attachment_1009\" aria-describedby=\"caption-attachment-1009\" style=\"width: 888px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon.png\" alt=\"\" width=\"888\" height=\"608\" class=\"size-full wp-image-1009\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon.png 888w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon-300x205.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon-768x526.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><figcaption id=\"caption-attachment-1009\" class=\"wp-caption-text\">Frame 39<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: BOB CY ED<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">40<\/td><td class=\"column-2\"><figure id=\"attachment_1010\" aria-describedby=\"caption-attachment-1010\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon.png\" alt=\"\" width=\"900\" height=\"596\" class=\"size-full wp-image-1010\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon-300x199.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon-768x509.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1010\" class=\"wp-caption-text\">Frame 40<\/figcaption><\/figure><\/td><td class=\"column-3\">Partials: AMY BOB CY DAN ED<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">41<\/td><td class=\"column-2\"><figure id=\"attachment_1011\" aria-describedby=\"caption-attachment-1011\" style=\"width: 889px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon.png\" alt=\"\" width=\"889\" height=\"576\" class=\"size-full wp-image-1011\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon.png 889w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon-300x194.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon-768x498.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><figcaption id=\"caption-attachment-1011\" class=\"wp-caption-text\">Frame 41<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: AMY BOB CY DAN ED, Partial FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">42<\/td><td class=\"column-2\"><figure id=\"attachment_1012\" aria-describedby=\"caption-attachment-1012\" style=\"width: 906px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon.png\" alt=\"\" width=\"906\" height=\"578\" class=\"size-full wp-image-1012\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon.png 906w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon-300x191.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon-768x490.png 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><figcaption id=\"caption-attachment-1012\" class=\"wp-caption-text\">Frame 42<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: AMY DAN ED FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">43<\/td><td class=\"column-2\"><figure id=\"attachment_1013\" aria-describedby=\"caption-attachment-1013\" style=\"width: 883px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon.png\" alt=\"\" width=\"883\" height=\"595\" class=\"size-full wp-image-1013\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon.png 883w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon-300x202.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon-768x518.png 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><figcaption id=\"caption-attachment-1013\" class=\"wp-caption-text\">Frame 43<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: FLO GUY, Partial: AMY DAN ED<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">44<\/td><td class=\"column-2\"><figure id=\"attachment_1014\" aria-describedby=\"caption-attachment-1014\" style=\"width: 888px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon.png\" alt=\"\" width=\"888\" height=\"580\" class=\"size-full wp-image-1014\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon.png 888w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon-300x196.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon-768x502.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><figcaption id=\"caption-attachment-1014\" class=\"wp-caption-text\">Frame 44<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: DAN FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">45<\/td><td class=\"column-2\"><figure id=\"attachment_1015\" aria-describedby=\"caption-attachment-1015\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon.png\" alt=\"\" width=\"900\" height=\"585\" class=\"size-full wp-image-1015\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon-300x195.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon-768x499.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1015\" class=\"wp-caption-text\">Frame 45<\/figcaption><\/figure><\/td><td class=\"column-3\">No strobe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<span id=\"tablepress-9-description\" class=\"tablepress-table-description tablepress-table-description-id-9\">Captures of video frames where the OLED display is flashing to indicdate a satellite pulse has been received.<\/span>\n<!-- #tablepress-9 from cache -->\n&lt;h3&gt;Frame Capture Discussion&lt;\/h3&gt;\n&lt;p&gt;Ideally, I was hoping for 3 frames, 2 frames showing partials bounding a frame show all in full.\u00a0 Remember, each frame represents 16.68ms, so having 8 frames represents 133.44ms of time.\u00a0 ChatGPT cautioned that:&lt;\/p&gt;\n&lt;h3 style=&quot;padding-left: 40px;&quot; data-section-id=&quot;1ay6dd2&quot; data-start=&quot;1742&quot; data-end=&quot;1789&quot;&gt;The practical complication: the OLED itself&lt;\/h3&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;1791&quot; data-end=&quot;1937&quot;&gt;An &lt;strong data-start=&quot;1794&quot; data-end=&quot;1821&quot;&gt;18 ms software interval&lt;\/strong&gt; may not yield an 18 ms optical pulse if your code redraws a substantial part of the 128\u00d764 SH1106 display over I\u00b2C.&lt;\/p&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;1939&quot; data-end=&quot;1979&quot;&gt;A complete framebuffer is approximately:&lt;\/p&gt;\n&lt;p style=&quot;padding-left: 80px;&quot;&gt;&lt;span class=&quot;katex-display&quot;&gt;&lt;span class=&quot;katex&quot;&gt;&lt;span class=&quot;katex-mathml&quot;&gt;128\u00d764\/8=1024\u00a0bytes128 \\times 64 \/ 8 = 1024\\text{ bytes}&lt;\/span&gt;&lt;span class=&quot;katex-html&quot; aria-hidden=&quot;true&quot;&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;mord&quot;&gt;128&lt;\/span&gt;&lt;span class=&quot;mbin&quot;&gt;\u00d7&lt;\/span&gt;&lt;\/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;mord&quot;&gt;64\/8&lt;\/span&gt;&lt;span class=&quot;mrel&quot;&gt;=&lt;\/span&gt;&lt;\/span&gt;&lt;span class=&quot;base&quot;&gt;&lt;span class=&quot;mord&quot;&gt;1024&lt;\/span&gt;&lt;span class=&quot;mord text&quot;&gt;&lt;span class=&quot;mord&quot;&gt;\u00a0bytes&lt;\/span&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/span&gt;&lt;\/p&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;2026&quot; data-end=&quot;2349&quot;&gt;At 400 kHz I\u00b2C, transferring a full framebuffer alone can take on the order of &lt;strong data-start=&quot;2105&quot; data-end=&quot;2122&quot;&gt;23 ms or more&lt;\/strong&gt;, before controller commands and software overhead. Therefore, if your heartbeat implementation performs a full-display redraw for both the \u201con\u201d and \u201coff\u201d states, an 18 ms setting may be below the practical display-update time.&lt;\/p&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;2351&quot; data-end=&quot;2430&quot;&gt;That does not invalidate the experiment, but it changes what you are measuring:&lt;\/p&gt;\n&lt;blockquote style=&quot;padding-left: 40px;&quot; data-start=&quot;2432&quot; data-end=&quot;2595&quot;&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;2434&quot; data-end=&quot;2595&quot;&gt;You would be measuring PPS-to-visible-OLED timing, including firmware scheduling, display drawing, I\u00b2C transfer, and OLED refresh\u2014not PPS interrupt timing alone.&lt;\/p&gt;\n&lt;\/blockquote&gt;\n&lt;p style=&quot;padding-left: 40px;&quot; data-start=&quot;2597&quot; data-end=&quot;2755&quot;&gt;For the video experiment, that may actually be exactly what you want: it shows whether the seven units present their PPS indication coherently to an observer.&lt;\/p&gt;\n&lt;p&gt;I suspected all the logging activity, both via the UART and to the unit&#8217;s memory might be a factor affecting the OLED, so I built a firmware version without any logging and launched the 7 units and video recorded them.\u00a0 The number of frames between empty was 6; that&#8217;s an improvement, but I am still wondering why the seven T-Beams are not all appearing with full heart beats in one frame when reviewed in a video software platform where each frame can be viewed.&lt;\/p&gt;\n&lt;h3&gt;Conclusion re: video capture&lt;\/h3&gt;\n&lt;p&gt;Pretty, but not precise enough.\u00a0 We need more.&lt;\/p&gt;\n&lt;h2&gt;The Logs&lt;\/h2&gt;\n&lt;p&gt;In my run above where the screenshots of the frames are shown, I ran a 17-1\/2 minute run and logged both on the T-Beams SRAM and over the UART port to my laptop where I have a Perl script wrap each incoming message with a high precision time code.\u00a0 Yes, I had 7 consoles opened.\u00a0 I have built a Perl script that parses both types of logs and stuffs them into a SQLite database.\u00a0 Having both logs in the database allows me to ask questions about various relationships of the parsed data.&lt;\/p&gt;\n&lt;p&gt;With the seven T-Beams mechanically supported so that their USB-C connectors were no longer under load, all seven completed the planned 17-minute internal-PPS-flash capture capture without interruption or write errors. Each unit maintained an unbroken PPS count sequence. Comparing the PPS-disciplined microsecond clocks reported by the units through the live UART monitor showed that their central host-observed offsets occupied only&lt;strong&gt; a 0.166 ms&lt;\/strong&gt; span. When examined minute by minute, the seven-unit spread remained below 0.633 ms for the full run. This does not directly measure the electrical phase difference among the seven GNSS PPS outputs, but it demonstrates that the reconstructed clocks and their end-to-end reporting paths remained mutually consistent to substantially &lt;em&gt;better than one millisecond&lt;\/em&gt;.&lt;\/p&gt;\n&lt;p&gt;For further details, see\u00a0&lt;a href=&quot;https:\/\/salemdata.net\/johnpress\/?p=1023&quot;&gt;Achieving 166 \u00b5s Clock Synchronization Across 7 T-Beams&lt;\/a&gt;&lt;\/p&gt;\n&lt;h2&gt;The Problem With RTC&lt;\/h2&gt;\n&lt;p&gt;The T-Beam uses an RTC circuit<span id='easy-footnote-6-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-6-978' title='The RTC component is a &amp;lt;strong data-start=&amp;quot;4&amp;quot; data-end=&amp;quot;67&amp;quot;&amp;gt;NXP PCF85063ATL&amp;lt;\/strong&amp;gt;'><sup>6<\/sup><\/a><\/span> which has a quartz crystal that vibrates mechanically at approximately &lt;strong data-start=&quot;963&quot; data-end=&quot;991&quot;&gt;32,768 cycles per second, &lt;\/strong&gt;or Herz (&#8220;Hz&#8221;).\u00a0 The selection of a crystal oscillating at 32,768 Hz was not by accident, but by design since 32,768 is $$2^{15}$$. Think of the crystal as a beating heart. So digital circuitry can divide by two, fifteen times to determine a second and then each one-second tick increments the RTC\u2019s calendar registers.&lt;\/p&gt;\n&lt;pre&gt;32,768 Hz\r\n16,384 Hz\r\n8,192 Hz\r\n...\r\n2 Hz\r\n1 Hz&lt;\/pre&gt;\n&lt;p data-start=&quot;2263&quot; data-end=&quot;2389&quot;&gt;The unavoidable issue is that its crystal is not exactly 32,768.000000 Hz under real conditions. Its frequency changes due to:&lt;\/p&gt;\n&lt;ul data-start=&quot;2391&quot; data-end=&quot;2566&quot;&gt;\n&lt;li data-section-id=&quot;1k6h7ns&quot; data-start=&quot;2391&quot; data-end=&quot;2432&quot;&gt;manufacturing tolerance of the crystal;&lt;\/li&gt;\n&lt;li data-section-id=&quot;1tn7dr&quot; data-start=&quot;2433&quot; data-end=&quot;2447&quot;&gt;temperature;&lt;\/li&gt;\n&lt;li data-section-id=&quot;17u4gid&quot; data-start=&quot;2448&quot; data-end=&quot;2456&quot;&gt;aging;&lt;\/li&gt;\n&lt;li data-section-id=&quot;1phhelg&quot; data-start=&quot;2457&quot; data-end=&quot;2504&quot;&gt;oscillator load capacitance and board layout;&lt;\/li&gt;\n&lt;li data-section-id=&quot;100xbsi&quot; data-start=&quot;2505&quot; data-end=&quot;2566&quot;&gt;supply conditions and electrical noise, to a lesser degree.&lt;\/li&gt;\n&lt;\/ul&gt;\n&lt;p&gt;So the RTC can drift in time and be off.\u00a0 Moreover, the RTC is not meant to be a high precision component.\u00a0 The RTC\u2019s calendar interface is second-resolution and is suitable for retaining ordinary date and time across a power interruption. Its quartz oscillator can drift with temperature, aging, and manufacturing tolerance, so it is not the timing source used for this sub-millisecond synchronization experiment.&lt;\/p&gt;\n&lt;p&gt;(I acknowledge that the footnotes have problems, that&#8217;s on WordPress and Easy Footnotes &#8212; standard edition.)&lt;\/p&gt;\n<\/div><div class=\"gfmr-markdown-rendered\"><p>The LilyGO T-Beam Supreme has a real time clock, aka &#8220;RTC&#8221;, circuit powered by a small hidden rechargeable battery that can hold a charge for 2-3 days.\u00a0 If your T-Beam is without power from A) its larger battery, a 18650 Li-Ion battery or B) a powered USB connector, then your stored date and time value will be lost after 2-3 days. <span id='easy-footnote-7-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-7-978' title='See &lt;a href=&quot;https:\/\/github.com\/Xinyuan-LilyGO\/LilyGo-LoRa-Series\/issues\/300#issuecomment-4641606721&quot;&gt;Issue #300&lt;\/a&gt; &amp;#8220;External RTC backup battery present but undocumented \/ missing from specifications and schematic&amp;#8221;.\u00a0 The photo is of the side opposite of the main battery circuit board; this region is hidden by the second circuit board, removed for this photograph, that contains the ESP32-S module and is plugged into the 2 connectors.\u00a0 The button battery, Seiko 3V 5.5mAh, is not meant to be serviceable, see &lt;a href=&quot;https:\/\/github.com\/Xinyuan-LilyGO\/LilyGo-LoRa-Series\/issues\/300#issuecomment-4310386357&quot;&gt;comment&lt;\/a&gt; of LewisHe.'><sup>7<\/sup><\/a><\/span> The loss of current date and time can be easily fixed, if your firmware anticipates this condition, by fetching satellite time and synchronizing the RTC and maintaining a date-time register (memory storage). When you want to synchronize to satellite time, you do have to expose your T-Beam to several satellites by taking it outside or placing it near a window that can see several satellites. To establish its own full position-and-time solution, a GNSS receiver normally uses signals from at least four satellites. The receiver compares the transmitted timing information with when each signal arrives, solves for its own position and clock error, and then can provide an accurate timing reference.<\/p>\n<figure id=\"attachment_980\" aria-describedby=\"caption-attachment-980\" style=\"width: 536px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-980\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260623_045648_Tue.png\" alt=\"circuit board with button battery\" width=\"536\" height=\"483\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260623_045648_Tue.png 1067w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260623_045648_Tue-300x270.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260623_045648_Tue-768x692.png 768w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><figcaption id=\"caption-attachment-980\" class=\"wp-caption-text\">Real Time Clock Circuit<\/figcaption><\/figure>\n<p>The RTC precision is down to the second, not milliseconds. This precision should be adequate for everyday use where sub-second precision is not needed. But for testing and logging what happens within the T-Beam using Reticulum&#8217;s transport, millisecond precision of time along with synchronization of all units involved in the test is warranted. For example, if you log that AMY sends a message at 14:02:33.407 (the &#8220;407&#8221; represents milliseconds, or thousandths (407 of 1,000) of a second) and BOB logs receipt of the same transmission at 14:02:33.023, you want BOB to be in sync with AMY, otherwise a BOB log entry of 14:02:33.023 means BOB is on a different time scale. You want to see BOB receiving the message at 14:02:33.407 or later depending on how long it takes to actually transmit and then for the LoRa circuitry to demodulate the incoming message.<\/p>\n<p>Thus, the goal is to have the T-Beams share the same &#8220;wall clock&#8221;<span id='easy-footnote-8-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-8-978' title='&amp;#8220;Wall clock&amp;#8221; refers to a clock on the wall that everyone sees.\u00a0 For example, in a classroom, every student has a watch, but their watches tell different times.\u00a0 So to assure uniformity, the students are instructed to reference the clock on the wall as the official time source.\u00a0 &amp;#8220;Pencils down (a phrase meaning stop writing your exam essay) at 3:00 p.m.&amp;#8221; means what the wall clock says, not your own watch says or what you would have it say.'><sup>8<\/sup><\/a><\/span> time so that their logs match the same time as close as possible. Using the RTC stored seconds-precision is not precise enough as units could be off synchronization by as much as 1 second or more. A lot can happen in radio land during one second.\u00a0 Without time synchronization, correlating logs files generated by several T-Beams becomes almost impossible &#8212; you would have to know how much each unit varies from another. Therefore, one cannot rely upon the RTC to provide commonality of time among several units.\u00a0 For precision analysis of logs, the date and time stamps must be as synchronized as possible.<\/p>\n<h2>Synchronizing Time<\/h2>\n<p>Back in the Age of Reason, i.e. the 1960s, if you wanted to know what the current time was, you could dial 853-1212 and the telephone company would have a recording answer with &#8220;At the tone, the time will be 3:45 and 20 seconds&#8230; BEEP&#8221;.\u00a0 <a href=\"https:\/\/salemdata.net\/public\/telephone_time.wav\">Here<\/a>&#8216;s a recreation of such a message<span id='easy-footnote-9-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-9-978' title='And for the romantics reading this, &lt;a href=&quot;https:\/\/salemdata.net\/time_french_20260622_1546_beep.wav&quot;&gt;here&lt;\/a&gt;&amp;#8216;s a version in French.'><sup>9<\/sup><\/a><\/span>.\u00a0 When you heard the BEEP, you would know that US time was 3:45:20.\u00a0 You could then set your clock accordingly and feel that your clock is now synchronized close to a second.\u00a0 Remember, though, clocks drift, and one month from now, your clock may be off, so you could call telephone time and reset your clock.\u00a0 When daylight savings time would start or end, calling time was a convenient moment in the year to reset clocks.\u00a0 Also, at New Year&#8217;s Eve parties when midnight approached, someone could call time so everyone would know precisely when the new year started and thus set off their firecrackers with joy.<\/p>\n<p>The critical component of calling telephone time is that your are fore-warned with the necessary information, e.g. &#8220;at the the tone&#8230;&#8221;, about an event which is about to occur: the BEEP, so you could have your electric clock set to the second and then when you heard the BEEP, you could power on your clock.<\/p>\n<p>In sporting events, such as track and horse racing, every contestant needs to start from the same time, so instead of beeps, you have a starting gun.\u00a0 When everyone hears the starting gun blast, they know they can begin the race and everybody is starting from the same event: the gun blast<\/p>\n<figure id=\"attachment_982\" aria-describedby=\"caption-attachment-982\" style=\"width: 513px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-982\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/track_race_with_dog.png\" alt=\"1950s style cartoon of 440 track race with a dog as a contestant\" width=\"513\" height=\"385\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/track_race_with_dog.png 1448w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/track_race_with_dog-300x225.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/track_race_with_dog-768x576.png 768w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><figcaption id=\"caption-attachment-982\" class=\"wp-caption-text\">BANG! They&#8217;re off!<\/figcaption><\/figure>\n<p>See the article &#8220;<a href=\"https:\/\/dev.to\/rezmoss\/monotonic-clocks-and-precise-time-measurement-210-2ah5\">Monotonic Clocks and Precise Time Measurement<\/a> &#8221; for a more complex analysis of time in computer networks.<\/p>\n<h2>Satellite Time<\/h2>\n<p>The same concept as the starter gun in a track race, or the telephone company BEEP, is used in satellite time.\u00a0 A constellation of satellites is in the sky, they are coordinated by atomic clocks to send time signals as pulses and the GPS units on the T-Beams collects several satellite&#8217;s signals and calculates its position to determine the loss of time it takes to send the signal to the current location.\u00a0 This is called getting a &#8220;fix&#8221;, you usually want to have 3 or more satellite signals.\u00a0 In my backyard, surrounded by tall trees, I can see 12 satellites.\u00a0 Here&#8217;s a simplified diagram showing 6 satellites sending time signals.\u00a0 The satellites continuously broadcast precisely timed radio signals. Because every satellite is at a different distance, each signal reaches the receiver after a different propagation delay. The GNSS receiver solves those delays, its position, and its own clock offset. Once it has a stable solution, the receiver produces a local electrical timing signal: one pulse per second, commonly called PPS [pulse per second].\u00a0 You will see in the documentation of time-related software &#8220;pps&#8221; or &#8220;PPS&#8221; commonly used.<\/p>\n<figure id=\"attachment_983\" aria-describedby=\"caption-attachment-983\" style=\"width: 539px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/constellation_of_satellites.svg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-983\" role=\"img\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/constellation_of_satellites.svg\" alt=\"diagram of planet surrounded by six satellites\" width=\"539\" height=\"539\" \/><\/a><figcaption id=\"caption-attachment-983\" class=\"wp-caption-text\">A Few GPS\/Time Satellites<\/figcaption><\/figure>\n<p>The ESP32 has a continuously running timer that can report elapsed time with microsecond resolution. By itself, that timer will drift relative to UTC. Exercise 28 repeatedly anchors it to the GNSS receiver\u2019s PPS edge, allowing the firmware to interpolate the microseconds between one precisely marked second and the next.<\/p>\n<h2>T-Beam pps Synchronized Software Clock<\/h2>\n<p>In a T-Beam exercise <span id='easy-footnote-10-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-10-978' title='Exercise &lt;a href=&quot;https:\/\/salemdata.net\/repo\/jlpoole\/microReticulumTbeam\/src\/branch\/feature\/fieldtest-beacon-sd-provision\/exercises\/28_GNSS_PPS_Clock&quot;&gt;28_GNSS_PPS_Clock&lt;\/a&gt; '><sup>10<\/sup><\/a><\/span> each T-Beam receives a very precise \u201ctick\u201d from the GPS receiver once per second, called PPS\u2014short for <em>pulse per second<\/em>. Think of it as seven runners all hearing the same starting pistol every second. The GPS messages tell the T-Beam which numbered UTC second that tick represents, while the ESP32\u2019s own continuously running timer fills in the tiny fractions of a second until the next tick arrives. By repeatedly lining up its internal timer with these GPS second marks, each T-Beam can assign an accurate time, down to microseconds<span id='easy-footnote-11-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-11-978' title='Microseconds = .000001 or one &lt;b&gt;millionth&lt;\/b&gt; (1\/1,000,000) of a second.\u00a0 Often denoted by the symbol: \u03bc (the Greek letter &lt;a title=&quot;Mu (letter)&quot; href=&quot;https:\/\/en.wikipedia.org\/wiki\/Mu_(letter)&quot;&gt;mu&lt;\/a&gt;). '><sup>11<\/sup><\/a><\/span>, to events it sees or sends. The small battery-backed clock on the board is not being used as this precision clock in Exercise 28; it is only a separate, coarse clock that can retain ordinary date-and-time information when the unit is powered down.<\/p>\n<p>To visualize when the PPS arrive, I have the units display for 18 milliseconds on the OLED display a &#8220;flash&#8221;.\u00a0 Thus, when all 7 units have stabilized their time readings, they should all be flashing at the same time.\u00a0 I recorded the flashing sequences using a camera that can take 59.94 frames per second. <a href=\"https:\/\/salemdata.us\/videos\/tbeam_PPS_sync.mp4\">Here<\/a>&#8216;s a sample of the video.<\/p>\n<p>But we must not rely on the naked eye to witness <em>if<\/em> the units are all in sync.\u00a0 Instead, I inspected some select frames from the video.\u00a0 Here is some math: $$1\/59.94=16.68 ms$$<\/p>\n<p>The display time I arbitrarily set for 18 ms: $$kPpsFlashMs=18 ms$$<\/p>\n<p>Therefore: $$18\/16.68=1.08 frames$$ which should be a sufficient strobe. Because the 18 ms flash is only slightly longer than one 16.68 ms video frame, a PPS event may appear in one frame or be divided across two adjacent frames, depending on where the camera\u2019s frame boundary falls. The video therefore provides a useful visual check, but not a measurement at microsecond precision.<\/p>\n<h2 id=\"tablepress-9-no-2-name\" class=\"tablepress-table-name tablepress-table-name-id-9\">Frame Captures (59.94 fps)<\/h2>\n\n<table id=\"tablepress-9-no-2\" class=\"tablepress tablepress-id-9 pps-frame-grid\" aria-labelledby=\"tablepress-9-no-2-name\" aria-describedby=\"tablepress-9-no-2-description\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Frame<\/th><th class=\"column-2\">Photo<br \/>\nLeft -> Right: AMY BOB CY DAN ED FLO GUY<\/th><th class=\"column-3\">Comment<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">37<\/td><td class=\"column-2\"><figure id=\"attachment_1006\" aria-describedby=\"caption-attachment-1006\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon.png\" alt=\"7 T-beams lined up with OLED displays facing the camera\" width=\"900\" height=\"628\" class=\"size-full wp-image-1006\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon-300x209.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193914_Mon-768x536.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1006\" class=\"wp-caption-text\">Frame 37<\/figcaption><\/figure><\/td><td class=\"column-3\">No Strobe<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">38<\/td><td class=\"column-2\"><figure id=\"attachment_1007\" aria-describedby=\"caption-attachment-1007\" style=\"width: 875px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon.png\" alt=\"\" width=\"875\" height=\"592\" class=\"size-full wp-image-1007\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon.png 875w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon-300x203.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193939_Mon-768x520.png 768w\" sizes=\"auto, (max-width: 875px) 100vw, 875px\" \/><figcaption id=\"caption-attachment-1007\" class=\"wp-caption-text\">Frame 38<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: BOB<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">39<\/td><td class=\"column-2\"><figure id=\"attachment_1009\" aria-describedby=\"caption-attachment-1009\" style=\"width: 888px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon.png\" alt=\"\" width=\"888\" height=\"608\" class=\"size-full wp-image-1009\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon.png 888w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon-300x205.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_193956_Mon-768x526.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><figcaption id=\"caption-attachment-1009\" class=\"wp-caption-text\">Frame 39<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: BOB CY ED<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">40<\/td><td class=\"column-2\"><figure id=\"attachment_1010\" aria-describedby=\"caption-attachment-1010\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon.png\" alt=\"\" width=\"900\" height=\"596\" class=\"size-full wp-image-1010\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon-300x199.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194016_Mon-768x509.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1010\" class=\"wp-caption-text\">Frame 40<\/figcaption><\/figure><\/td><td class=\"column-3\">Partials: AMY BOB CY DAN ED<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">41<\/td><td class=\"column-2\"><figure id=\"attachment_1011\" aria-describedby=\"caption-attachment-1011\" style=\"width: 889px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon.png\" alt=\"\" width=\"889\" height=\"576\" class=\"size-full wp-image-1011\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon.png 889w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon-300x194.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194037_Mon-768x498.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><figcaption id=\"caption-attachment-1011\" class=\"wp-caption-text\">Frame 41<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: AMY BOB CY DAN ED, Partial FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">42<\/td><td class=\"column-2\"><figure id=\"attachment_1012\" aria-describedby=\"caption-attachment-1012\" style=\"width: 906px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon.png\" alt=\"\" width=\"906\" height=\"578\" class=\"size-full wp-image-1012\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon.png 906w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon-300x191.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194056_Mon-768x490.png 768w\" sizes=\"auto, (max-width: 906px) 100vw, 906px\" \/><figcaption id=\"caption-attachment-1012\" class=\"wp-caption-text\">Frame 42<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: AMY DAN ED FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">43<\/td><td class=\"column-2\"><figure id=\"attachment_1013\" aria-describedby=\"caption-attachment-1013\" style=\"width: 883px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon.png\" alt=\"\" width=\"883\" height=\"595\" class=\"size-full wp-image-1013\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon.png 883w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon-300x202.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194114_Mon-768x518.png 768w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><figcaption id=\"caption-attachment-1013\" class=\"wp-caption-text\">Frame 43<\/figcaption><\/figure><\/td><td class=\"column-3\">Full: FLO GUY, Partial: AMY DAN ED<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">44<\/td><td class=\"column-2\"><figure id=\"attachment_1014\" aria-describedby=\"caption-attachment-1014\" style=\"width: 888px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon.png\" alt=\"\" width=\"888\" height=\"580\" class=\"size-full wp-image-1014\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon.png 888w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon-300x196.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194129_Mon-768x502.png 768w\" sizes=\"auto, (max-width: 888px) 100vw, 888px\" \/><figcaption id=\"caption-attachment-1014\" class=\"wp-caption-text\">Frame 44<\/figcaption><\/figure><\/td><td class=\"column-3\">Partial: DAN FLO GUY<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">45<\/td><td class=\"column-2\"><figure id=\"attachment_1015\" aria-describedby=\"caption-attachment-1015\" style=\"width: 900px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon.png\" alt=\"\" width=\"900\" height=\"585\" class=\"size-full wp-image-1015\" srcset=\"https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon.png 900w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon-300x195.png 300w, https:\/\/salemdata.net\/johnpress\/wp-content\/uploads\/2026\/06\/20260622_194148_Mon-768x499.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><figcaption id=\"caption-attachment-1015\" class=\"wp-caption-text\">Frame 45<\/figcaption><\/figure><\/td><td class=\"column-3\">No strobe<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<span id=\"tablepress-9-no-2-description\" class=\"tablepress-table-description tablepress-table-description-id-9\">Captures of video frames where the OLED display is flashing to indicdate a satellite pulse has been received.<\/span>\n<!-- #tablepress-9-no-2 from cache -->\n<h3>Frame Capture Discussion<\/h3>\n<p>Ideally, I was hoping for 3 frames, 2 frames showing partials bounding a frame show all in full.\u00a0 Remember, each frame represents 16.68ms, so having 8 frames represents 133.44ms of time.\u00a0 ChatGPT cautioned that:<\/p>\n<h3 style=\"padding-left: 40px\" data-section-id=\"1ay6dd2\" data-start=\"1742\" data-end=\"1789\">The practical complication: the OLED itself<\/h3>\n<p style=\"padding-left: 40px\" data-start=\"1791\" data-end=\"1937\">An <strong data-start=\"1794\" data-end=\"1821\">18 ms software interval<\/strong> may not yield an 18 ms optical pulse if your code redraws a substantial part of the 128\u00d764 SH1106 display over I\u00b2C.<\/p>\n<p style=\"padding-left: 40px\" data-start=\"1939\" data-end=\"1979\">A complete framebuffer is approximately:<\/p>\n<p style=\"padding-left: 80px\"><span class=\"katex-display\"><span class=\"katex\"><span class=\"katex-mathml\">128\u00d764\/8=1024\u00a0bytes128 \\times 64 \/ 8 = 1024\\text{ bytes}<\/span><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"mord\">128<\/span><span class=\"mbin\">\u00d7<\/span><\/span><span class=\"base\"><span class=\"mord\">64\/8<\/span><span class=\"mrel\">=<\/span><\/span><span class=\"base\"><span class=\"mord\">1024<\/span><span class=\"mord text\"><span class=\"mord\">\u00a0bytes<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"padding-left: 40px\" data-start=\"2026\" data-end=\"2349\">At 400 kHz I\u00b2C, transferring a full framebuffer alone can take on the order of <strong data-start=\"2105\" data-end=\"2122\">23 ms or more<\/strong>, before controller commands and software overhead. Therefore, if your heartbeat implementation performs a full-display redraw for both the \u201con\u201d and \u201coff\u201d states, an 18 ms setting may be below the practical display-update time.<\/p>\n<p style=\"padding-left: 40px\" data-start=\"2351\" data-end=\"2430\">That does not invalidate the experiment, but it changes what you are measuring:<\/p>\n<blockquote style=\"padding-left: 40px\" data-start=\"2432\" data-end=\"2595\">\n<p style=\"padding-left: 40px\" data-start=\"2434\" data-end=\"2595\">You would be measuring PPS-to-visible-OLED timing, including firmware scheduling, display drawing, I\u00b2C transfer, and OLED refresh\u2014not PPS interrupt timing alone.<\/p>\n<\/blockquote>\n<p style=\"padding-left: 40px\" data-start=\"2597\" data-end=\"2755\">For the video experiment, that may actually be exactly what you want: it shows whether the seven units present their PPS indication coherently to an observer.<\/p>\n<p>I suspected all the logging activity, both via the UART and to the unit&#8217;s memory might be a factor affecting the OLED, so I built a firmware version without any logging and launched the 7 units and video recorded them.\u00a0 The number of frames between empty was 6; that&#8217;s an improvement, but I am still wondering why the seven T-Beams are not all appearing with full heart beats in one frame when reviewed in a video software platform where each frame can be viewed.<\/p>\n<h3>Conclusion re: video capture<\/h3>\n<p>Pretty, but not precise enough.\u00a0 We need more.<\/p>\n<h2>The Logs<\/h2>\n<p>In my run above where the screenshots of the frames are shown, I ran a 17-1\/2 minute run and logged both on the T-Beams SRAM and over the UART port to my laptop where I have a Perl script wrap each incoming message with a high precision time code.\u00a0 Yes, I had 7 consoles opened.\u00a0 I have built a Perl script that parses both types of logs and stuffs them into a SQLite database.\u00a0 Having both logs in the database allows me to ask questions about various relationships of the parsed data.<\/p>\n<p>With the seven T-Beams mechanically supported so that their USB-C connectors were no longer under load, all seven completed the planned 17-minute internal-PPS-flash capture capture without interruption or write errors. Each unit maintained an unbroken PPS count sequence. Comparing the PPS-disciplined microsecond clocks reported by the units through the live UART monitor showed that their central host-observed offsets occupied only<strong> a 0.166 ms<\/strong> span. When examined minute by minute, the seven-unit spread remained below 0.633 ms for the full run. This does not directly measure the electrical phase difference among the seven GNSS PPS outputs, but it demonstrates that the reconstructed clocks and their end-to-end reporting paths remained mutually consistent to substantially <em>better than one millisecond<\/em>.<\/p>\n<p>For further details, see\u00a0<a href=\"https:\/\/salemdata.net\/johnpress\/?p=1023\">Achieving 166 \u00b5s Clock Synchronization Across 7 T-Beams<\/a><\/p>\n<h2>The Problem With RTC<\/h2>\n<p>The T-Beam uses an RTC circuit<span id='easy-footnote-12-978' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/salemdata.net\/johnpress\/?p=978#easy-footnote-bottom-12-978' title='The RTC component is a &lt;strong data-start=&quot;4&quot; data-end=&quot;67&quot;&gt;NXP PCF85063ATL&lt;\/strong&gt;'><sup>12<\/sup><\/a><\/span> which has a quartz crystal that vibrates mechanically at approximately <strong data-start=\"963\" data-end=\"991\">32,768 cycles per second, <\/strong>or Herz (&#8220;Hz&#8221;).\u00a0 The selection of a crystal oscillating at 32,768 Hz was not by accident, but by design since 32,768 is $$2^{15}$$. Think of the crystal as a beating heart. So digital circuitry can divide by two, fifteen times to determine a second and then each one-second tick increments the RTC\u2019s calendar registers.<\/p>\n<pre>32,768 Hz\r\n16,384 Hz\r\n8,192 Hz\r\n...\r\n2 Hz\r\n1 Hz<\/pre>\n<p data-start=\"2263\" data-end=\"2389\">The unavoidable issue is that its crystal is not exactly 32,768.000000 Hz under real conditions. Its frequency changes due to:<\/p>\n<ul data-start=\"2391\" data-end=\"2566\">\n<li data-section-id=\"1k6h7ns\" data-start=\"2391\" data-end=\"2432\">manufacturing tolerance of the crystal;<\/li>\n<li data-section-id=\"1tn7dr\" data-start=\"2433\" data-end=\"2447\">temperature;<\/li>\n<li data-section-id=\"17u4gid\" data-start=\"2448\" data-end=\"2456\">aging;<\/li>\n<li data-section-id=\"1phhelg\" data-start=\"2457\" data-end=\"2504\">oscillator load capacitance and board layout;<\/li>\n<li data-section-id=\"100xbsi\" data-start=\"2505\" data-end=\"2566\">supply conditions and electrical noise, to a lesser degree.<\/li>\n<\/ul>\n<p>So the RTC can drift in time and be off.\u00a0 Moreover, the RTC is not meant to be a high precision component.\u00a0 The RTC\u2019s calendar interface is second-resolution and is suitable for retaining ordinary date and time across a power interruption. Its quartz oscillator can drift with temperature, aging, and manufacturing tolerance, so it is not the timing source used for this sub-millisecond synchronization experiment.<\/p>\n<p>(I acknowledge that the footnotes have problems, that&#8217;s on WordPress and Easy Footnotes &#8212; standard edition.)<\/p>\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>&lt;p&gt;The LilyGO T-Beam Supreme has a real time clock, aka &#8220;RTC&#8221;, circuit powered by a small hidden rechargeable battery that can hold a charge for 2-3 days.\u00a0 If your T-Beam is without power from A) its larger battery, a 18650 Li-Ion battery or B) a powered USB connector, then your stored date and time value [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gfmr_meta_descriptions":[],"_gfmr_multilingual_taxonomy_terms":[],"footnotes":""},"categories":[133,80,1],"tags":[],"class_list":["post-978","post","type-post","status-publish","format-standard","hentry","category-mesh-network","category-meshtastic","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/posts\/978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=978"}],"version-history":[{"count":25,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/posts\/978\/revisions"}],"predecessor-version":[{"id":1039,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=\/wp\/v2\/posts\/978\/revisions\/1039"}],"wp:attachment":[{"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salemdata.net\/johnpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}