Frequency in physics refers to the number of oscillation periods per unit time. To measure the frequency of electrical vibrations digitally, one needs to convert the waveform into pulses and count how many of those pulses have arrived over a certain time.
The simplest way to obtain pulses from different waveforms is to use a half-wave rectifier on diode D1, followed by a parametric voltage regulator on Zener diode D2, and a resistor R1.
The Zener diode limits the signal voltage not to damage the logic chips but to keep them operational. Resistor R1 limits the operating current of the Zener diode. Resistor R2 pulls the node output to the ground to protect it from interference.
Let's recall the diagram of an electronic clock from the other post. An electronic clock is a digital pulse counter. In this case, each digit is processed by a binary decimal counter on half of the CD4158 chip, decoded by the CD4511 decoder, and displayed on a seven-segment indicator.
Shift to the next digit is also done here, accounting for the specifics of each digit: seconds and minutes are counted up to 59, and hours—up to 23.
Counting hours, minutes, and seconds is a special case because we're used to it. Supposing we need a plain pulse counter where each digit works as a standard, In that case, it goes to zero and sends a carry pulse after nine—then a much more compact solution is possible.
In an electronic clock, for every two digits, we needed three and a quarter chips: two seven-segment decoders, one dual counter, and one 2AND logic element. The CD4081 chip has four of those.
And here, for a total of three digits, two chips are enough: a counter and a decoder! Moreover, four chips and three transistors allow us to count from 000000 to 999999!
This is the primary default circuit from the datasheet for the MC4553B, a 3-digit BCD counter. We will use it today in our frequency meter. But first, let's take a closer look at the operation of this fantastic chip.
It all starts with the pulse shaper and the DISABLE input, which, as the name suggests, disables counting if the voltage level is high.
Next, we have three BCD counters, precisely the same as the CD4518 halves we've used in the digital clock.
3ANDs are used for carrying (and that's just what they do); if Q0 and Q3 are ones, that is, we have the number b1001 = 9, and the next clock pulse arrives, then a carry pulse is generated, and the counter goes to b0000 = 0.
When the chip counts to 999, and the next pulse arrives, it goes to 000 and sends a carry pulse to the OVERFLOW output.
The diagram below shows the MR (Master Reset) input. When a logical one arrives at it, all four counters are reset, as well as the scanner, which we will cover a little later.
Next, we see three 4-bit latch registers. We discussed a shift register with a latch function thoroughly in the post. To be brief, the register is 'transparent'. It simply transmits data from the inputs to the outputs as long as the input LE (LATCH ENABLE) is low.
A logical one at LE makes the register stop responding to the state of the inputs, saving the stored states at the outputs.
This is an excellent feature for meters with indicators because it allows the readings to be frozen so that a person can actually read them.
Flip-flops are also used, for example, in analog-to-digital conversion, to preserve the finished, complete result and not confuse it with the intermediate one. Latches are also a necessity for data communication modules.
If you program microcontrollers, then you probably know that their peripheral architecture contains many latched registers, and the code often interacts with them.
This is very convenient, allowing asynchronous peripherals to work independently without adding processing load and wasting program memory. And if and when an interrupt or a flag state indicates the presence of a ready result, the program can start processing it.
Data from the outputs of three four-bit latching registers is supplied to a multiplexer controlled by the scanner.
This scanner is a counter-decoder, similar to our trusty CD4017. Only the CD4017 counts from 0 to 9, and the scanner counts from 0 to 2 or 1 to 3, whichever you prefer best.
The scanner is clocked by an oscillator, and the oscillation frequency is set by capacitor C1. And if this capacitor is absent, then clocking can be done from an external source.
So, at the outputs Q0..Q3, we will have a binary representation of a digit, and the number of this digit, the register, is output to the ¬DS1..¬DS3. We'll have a low level at a single output, corresponding to the position of the output digit.
With the help of a multiplexer and a scanner, we can get by with just one seven-segment decoder for three bits! We use MC14543B here, and it works exactly like the CD4511 in the clock application.
This economical way of displaying the digits, when they are shown one after another, is called dynamic and is very often used in projects with microcontrollers.
In this diagram, we see that all six indicators are activated by three transistors from the left MC14553B chip. The scanner on the correct chip is synced with clock pulses from the left one.
And for each of the three-digit decimal counters to start outputting readings from the same first digit, the MR input (MASTER RESET) resets the scanner and the counting registers.
So, we connected our two-diode pulse shaper to the CLOCK INPUT and got ourselves a pulse counter from 0 to 999999.
To turn this counter into a frequency meter, we need to program the following sequence:
Do we need a microcontroller, then? Not really; a sequencer can handle such a simple task.
Here, we have a quartz-stabilized clock generator that produces a frequency of 2 hertz, precisely the same as in our homemade clock. And the role of the sequencer is played by our beloved CD4017; it just needs some help from eight diodes.
When output Q0 is high, our pulse counter gets a master reset. Then, a second passes until the logical one moves to Q1 and then to Q2. It is not output anywhere; the counter continues to count for itself.
As soon as a second has passed, the counter has registered the number of pulses corresponding to the input signal frequency. Then, the logical one from Q3 sends the LATCH ENABLE signal.
The pulse counter continues to count, but this does not affect the indicator readings, and they stay put for three and a half seconds.
Then, the logical one is once again at Q0, a master reset occurs, and the cycle repeats.
This is how our DIY frequency meter works, which we've managed to program using just diodes and no microcontroller.
Hi! I'm Kevin! I am a very curious engineer :))
I'm the website founder and author of many posts.
I invite you to follow exciting experiments, research, and challenges.
Let's go on to new knowledge and adventures!