You can easily compute the time deviation per hour from crystal frequency accuracy using the UliEngineering Python library:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
from UliEngineering.Electronics.Crystal import crystal_deviation_seconds_per_hour
# Compute deviation for 10 ppm crystal
deviation = crystal_deviation_seconds_per_hour("10ppm")
print(f"Deviation (10ppm): {deviation*1000:.1f} ms/hour")
# Compute deviation for 50 ppm crystal
deviation = crystal_deviation_seconds_per_hour("50ppm")
print(f"Deviation (50ppm): {deviation*1000:.1f} ms/hour")
# Compute deviation for 100 ppm crystal
deviation = crystal_deviation_seconds_per_hour("100ppm")
print(f"Deviation (100ppm): {deviation*1000:.1f} ms/hour")Example output
Deviation (10ppm): 36.0 ms/hour
Deviation (50ppm): 180.0 ms/hour
Deviation (100ppm): 360.0 ms/hourThe crystal deviation seconds per hour calculation determines the time error that accumulates over one hour due to crystal frequency inaccuracy. This is essential for timing applications, clock synchronization, and understanding the long-term accuracy of crystal oscillators. The deviation is proportional to the frequency accuracy specified in parts per million (ppm) and scales linearly with time.
The deviation is computed using the formula: $\Delta t = \text{ppm} \times 10^{-6} \times T$, where $\Delta t$ is the time deviation, $\text{ppm}$ is the frequency accuracy in parts per million, and $T$ is the time interval (3600 seconds for one hour). For example, a 10 ppm crystal will deviate by 36 milliseconds per hour.