Dave Tutelman's Frequency Meter
Circuit description
Original 1995
Updated 1999, 2003

This is the narrative to go with the circuit diagrams of my Frequency Meter.  I'm going to be wordy in some places and brief in others, according to my own taste.  I assume you know something about digital circuitry, so I won't have to explain the basic concepts.

There are schematic diagrams and photographs that go with the text. They are represented by thumbnail images. If you click on the thumbnail, the full-size image will open in a new window, so you can view both the image and the text that goes with it.

# Circuit Design

## Block Diagram

The principle of operation is:
• Time a complete cycle of vibration, using a digital timer.  A digital timer is a counter driven by a precise oscillator (in this case, a 2 MHz crystal-controlled DIP clock).
• At the end of a complete cycle, strobe the contents of the counter into a register, then reset the counter to time a subsequent cycle.
• At this point, the register contains a binary number proportional to the period (time) of a cycle.  Frequency is the inverse of period.  The binary time is the input to the ROM.  It completely specifies the frequency, which completely specifies the signal that needs to be sent to each segment of the three-digit readout.  I used a computer program (see Appendix) to compute each of these signals, and to generate a file that was used by a PROM-burner to program a 2732 EPROM.
The design is very generic at this level, and could be used for any kind of sensor that generates a wave related to the shaft's vibration.  I built two very different sensors, both of which work with the circuit: a piezoelectric pressure transducer built into the shaft clamp, and an infrared broken-beam fixture where the shaft vibrates between an IR-LED and an IR-detector. As shown in the diagram:
• The pressure sensor generates one "square" pulse per cycle, as the vibration presses against it, then relaxes away from it.
• The optical infrared sensor generates two pulses per cycle, one each time the shaft arrives at the midpoint of vibration.
The wave shaping and control circuits deal with the differences between the sensors, and "condition" the signal so that the rest of the circuitry sees the same signal with respect to a cycle of vibration.

A note about the components:  I used standard 74LS logic, except where otherwise marked.  (Note that the LED drivers are the higher-power 7406, not the 74LS06.)  The transistors are generic PNP transistors; just about any PNP switching device will do.  Other components:

 2-input gate 74LS00 3-input gate 74LS10 8-input gate 74LS30 Flip-flop (D-type) 74LS74 Demux (2-bit to 4-line) 74LS156 Inverters 74LS14 Counter (dual 4-stage) 74LS393 Register (6-bit) 74LS174 LED drivers 7406 (not LS) Voltage comparator LM339 7-segment LED display HP 5082-7730
The sensor components (both pressure and optical) were purchased from All Electronics (http://www.allelectronics.com), toll free order line 1-888-826-5432. That was in 1995. There are similar components that might serve as replacements in the current catalog.

The total cost of the electronic components probably doesn't exceed \$25.  Additional cost (case, power, board, wiring, programming the PROM, etc) will depend on how well-equipped your electronic workshop is.

## Input Section - Sensor & Wave Shaping

The input section is an inexpensive LM339 comparator, connected with a bit of positive feedback to sharpen the transition and to add a bit of hysteresis (that's "snap action").  The feedback resistor should be chosen for the best hystersis characteristics.  The 220K or so that I've shown should work nicely, but you may want to put in a trimpot.

You will definitely want to use a 1K trimpot to set the threshold.  This must be adjusted when you change sensors, and may need adjustment from time to time as the sensors age.  I made mine accessible through a narrow screwdriver hole in the front panel.  It can't be tweaked inadvertently, but you can adjust it without opening the case.

The adjustment is facilitated by two LEDs, visible on the front panel.  They are called the "wave indicators" on the Control Section schematic.  One or the other is always on, depending on whether the wave-shaper is on or off.  They show graphically the state of the wave-shaper.  With the pressure transducer, the LEDs are also used to adjust the clamp pressure.

Either sensor assembly can be connected to the chassis via a 4-pin connector:

• The piezoelectric pressure transducer simply connects to the comparator inputs.
• The optical sensor needs to be powered, a job handled by the other two leads which supply +5v and ground.  I got away with no resistors on the optical sensor assembly; you probably can too.
There's a story behind the .01uF capacitor across the input leads.  When I was originally debugging the circuit in my basement, the frequency shown on the LEDs would "go crazy" every so often.  It would work fine for a while, then suddenly display frequencies off the scale.  It took a while for me to realize what it was.  Remember the old Memorex commercials, "Is it live or is it Memorex?", with Ella Fitzgerald singing a high note that breaks a window?  Well, I was listening to Ella Fitzgerald tapes while I worked.  The speakers were directly over my workbench.  Eventually, I noticed that the meter "went crazy" whenever Ella hit a high note, and remembered those commercials.  I also remembered that the piezoelectric transducers were originally made as high-frequency microphones. Most of the time, they were picking up shaft vibrations, but when Ella sang loud and high they picked up her voice and sent it to the frequency meter.  The capacitor (and 100K resistor) were added as an "Ellatenuator", an RC low-pass filter.

## Control & Counter Sections

### Control section

The input to the control section is a squared logic level that pulses once a cycle for the pressure transducer and twice a cycle for the optical transducer.  It is fed to a counter, the first three stages of which are used.  The idea is to get a gating signal the width of a full cycle of vibration; that's a "pulse and back" for pressure and two of them for optical.  The first three output bits of the counter are selected by a DIPswitch to be fed to the control logic.  The bits are:
• A - the gating signal for the pressure sensor.
• B - the gating signal for the optical sensor.
• C - a half-speed signal, whose purpose will be described below.
The control logic (consisting of two flip-flops and a number of gates) generates two outputs:
• A strobe pulse, which occurs precisely at the end of the gating signal, and lasts for exactly one count.
• A counter reset, which starts as soon as the strobe turns off, and which persists (to hold the counter off) until the beginning of the next gating signal.
At this point, we need to understand that this design, unlike most commercial frequency meters, has no "reset" or "start" buttons.  It measures a single cycle and displays the frequency that cycle represents.  It then waits a cycle, continuing to display the same frequency.  The next cycle, it starts counting again, and displays the new measurement at the end of that cycle.  So it updates the display with the latest reading every second cycle of vibration.  OK, time for some numbers:
• The typical range of shaft vibration is from 240cpm to 340 cpm.
• That is about 4 per second to 6 per second.
• So the number on the display refreshes itself with a new reading 2 to 3 times a second.
I find that a very acceptable rate to "mentally average".  It certainly shows whether a reading is stable or not; an unstable reading will jump around two or three times a second, while a stable reading will hold steady or only change by a count or two.  But I was afraid that I might want a more static reading, and it's possible that some users will.  So the "half-speed" output of the counter (bit C) can be used as part of the gate, to slow down the refresh.  Thus the DIPswitch settings are:

 Normal Refresh (2-3 per sec) Slow Refresh (1 per sec) Pressure sensor (or other sensor giving one pulse per cycle) A "on" A & B "on" Optical sensor (or other sensor giving two pulses per cycle) B "on" B & C "on"

### Counter section

The counter consists of 20 bits of 74LS393 chips.  The first (least significant) ten bits are just a count-down of the frequency from 2MHz (put out by the crystal clock) to 1953Hz, giving a timing resolution of just over a half millisecond.  (Yes, that is almost the same as the time the ball spends on the clubface during impact.  And no, there is no relationship; it's pure coincidence.)  This is able to resolve frequencies as high as 350cpm to within one cpm.

The most significant ten bits are used as readout.  This allows frequencies as low as 114 cpm to be measured.  It also allows display of higher frequencies than 350, but the resolution on frequencies above 350 will be more than one cpm.

This allocation of counter sections was designed using a computer program described in the appendix.

The counter is a straight binary counter, except for two interesting variations:

• When the most significant 8 bits all reach '1', a gate prevents further pulses from advancing the count.  This prevents the counter from "wrapping".  If it were allowed to wrap, then frequencies below its range of 114cpm would show up as very high frequencies.
• Two bits of the high frequency section (about 8 and 16 KHz) are used as a clock to multiplex the 3-digit LED display.  More about this in the chapter on the display section.

## Register & Display Sections

### Register and PROM sections

The register and PROM sections are very straightforward.  Two 74LS174 hex-D flip-flops are used for the register; we use ten of the twelve bits.  Because the control logic was designed as synchronous (clocked) logic, strobe pulse is synchronized to the counter clock so the counter doesn't change value during the strobe.

The 2732 PROM has its 32K bits arranged as 4096 bytes of 8 bits each.  We use most of it, arranging it as:

• 1024 rows (10-bit address from the register stage), by
• 3 digits for the display (2-bit display multiplex clock, with one phase not used), by
• 7 bit "mini-bytes" for the seven display segments.
Since the 2732 PROM is getting harder to find these days (low capacity makes it "obsolete"), I have labeled the pinouts with their generic designations, and provide below a table for the actual pinouts for several different models of PROM.  You should tie unused address leads to "0", if you use a bigger PROM than the 2732.

 2732 Pinouts 2764 Pinouts 27128 Pinouts A0 8 10 10 A1 7 9 9 A2 6 8 8 A3 5 7 7 A4 4 6 6 A5 3 5 5 A6 2 4 4 A7 1 3 3 A8 23 25 25 A9 22 24 24 A10 19 21 21 A11 21 23 23 D1 9 11 11 D2 10 12 12 D3 11 13 13 D4 13 15 15 D5 14 16 16 D6 15 17 17 D7 16 18 18 E ' 18 20 20 G ' 20 22 22

### Display section

The display consists of three seven-segment LED display DIPs.  They are common-anode devices, and we use the anode to multiplex the pulses.  That is:
• During one "phase" (one count of the display multiplex clock), a positive pulse is applied to the anode of one of the digits.  This is done by the 74LS156 decoder and the PNP driver transistors.
• At the same time, the display multiplex clock tells the PROM which digit is the current "phase".  The PROM applies bits to its output corresponding to that digit.  The output 7406 drivers apply negative pulses to some of the segments, turning on the display for that digit.
• During three of the four count "phases", one or another of the digits is being pulsed with the correct display information for that digit.  On the fourth phase, it rests.
This is well-known as the most efficient way to activate a multiple-digit LED display.

# Physical Design

The physical design includes the electronic packaging and the construction of the sensors and clamps. Each of them is described in this section, complete with photographs.

## Electronic packaging

 The electronics is built into a plastic case originally intended for telecommunications equipment. The box has snap locks on the side for full top access to the circuitry. The front panel is dark red transparent plexiglass, so the red LED displays can be seen but the circuitry cannot. The front panel has small holes for access to the trim adjustments of the input threshold and hysteresis. The back of the case has a large open area for cables and connectors. The next photo shows the electronics with the top shell removed from the case. The circuit is built on a prototyping board; I did not make a printed-circuit board. All the ICs are socketed, and the sockets have long wire-wrap leads. The 7-segment LED displays are mounted in right-angle sockets, so the are against the transparent red front of the case. The "wave indicator" LEDs are also against the front panel; one is mounted on the top of the circuit board and the other (not visible in the photo) is in the same position on the bottom of the board. The controls for adjusting the input threshold and hysteresis are multi-turn potientiometers. They are mounted near the front panel, with the screw adjustment facing the panel. There is a small hole in the panel in front of each. With some manual dexterity, it is possible to use a small screwdriver to adjust them without opening the case. The cable to the sensor is a flat "rainbow" ribbon cable, which connects to the circuit board via a pin plug. Each sensor has its own cable and plug, so they can be interchanged. A clamp at the open back of the case provides strain relief for the connector and circuit board. To change the sensor, you must: Remove the top of the case. Unplug the sensor cable and loosen the strain relief. Plug in the other sensor, and position and tighten the strain relief. Change the DIP switch to reflect the proper counting mode. Adjust the input trimmers. Each sensor is electrically different, and the threshold and hysteresis must be set anew. Replace the top of the case.

## Pressure sensing clamp

 One feature of this frequency meter is that it can use either an optical sensor (described above) or a piezoelectric pressure transducer. The transducer is mounted in the clamp, in such a way that pressure is applied and released as the shaft vibrates. This picture shows the pressure-sensing clamp in use. The entire assembly is driven by a woodworking vise attached to the workbench. I use it with the shaft vertical, but that is not a necessity. Choose the orientation for rigidity first, and then convenience. The clamp consists of three pieces of hardwood coupled loosely together. The two upper pieces are 5" long, and have matching V-grooves for the shaft. They are held together by wood screws which are only partway screwed in. For the rest of their length, they slide in the pilot hole, allowing the pieces to be separated (as shown) to insert or remove the shaft. The lower piece is a bit longer, and contains the transducer. It is fastened to the middle piece by a hinge at the "back" (the left side in the picture) and a couple of springs in the "front". The springs are 20-pound automotive springs. When the boards are almost touching, the pair of springs assure that a 35-pound force is being applied at the front of the clamp. If the force is applied uniformly on the top piece, then the same force must be applied at the hinge, so the total force on the top piece is 70 pounds. The shaft holds the two pieces apart, so the full 70 pounds is shaft clamping force. The view from the front shows the circular piezoelectric transducer fastened to the bottom piece. There is a smaller piece of fairly firm neoprene attached to the middle piece. When the springs are compressed enough, the neoprene presses on the transducer. The aluminum half-round on the top piece is exactly halfway between the springs and the hinge. It is the point against which the vise closes, so that is where the force is applied to the clamp. That guarantees equal forces in the hinge and the spring, so the clamping pressure is uniform over the 5" of the shaft that are clamped. The other function of the half-round is to allow a change of angle between the jaws if a gripped shaft is inserted in the V-groove. The bottom piece rests flat against one jaw of the vise. The top piece uses the half-round as a pivot or fulcrum, allowing the angle to adjust itself. The following steps are required to set up for measurement: Place the whole assembly, including the shaft, in the vise, and begin to close the vise jaws. As you tighten the vise jaws, watch the "wave indicator" LEDs on the electronics unit. When they switch from one LED to the other, stop tightening and back off a tiny bit, but not enough to switch them back. At this point, the following conditions are met, which are necessary for stable and repeatable frequency readings: The transducer has pressure on it that is just about at the threshold, for the resting shaft. That way, when the shaft is plucked, the threshold will be near the center of the vibration. The springs are compressed to the same amount for every measurement. Because of the way the design distributes forces, this assures a known, uniform clamping pressure. Now pluck the shaft and allow it to vibrate. The measured vibration is in the plane perpendicular to the wooden pieces. When the head or tip weight moves toward the bottom board, it causes the neoprene to press on the transducer harder. When the tip moves toward the top board, it relieves the pressure on the transducer. These pressure variations are turned into voltages and sent to the electronics unit. If the wave indicator LEDs alternate up and down when the shaft is plucked, then you know that it is working properly. If not, you need to increase or decrease the pressure from the vise until the LEDs alternate in synchronism with the vibrations. A better and longer-term solution may be to adjust the threshold and hysteresis for the best, most stable alternations.

The pressure-sensing clamp is a very convenient design, and takes very little bench space compared to the optical arrangement described above. Unfortunately, it has a couple of  problems in practice:
• My workbench is very rigid in an up-down vibration mode. But it is not nearly as rigid in resisting horizontal forces at tabletop level. Sadly, any orientation for the clamp in the vise exerts such a horizontal force. The result was sufficiently flexibility of the clamp to lower the readings by about 10cpm. (It is a heavy free-standing table. If it were against a wall and bolted to the studs, it would work much better.)
• With age and pressure cycles, the transducer appears to have lost some of its original stability and sensitivity. If you choose to use a pressure transducer, let me recommend that your design include a provision for replacing the transducer.
Because of these problems, the frequency meter readings have gained a lot of stability and accuracy since I changed over to the optical system.

# Acknowledgments

I'd like to thank Burgess Howell for digitizing my paper drawings.  He more than just scanned them in; he also vectorized them from my hand sketches to quality engineering drawings.  Also, Jim Witler double-checked the drawings and caught a few circuit errors before anybody had any disasters building it.  Finally, I'd like to thank Paul Nickles of Clubmakers' Heaven for providing me just enough data to motivate me to design and build this beast.

# Appendix: Computer Analysis & Files

A computer program was used to:
1. Determine the number of stages of pre-countdown and the number of significant bits to drive the display.
2. Lay out the bits in the ROM, and write it to a file acceptable to a PROM-burner.
Here is a discussion of the program and its results, including a downloadable version of the PROM file ( which you will need if you build the frequency meter) and a downloadable version of the C++ source code for the program.

## A1: Design of counter stages

The first purpose of the program was to design the counter.  It computed and printed out the frequencies measured by applying a 1 MHz (that's 1, not 2 MHz) signal to a counter consisting of M pre-stages followed by N post-stages.  I checked by eye to see, for each run:
• What was the lowest frequency that could be read.  (This was completely dependent on M+N.)
• What was the highest frequency where the next frequency read was just 1 cpm higher, with no frequency skipped.  (This was completely dependent on M.)
The following table summarizes the results of the program.

 Pre- Stages Post- Stages Low Freq First Skip Freq 8 10 229 502 9 9 229 352 9 10 114 352 10 8 229 281 10 9 114 281 10 10 57 281

In trying to figure the range I had to have, I consulted the 1995 DSFI Shaft Fitting Addendum. The lowest frequency driver was 194 cpm  (FiberSpeed FS-100), and the highest frequency 5-iron was 338 cpm  (TT Dynamic X).  The row that covered the entire range was the highlighted one, with 9 pre-stages and 10 post-stages, so I used it.

The sharp-eyed among you may have noticed that the circuit actually has 10 pre-stages, not 9.  That's because the oscillator I was about to get cheaply (well, free; it was in my basement) was a 2MHz clock, not 1MHz.  So I used the extra pre-stage (it was on the chip anyway) to count from 2MHz to 1MHz.

## A2: PROM data file

After designing the counter, I extended the program to compute the bits needed for the display ROM.  Since the program could already go from the binary register content to a decimal three-digit frequency, I just had to tell it how to express each digit as seven display segments.

I also set it up so that:

• Above 999cpm, the display says "HI", for "too high to display".
• Below 115cpm, the display says "LO", for "too low to display".
If you want to build your own frequency meter from these plans, you'll need the file from which you can burn the ROM, or the program to generate it.  Here's a zip you can download, which contains:
• The raw binary file to feed to a ROM burner.
• The C++ source code for the program.
• The PC executable for the program.
Enjoy!

Dave Tutelman

### History:

March 1995

• Built the frequency meter.
• Documentation consisted of hand drawings.
1999
• Burgess Howell scanned the drawings and converted them to good digital images.
• I wrote the description and John Muir added it to Clubmaker Online.
January 2003
• Corrected the drawings (finally) as suggested by Jim Witler.
• Added sections on physical design, with photographs.