Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / Brands and Sourcing

Separating RTC Crystal Timekeeping From Missing Energy Samples After a Meter Restarts

If a smart meter's display continues normally after a power interruption but the backend graph has a gap, do not replace the crystal or fill the gap with zeros. Verify calendar continuity and metering sample coverage separately.

Consider a development meter in an equipment cabinet. Backup power may keep its real-time clock running while the metering chain loses its own power and stops. A correct timestamp after restoration shows the calendar is usable then. It does not prove there was no consumption or that energy was recorded during the gap. This article is limited to development-bench data verification. It does not address mains contact, field meter changes or billing policy.

What can each timebase establish?

The real-time clock (RTC) provides calendar timestamps for acquired blocks and equipment events. Epson's RX8111CE contains a 32.768 kHz crystal and supports calendar timekeeping and event timestamps. The full ordering code is X1B000421000115 for grade A and X1B000421000215 for grade B. It is a prototype candidate, not evidence that a commercial meter uses it. The two grades differ in initial room-temperature frequency error. Do not order from the series name alone or equate room-temperature error with timing accuracy of the complete meter over all conditions.

The metering analog-to-digital converter (ADC) takes voltage and current samples on its own cadence. Metering software estimates energy from valid power samples and the intervals they represent. For fixed-rate sampling, integration time comes from the intervals of valid samples, not every second between two calendar timestamps. Even with a shared reference, the two chains need not have power, acquire samples or write records at the same time. Finer timestamp resolution cannot establish valid metering data.

Each block should show when acquisition began or resumed, how many valid samples it delivered and which interval received the stored total. Use calendar timestamps to label intervals, sample counts and sequence numbers to establish coverage, and accumulated values or unique committed block IDs to detect loss or duplication. If a reboot restarts sequence numbers at zero, use a boot-generation ID to distinguish sequences rather than comparing only adjacent numbers.

Bench example: the display advances 10 seconds, but only eight seconds were sampled

Suppose an isolated low-voltage logic bench feeds simulated data equivalent to a constant 1 kW. With an assumed rate of 2,000 samples per second, the first and last four seconds have valid input, and the middle two seconds are intentionally missing while the RTC keeps running. The 10-second window would ordinarily contain 20,000 samples. There are 16,000 valid samples and a shortfall of 4,000, or 80% coverage. Confirm this against simulator logs and sequence numbers, not just whole seconds on the display.

For eight seconds of valid simulated data, 1 kW × 8 seconds ÷ 3,600 seconds per hour gives about 2.22 Wh. Applying 1 kW to the entire calendar interval yields about 2.78 Wh, or about 0.56 Wh more than the valid record. Filling the gap with zero may leave the eight-second integral unchanged, but it falsely turns two unknown seconds into an apparent zero measurement. The first introduces unsupported energy; the second hides missing data. This example checks software against sample records. It does not authorize estimating or editing gaps on actual meters.

Run a control with a genuinely zero simulated input while keeping sampling active. If sequence numbers and valid counts remain complete, the report can distinguish “fully sampled, measured zero” from “unsampled, power unknown.” Otherwise, the same number could represent two different faults, and service staff would be unable to distinguish acquisition loss from changed load.

What evidence should the recovery log contain?

On a professional low-voltage bench disconnected from mains, simulate three cases: stop only sample delivery and resume it; change only calendar time while simulated samples continue; then restart the logic logger and resume delivery. Keep other conditions fixed where possible. Verify respectively that missing samples are marked, a clock rollback does not count the same block twice, and a boot-generation change preserves the distinction between first ingestion and retransmission. Retain a repeatable sequence, simulator logs, meter events and raw backend intervals rather than only the resulting graph.

To locate gap boundaries, identify the timestamp source. The first record may arrive after communications recover even though sampling resumed earlier. Using receiver time as sampling time can misclassify delayed but valid data as lost. Use sequence numbers in simulated data and compare the first valid sample, controller write interval and backend receipt time. If boundaries cannot be established, record the known interval rather than claiming sample-level precision from a whole-second timestamp.

If the prototype can meter independently while the host is down and retain a total, validate that path separately. Obtain traceable before-and-after totals from the independent chain and check reset, rollover and duplicate ingestion. A verified increase in the total does not allocate energy to each missing subinterval. Keep total-energy evidence and time attribution separate in the backend display.

Sign off these items separately

ItemEngineering evidencePurchasing and quality checks
Calendar clockReadings, status source and records before and after resynchronizationRTC exact code, accuracy grade, supply and package
Sample coverageExpected and valid counts, sequence numbers and boot generationSeparate acquisition and RTC validation; link samples to boards
Recovery and ingestionFirst actual sample time, receipt time and unique interval IDRecord board and firmware revisions and preserve raw logs
Independent totalCounter continuity, resets and rollover flagsIdentify the validated hardware configuration without extrapolating to other boards

Compare backend exports with meter-side records in acceptance. Check that gap flags survive refresh and reconnect, and that late valid records fill only their own interval. If the protocol cannot transmit the valid sample count, define which flags mean missing data and pending confirmation, then prove the receiver distinguishes them.

Frequently asked questions

If the RTC looks normal before and after the outage, can we treat the interval as zero consumption? Not from the clock. Look for continuous samples or independent metering evidence. If it is missing, distinguish the gap from a measured zero.

Will a more accurate 32.768 kHz timebase fix the gap? It may address confirmed time drift, but cannot recover samples never delivered. Reproduce clock steps and lost samples separately before investigating the clock, metering chain, logger or communication path.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.