NTP, Rust, And Arduino Make A Phenomenal Frequency Counter

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.

Easy Frequency Counter Looks Good, Reads To 6.5 MHz

We were struck by how attractive [mircemk’s] Arduino-based frequency counter looks. It also is a reasonably simple build. It can count up to 6.5 MHz which isn’t that much, but there’s a lot you can do even with that limitation.

The LED display is decidedly retro. Inside a very modern Arduino Nano does most of the work. There is a simple shaping circuit to improve the response to irregular-shaped input waveforms. We’d have probably used a single op-amp as a zero-crossing detector. Admittedly, that’s a bit more complex, but not much more and it should give better results.

Continue reading “Easy Frequency Counter Looks Good, Reads To 6.5 MHz”

Radio Shack Shortwave Goes Digital

If you spent the 1970s obsessively browsing through the Radio Shack catalog, you probably remember the DX-160 shortwave receiver. You might have even had one. The radio looked suspiciously like the less expensive Eico of the same era, but it had that amazing-looking bandspread dial, instead of the Eico’s uncalibrated single turn knob number 1 to 10. Finding an exact frequency was an artful process of using both knobs, but [Frank] decided to refit his with a digital frequency display.

Even if you don’t have a DX-160, the techniques [Frank]  uses are pretty applicable to old receivers like this. In this case, the radio is a single conversion superhet with a variable frequency oscillator (VFO), so you need only read that frequency and then add or subtract the IF before display. If you can find a place to tap the VFO without perturbing it too much, you should be able to pull the same stunt.

Continue reading “Radio Shack Shortwave Goes Digital”

Hackaday Podcast 036: Camera Rig Makes CNC Jealous, Become Your Own Time Transmitter, Pi HiFi With 80s Vibe, DJ Xiaomi

Hackaday Editors Elliot Williams and Mike Szczys work their way through a fantastic week of hacks. From a rideable tank tread to spoofing radio time servers and from tune-playing vacuum cleaners to an epic camera motion control system, there’s a lot to get caught up on. Plus, Elliot describes frequency counting while Mike’s head spins, and we geek out on satellite optics, transistor-based Pong, and Jonathan Bennett’s weekly security articles.

Take a look at the links below if you want to follow along, and as always tell us what you think about this episode in the comments!

Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!

Direct download (60 MB or so.)

Continue reading “Hackaday Podcast 036: Camera Rig Makes CNC Jealous, Become Your Own Time Transmitter, Pi HiFi With 80s Vibe, DJ Xiaomi”

Frequency Counting A Different Way

Counting frequency is one of those tasks that seems simple on the face of it, but actually has quite a bit of nuance. There are two obvious methods, of which the first is to count zero crossings for some period. If that period is one second you are done, otherwise it’s a simple enough case of doing the math. That is, if you count for half a second, multiply the result by 2, or if you count for 10 seconds, divide by 10. The other obvious method is to measure the period of a single cycle as accurately as you can. Then there’s this third method.from [WilkoL], which simultaneously counts a known reference clock alongside the frequency to be measured.  You can see the result in the video, below.

The first method is easy but the lower the frequency you want to measure, the longer you have to count to get any real resolution. Also, you need the time base to be exact. For the second method, you need to be able to make a highly precise measurement. The reason [WikolL] chose the third method is that it doesn’t require a very precise time base — a moderately accurate reference oscillator will do. The instrument gets good resolution quickly at both high and low frequencies.  Continue reading “Frequency Counting A Different Way”

Improving A Cheap Frequency Counter With GPS

Frequency counters are useful tools for anyone that finds themselves regularly working with time-variant signals. There are a huge range available, from cheap eBay specials to expensive lab-grade hardware. [itakeyourphoto] had a counter on the lower end of the cost spectrum, and decided to make some improvements with the help of GPS (Youtube link, embedded below).

The fundamental weakness of a cheap frequency counter is usually the internal reference against which all other signals are measured. The more accurate this is, the more accurate the counter will be. [itakeyourphoto] determined that a great way to generate a reasonably good reference frequency was by using a uBlox GPS module. Once locked on to satellites, it can use a numerically controlled oscillator to output any frequency up to 15MHz with good accuracy.

The cheap frequency counter in question used a 13 MHz internal reference, so the uBlox module was programmed to match this. [itakeyourphoto] reports that it compares favorably to his higher-end GPS-disciplined oscillators, displaying very little drift or other aberrations.

We see plenty of clocks using GPS for its accurate time, but we’ve seen projects that attempt to go even further than that, too. Video after the break.

[Thanks to jafinch78 for the tip!]

Continue reading “Improving A Cheap Frequency Counter With GPS”

Hacking A Cheap EBay Frequency Counter

eBay is a wondrous land, full of Star Wars memorabilia in poor condition, old game consoles at insane markups, and a surprising amount of DIY electronics. [TheHWCave] found himself tinkering with a common frequency counter kit, and decided to make a few choice improvements along the way (Youtube link, embedded below).

The frequency counter in question is a common clone version of [Wolfgang “Wolf” Büscher]’s minimalist PIC design. Using little more than a PIC16F628 and some seven-segment displays, it’s a competent frequency counter for general use. Clone versions often add a crystal oscillator tester and are available on eBay for a fairly low price.

[TheHWCave] found that the modifications were less than useful, and developed a way to turn the tester components into a more useful signal preamp instead. Not content to stop there, custom firmware was developed to both improve the resolution and also add a tachometer feature. This allows the device to display its output in revolutions per minute as opposed to simply displaying in hertz. By combining this with an optical pickup or other RPM signal, it makes a handy display for rotational speed. If you’re unfamiliar with the theory, read up on our phototachometer primer. If you’re looking to modify your own kit, modified firmware is available on Github.

We’ve seen other eBay kit specials modified before. Being cheap and using commodity microcontrollers makes them a ripe platform for hacking, whether you just want to make a few tweaks or completely repurpose the device.

[Thanks to Acesoft for the tip!]

Continue reading “Hacking A Cheap EBay Frequency Counter”