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

Separating Oscillator Drift From a Fixed 80 µs Offset in Two Robot Encoder Timestamps

If base and joint encoder records do not line up, timestamp the same simulated edge at both ends. Check whether the difference is fixed, accumulates or appears only in host reception.

During joint debugging, software may pair positions from the robot base controller and joint encoder board. If one side stamps receipt and the other stamps input latch, they can disagree even with synchronized clocks. That is different from clocks running at different rates. This is a low-voltage logic bench with simulated encoder signals or logs, disconnected from motors, actuators and moving mechanisms.

Define what a timestamp means before comparing precision

A distributed clock can align local counters and latch time at a designated transition. Distinguish when the encoder captures position, when the interface timestamps that position and when the host receives the record. If a trigger is followed by serial delivery, the timestamp might represent trigger, completion or data-ready. Verify the actual settings. Host scheduling and communications queues can add delay.

For an axis board designed for a 25 MHz, 3.3 V CMOS oscillator, SCTF's 2C-series SX2M25.000B10F20TNN in a four-pad 2520 package is one candidate. Check receiver levels, supply, load and delivery conditions. It is not the documented part in any particular robot; its tolerance is not a bound on synchronization between boards. With distributed synchronization active, residual error also depends on synchronization state, time capture and observation method.

Separate fixed offset from relative drift

Send one simulated pulse to two independent low-voltage boards and verify their input conditions against an external reference. Define offset as joint stamp minus base stamp. Suppose it is +80 µs at 1 second and +81 µs at 11 seconds. It is mainly fixed, changing just 1 µs over 10 seconds. Check trigger location, fixed input delay, initial clock offset and measurement repeatability. One small change does not prove oscillator error.

If another run changes from +20 µs at 1 second to +120 µs at 11 seconds, the offset grew by 100 µs in 10 seconds, or 10 µs per second, equal to 10 ppm. That is the relative slope under those conditions, not a fault finding on either part. Sampling delays that change, synchronization settling and wrong pairing can also produce a slope. Compare timebases only after verifying fixed time capture paths, pairing and sync status.

If board-to-board latches agree to a constant offset while host receipt differences jump from tens to hundreds of microseconds, investigate delivery queues, host scheduling and timestamp selection. A host plot alone does not demonstrate poor board synchronization. One minimum delay does not establish a permanent correction because queuing can vary.

Pair the same event rather than zipping log rows together

First split a simulated event from a suitable isolated source into the inputs configured for hardware capture. Save the edges and timestamps at both ends. Check polarity and triggering edge. Capturing a rise on one end and a fall on the other can turn pulse width into apparent clock offset. Record extra delay from any required level translation or isolation. Use a known path or channel as a control without changing interface requirements.

Next send numbered events and record losses and duplicates. Do not align files row by row after one side misses an event. Confirm that the latched time and position belong to the same sample. Pair by event ID and save sample and receipt times separately to show where the difference first appears.

Finally capture startup, stable synchronization and recovery in approved bench cases. After recovery, verify counter state and continuity and reestablish event alignment before reusing an old offset. Synchronization corrections can create steps and settling; keep that interval instead of comparing only endpoints. Use simulated data and do not change production machine protections to provoke a fault.

Prototype acceptance checklist

CheckEngineering or test evidencePurchasing and quality record
Clock source and interfaceMeasured input, supply, output mode and operating conditionsFull candidate code, package and lot
Timestamp definitionTrigger, latch and arrival recorded separatelyBoard and firmware revisions and changes
PairingSame event ID, latch values and receipt timesKeep missing and mismatched samples, not only averages
Relative trendFixed offset, slope or steps with sync statusCovered paths, cold boot and recovery conditions

Place any maximum time difference against its measurement point and conditions: for example the latch difference of one simulated edge or the interval within which both messages reach the host. They are different requirements. A same-frequency substitution still needs input-clock and timestamp regression to separate clock behavior from an existing processing delay.

Another useful control is to keep both working timestamp configurations and change the clock component on only one board. Compare the fitted trend. If input filtering or sampling mode changed too, a better result cannot be credited entirely to the oscillator. Separate those changes in a subsequent test.

Frequently asked questions

If every pair is about 80 µs apart, should software subtract it? First establish that the stamps come from the same event and time domain and that the difference is stable in the input or processing path. Otherwise compensation can hide bad pairing or settling after startup.

Do we still need a common-edge test if the distributed clock reports sync? Yes. It establishes a shared timebase, not when each signal was captured, which field software used or how the host paired records. A common edge plus event IDs checks the full chain.

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.