Home > News & Updates > Arduino News > NTP, RUST, AND ARDUINO MAKE A PHENOMENAL FREQUENCY COUNTER

NTP, RUST, AND ARDUINO MAKE A PHENOMENAL FREQUENCY COUNTER

Summary of NTP, RUST, AND ARDUINO MAKE A PHENOMENAL FREQUENCY COUNTER


This article describes an Arduino-based frequency counter project that offloads timing to a host PC running Rust software. By connecting the PC clock to a master NTP source, the system achieves atomic accuracy, outperforming standard microcontroller counters limited by their internal crystals. The setup is ideal for monitoring long-term stability or calibrating other instruments rather than quick measurements.

Parts used in the Arduino Frequency Counter:

  • Arduino microcontroller
  • Host PC
  • Rust software
  • NTP (Network Time Protocol) clock source
  • Clock crystal

Making a microcontroller perform as a frequency counter is a relatively straightforward task involving the measurement of the time period during which a number of pulses are counted. The maximum frequency is however limited to a fraction of the microcontroller’s clock speed and the accuracy of the resulting instrument depends on that of the clock crystal so it will hardly result in the best of frequency counters. It’s something [FrankBuss] has approached with an Arduino-based counter that offloads the timing question to a host PC, and thus claims atomic accuracy due to its clock being tied to a master source via NTP. The Rust code PC-side provides continuous readings whose accuracy increases the longer it is left counting the source. The example shown reaches 20 parts per billion after several hours reading a 1 MHz source.

It’s clear that this is hardly the most convenient of frequency counters, however we can see that it could find a use for anyone intent on monitoring the long-term stability of a source, and could even be used with some kind of feedback to discipline an RF source against the NTP clock with the use of an appropriate prescaler. Its true calling might come though not in measurement but in calibration of another instrument which can be adjusted to match its reading once it has settled down. There’s surely no cheaper way to satisfy your inner frequency standard nut.

Source: NTP, RUST, AND ARDUINO MAKE A PHENOMENAL FREQUENCY COUNTER

 

Quick Solutions to Questions related to Arduino Frequency Counter:

  • How does this project achieve high accuracy?
    The system offloads timing to a host PC tied to a master NTP source, providing atomic accuracy.
  • What limits the maximum frequency of standard microcontroller counters?
    The maximum frequency is limited to a fraction of the microcontroller's clock speed.
  • Can this setup be used to discipline an RF source?
    Yes, it can be used with feedback and a prescaler to discipline an RF source against the NTP clock.
  • What is the primary use case for this specific instrument?
    It is best suited for monitoring long-term stability or calibrating another instrument once settled.
  • Does the accuracy improve over time?
    Yes, the accuracy increases the longer the system counts the source, reaching 20 parts per billion after several hours.
  • What programming language is used on the PC side?
    Rust code is used on the PC side to provide continuous readings.
  • Is this the most convenient type of frequency counter?
    No, the article states it is hardly the most convenient of frequency counters.

About The Author

Scroll to Top