# Frequency Counter

Discussion in 'The Projects Forum' started by Sparky49, Sep 30, 2011.

1. ### Sparky49 Thread Starter Active Member

Joined:
Jul 16, 2011
816
416
Hi everyone!

I know I haven't been very active on here for a week or so now, but I'm still interested in learning from you folks. I kind of feel a bit bad asking for lots of help, but not helping out with some of the more basic questions which appear on here, so please forgive me for that.

It's the weekend now, so I'll finish my maths homework and have a look at the boards to see if there are any questions I can help with.

Anyhow, here's my question.

I'm considering making a frequency counting circuit, with a seven segment display output. I'm not too concerned about the range of measurable frequency with the project, but I would like to have a fairly wide range, to test anything in the near future.

A quick search on Google revealed this circuit;

http://www.eleccircuit.com/wp-conte...aler-with-counter-by-ic-digital-451174190.gif

However, there's a couple of things I don't understand, and would appreciate some help with.

1. what are the switches along the top for? That's a lot of switches to have on the control panel, so I can't believe that they are for general operation.

2. As for the actual input, would that be via the 'load'? If not, what would be the input to the circuit?

3. What does it mean by UP/DN?

4. What does it mean by latch?

My apologies for the number of questions, I have tried my hardest to get a grasp of this circuit (by looking at datasheets, etc) but have so far failed.

I'm also sorry if I haven't provided you with sufficient information. Please ask for more if you need some.

Sparky

Joined:
Apr 5, 2008
14,582
1,977
Hello,

The switches on top are there for adding or subtraction the MF frequency when used in a radio.
The counter will be connected to the mixing oscillator wich is the MF frequency off.

The up/down is what it says , count up or down.

The latch is to store the counts into the display.

Bertus

Sparky49 likes this.
3. ### Sparky49 Thread Starter Active Member

Joined:
Jul 16, 2011
816
416
Thanks for the uber quick reply Bertus!

So this isn't the complete circuit?

Joined:
Apr 5, 2008
14,582
1,977
Hello,

No, You will need a timebase with the signals for the gate and latch.

Bertus

Sparky49 likes this.
5. ### Wendy Moderator

Joined:
Mar 24, 2008
20,502
2,361
Frequency counters are one of the simpler circuits to build for DIY test equipment. If you go to 7 digits you should consider a crystal oven, such as the one The RB has at his website.

http://www.romanblack.com/xoven.htm

Basically all the time base does is open a gate for a even increment of a second or less.

It is also a good idea to reverse it and allow access to the counter. That way you can do odd items like count coils of wire while winding them, or measure periods of waveforms.

Sparky49 likes this.
6. ### upand_at_them Active Member

Joined:
May 15, 2010
196
25
A lot can be gleaned by looking over the 74190 datasheet. It's an Up/Down Decade Counter. So UP/DN controls the direction it will count. CLOCK is the signal that will be used to increment/decrement the counter. And LOAD forces the counters to take the parallel inputs and uses that to determine the count (thereby overriding the counting function).

Since the parallel inputs are connected to the DIP switches you can then assume that they are used to test the circuit by setting a particular value for each digit.

LATCH does what you'd expect; it latches the value onto the display.

Sparky49 likes this.
7. ### MrChips Moderator

Joined:
Oct 2, 2009
11,765
3,025
The OP may not fully understand what you are talking about.

If you are planning to build a straight forward frequency meter, you don't need the switches.

I built a frequency counter similar to this one to be used on an analog radio receiver (anyone remember those?). You selected the radio station by turning a tuning dial which had a string attached to it and moved a pointer across the front of a scale (like a ruler) to indicate the station frequency. This was in the days before digital readouts. The string from the tuning dial was also wrapped around a wheel that was attached to the spindle of a variable air-gapped capacitor. The capacitor was part of an oscillator circuit whose frequency was controlled by the capacitor, and hence the tuning dial. (Are you still with me?)

So, the objective of the digital display is to show the frequency of the station you wanted to listen to. This feature is particularly important if you were a DX'er, a person who searches the radio bands for far away radio stations. A DX'er would usually have a station guide, a listing of all radio stations from around the globe, showing operating frequency, power transmitted and program times (the definitive one being WRTH - World Radio TV Handbook). So a DX'er, would be searching for a distant radio station based on the transmitted frequency.

So the frequency meter gets its input from the oscillator called the local oscillator. For the AM band (or Medium Wave band) it is common to set the local oscillator to 455KHz above the transmitted signal. When the local oscillator signal is mixed with the incoming radio signal, you get a 455KHz signal (plus a whole bunch of other unwanted signals). The beauty here is that if you tune all your intermediate amplifiers to the one 455KHz signal you will pick up the single radio station that you are interested in. The 455KHz is called the intermediate frequency or IF.

The problem with your frequency counter is that it is now reading 455 too high. If you can preload your counters with -455, you would in fact be able to subtract this 455 and therefore be able to display the proper station frequency.

Why the latches? You want to be able to display your results even while you are counting. Hence the latches, holds, freezes the display to show the last results while the new results are being counted.

Here is a picture of my DX-150B Communications Receiver with my homemade frequency readout. It has a three-way switch that allows me to preset the counter to 455, 0, or 99545 in order to add or subtract the IF of 455KHz.

Hope this helps.

Last edited: Oct 1, 2011
Sparky49 likes this.
8. ### Sparky49 Thread Starter Active Member

Joined:
Jul 16, 2011
816
416
Thanks to everyone to who posted on this, it's been really helpful.

Mr. Chips has hit it on the head though, I didn't know what some of you were talking about... I tried to understand, really!

Mr. Chips, I'm not looking to use it to measure an incomming radio signal, as your fine example does. I thought it might be nice to have something which I could link a couple of probes to, which I could use to measure the frequency of a signal some where in my circuit.

Kind of like an oscilloscope, but without all the hassle of the seconds per division and guesstimating that it about 3/4s along the line...

I understand that this won't be very 'simple', but I'm up for the challenge.

So what sort of circuits will I need for the clock and latch inputs? Is it a simple as a switch and resistor?

Sparky

9. ### MrChips Moderator

Joined:
Oct 2, 2009
11,765
3,025
A frequency counter circuit is a relatively simple project to tackle. It is a classic design exercise in a college or university level course on digital electronics. For this reason, I cannot post a full solution on this forum.

Students are generally asked to present three drawings in their report, 1) block diagram, 2) timing diagram and 3) schematic diagram.

To understand what goes into the timing diagram, you have to imagine that the user of a frequency counter is not interested in seeing the counter display 0-1-2-3- etc. The counter should only display the final count.

The basic timing sequence is:
RESET-COUNT-RESET-COUNT...
The time duration of COUNT will determine the display resolution and the number of digits to display.

To incorporate the display latches into the design, the timing diagram would be modified as follows:
RESET-COUNT-LATCH-RESET-COUNT-LATCH...

Note: All timing diagrams would be drawn as volts vs time such as in an oscilloscope waveform.

Sparky49 likes this.
10. ### SgtWookie Expert

Joined:
Jul 17, 2007
22,176
1,709
To keep your counter/display circuit less complex, you might consider using a pair of 4553 3-digit BCD counters and a pair of 4543 7-segment display drivers. That's just four ICs (plus three driver transistors & a number of resistors) for a 6 digit display.

Have a look at this datasheet:
Page 6, figure 5.

You'll also want to add some functions like an overflow indicator (after all, you want to know if the incoming signal is higher frequency than you can count, right?), a prescaler (a /n circuit) so that you can count higher frequencies at the cost of lower resolution, and possibly other features.

Sparky49 likes this.
11. ### Wendy Moderator

Joined:
Mar 24, 2008
20,502
2,361
I had a similar discussion about digital clocks. Much as I hate to say it I have to disagree a little. You obviously teach, so maybe you are constrained by yourself, but it really shouldn't matter. If you were to do so and a student were to lift the design I suspect he/she would be busted. Given the shear numbers of ways to do something like this a student doesn't really have an excuse either.

If I were going to do something like this it would be with 4026 chips. There are much better out there, but this is quick and convenient. The fact there are better out there is an out.

One way I've handled it in the past is a simple block diagram. Here is something I came up with a couple of years ago for digital clocks, one of the most common projects assigned to students near as I can tell.

I guess I could come up with something similar for freq counters. What do you think?

Sparky49 likes this.
12. ### MrChips Moderator

Joined:
Oct 2, 2009
11,765
3,025
Yes, I do teach electronics at a university.

My suggestion for a hobbyist now learning digital electronics is to start out by building a time-of-day clock, HH:MM or HH:MM:SS

After this, the next step can be the frequency counter. Of course there are single LSI chips (large scale integration) that can perform these functions but you would miss out on the opportunity to learn by doing things yourself.

As for my constraints, we do students no favour by providing ready-made solutions. Too many students cut and paste, want solutions URGENTLY, and don't take the time to understand and think for themselves. I am not about to cater to those students.

Sparky49 likes this.
13. ### Wendy Moderator

Joined:
Mar 24, 2008
20,502
2,361
I tend to agree, but their is nothing wrong with providing schematics for hobbiests, who are self starting students IMO. Actually building a project, it doesn't matter as much who designed it as it is still a major learning experience. How many people really have a project work completely first time?

I'll try to have a block diagram in a couple of days. I don't think I'll break down the counter too much, like I did with the digital clock. It will be one solid block.

Sparky49 likes this.

Joined:
Apr 5, 2008
14,582
1,977
Hello,

http://homepage.ntlworld.com/g.knott/elect471.htm

Depending on the used counters, the reset can be a pure reset or a load signal for presettable counters, for the frequency offset.

Bertus

Last edited: Oct 1, 2011
Sparky49 likes this.
15. ### Sparky49 Thread Starter Active Member

Joined:
Jul 16, 2011
816
416
Thanks for the link Bertus, that's certainly easier for me to understand the concepts of the counter!

Also, thanks to Bill for taking the time to construct a diagram.

I'd just like to let you guys know that I'm not a student at school or university who's just copying circuits and work from other people. Although I'm hoping to study some electronic engineering at uni in a few years, I'm currently going through my A-levels, none of which are electronics.

The closest I get to electronics with my current subjects is in physics, but we only go as far as the potential divider.

I simply want to learn as much as I can, in a subject which I'm very passionate about.

Thanks again,

Sparky

16. ### Wendy Moderator

Joined:
Mar 24, 2008
20,502
2,361
To some of us it's just a hobby, which is OK. Truth, I prefer hobbiests to students. A student can be a hobbiest, but to a lot of them it is a way to a 9 to 5 job, which is a shame. It is also a recipe for a miserable life. You should enjoy what you do.

Sparky49 likes this.
17. ### Sparky49 Thread Starter Active Member

Joined:
Jul 16, 2011
816
416
I've sort of made the transition from student to hobby, to student for hobby!

I've always wanted to join the RAF as an engineer, but never had a specific type in mind.

Then came along the time for me to choose my gcse's, and electronics jumped out at me.

After my first lesson I was hooked and began reading further and more of my own accord, thus it became my hobby and an interest.

All because in the future I want to get a job out of it...

A bit of a muddle!

18. ### MrChips Moderator

Joined:
Oct 2, 2009
11,765
3,025
Sparky, I might add that a frequency counter is not necessarily a useful test instrument except in the case of the DX radio example I gave. An oscilloscope is by far the most useful test instrument (besides the basic DVM - digital voltmeter/test meter).

In my younger days I built two instruments based on articles appearing in Practical Wireless. A signal injector and a signal tracer. With these two instruments you can do a lot of trouble shooting of analog circuits. The signal injector is simply a oscillator at audio frequency that is used to inject an audio tone into a circuit. The original circuit is a simple oscillator using two transistors. You can use a 555 timer for this.

The signal tracer is a simple audio amplifier driving an earphone. Again the circuit uses two transistors. You can use an LM386 instead. The nice thing about the original designs was the circuits were built into the body of used fat pens or markers and used a single battery. The signal tracer can be used alone or in conjunction with the signal injector to trace where the audio signal is going.

Does anyone have back issues of Practical Wireless and may be able to dig up these articles?

Sparky49 likes this.
19. ### Wendy Moderator

Joined:
Mar 24, 2008
20,502
2,361
I'll disagree again. If you do audio work a freq counter in the audio range allows precision setting of notes as well as measuring them. Of course, you could use one of the common tuners available for music nowdays, but a freq counter also works.

I also have primitive 4 digit counter that is part of better DVM. It's been handy now and again.

Sparky49 likes this.