CMOS 4000 frequency counter

Thread Starter

hrs

Joined Jun 13, 2014
520
Hi,

I'm trying to piece together a frequency counter using a circuit from the MC14553 datasheet and a page from a Forrest Mims book. The schematic of what I have so far is attached. The purpose of the frequency counter is to use it with my signal generator so I don't have to use my scope to get an approximate frequency.

I'm not to sure about the frequency input. As shown the CD4011 may switch as 0.3*VDD or 0.7*VDD so it may not count a 1V p-p sinewave. Surely there needs to be some sort of comparator at the input, with as little hysteresis as you can get away with to make it as sensitive as possible? Or, since my sinewave generator sucks anyway and I'm going to redo it, build a rail to rail output in it to be used by the counter. Is that a common thing to do or should this problem be solved in the counter?

As an aside, how can we find the scan frequency that is set by C13?
 

Attachments

dl324

Joined Mar 30, 2015
18,220
The purpose of the frequency counter is to use it with my signal generator so I don't have to use my scope to get an approximate frequency.
What frequency range are you expecting it to work for? At 5V, you'd be lucky to get more than 1MHz.
I'm not to sure about the frequency input. As shown the CD4011 may switch as 0.3*VDD or 0.7*VDD so it may not count a 1V p-p sinewave.
1V peak to peak as in centered about ground? Whatever the case, you'll likely violate the maximum rise time for CD4011. The counter has a Schmitt input, so it will tolerate slower edges, but you still need an appropriate voltage swing.
As an aside, how can we find the scan frequency that is set by C13?
You can measure it with your scope.
 

crutschow

Joined Mar 14, 2008
38,329
since my sinewave generator sucks anyway and I'm going to redo it, build a rail to rail output in it to be used by the counter.
Yes, that would simplify the counter since you wouldn't have to worry about the signal amplitude (it would even work down to a 0V output setting.
 

Ian0

Joined Aug 7, 2020
13,097
A 4069UB wired as an amplifier (10M resistor from output to input, and 10k resistor and 1uF capacitor in series with the input) would make a good input amplifier - it would work with both logic and sinewaves. You can use the rest of the 4069 as buffers to make the amplified signal into a nice squarewave, or you could wire a pair of them as a Schmitt trigger -
very similar to the amplifier circuit, except that the 10M resistor goes around a pair of inverters.B96CC024-71BE-4652-8441-7DDACB4243EB.jpeg
 
Last edited:

Thread Starter

hrs

Joined Jun 13, 2014
520
What frequency range are you expecting it to work for? At 5V, you'd be lucky to get more than 1MHz.
I will probably use as 12V supply. With a 1 Hz clock and 6 digits a 1 MHz limit is fine. Yes, I would think I need to bias the input to mid rail.
A 4069UB wired as an amplifier (10M resistor from output to input, and 10k resistor and 1uF capacitor in series with the input) would make a good input amplifier - it would work with both logic and sinewaves. You can use the rest of the 4069 as buffers to make the amplified signal into a nice squarewave, or you could wire a pair of them as a Schmitt trigger -
very similar to the amplifier circuit, except that the 10M resistor goes around a pair of inverters.View attachment 234532
I like that idea! I'll test it on the breadboard and consider this vs a rail-rail output on the signal generator.
 

Thread Starter

hrs

Joined Jun 13, 2014
520
Let me begin with some overdue closure.

I ended up integrating the SWG with the counter. In it I combined post #4 and #5. So now it can also count its own frequency through the external input (I'm easily amused). The attached diagram has seen some changes after the counter was built, it may or may not work.

It turned out ok and is nice to use. Thanks for your help.
 

Attachments

Thread Starter

hrs

Joined Jun 13, 2014
520
Now I'm working on a 10 Hz to 1 MHz triangle/squarewave generator also with counter but no external input. My only problem with the above counter is that it's slow to update, a minor annoyance when trying to fine tune the frequency. Either I could drop the least significant digit and get speed at the expense of resolution, or I can multiply the input frequency. Are there other ways to get an increased update rate?

Right now I'm trying to multiply the input frequency by 4 and the remove the CD4013, that should give 4x faster frq update.
If I XOR the triangle and squarewave I get 2x, with a window detector I also get 2x but shifted. If I XOR those I get 4x. Any thoughts on this or better solutions?
 

Attachments

schmitt trigger

Joined Jul 12, 2010
2,032
First of all, congratulations on a very nice-looking project! I see that you have used a repurposed chassis from a different electronic device. Very clever!

Now about your question: if you would like to speed up the counter’s gating, there is no need for frequency multiplication. Just use a higher tap on the CD4060.
 

Thread Starter

hrs

Joined Jun 13, 2014
520
First of all, congratulations on a very nice-looking project! I see that you have used a repurposed chassis from a different electronic device. Very clever!
Thanks! The discarded electronics bin at the municipality's waste dump/recycling center is a good source for project boxes.

Now about your question: if you would like to speed up the counter’s gating, there is no need for frequency multiplication. Just use a higher tap on the CD4060.
But if I use a higher tap, or remove the CD4013 which divides by 4, then I'd get a count of 250 for a 1 kHz signal wouldn't I? Or how would that work without multiplying the input signal?
 

MisterBill2

Joined Jan 23, 2018
27,195
For a CMOS frequency counter, do not expect it to work with an input signal less than 5 volts. So you will need to condition the input.
To have a faster update, with a one second time base, the simple scheme is to use a CD4017 as the sequence generator, tapping into about one KHZ in the time base divider. The 1 output sets a FF that closes the count input gate, the 3 output triggers the latch count register, the 5 output resets the counter, the 6 output resets the time base counter, the 8 output opens the count input gate,and the 9 output resets the 4017 to wait for the next time-base counter. So the entire sequence is done in ten milliseconds. And no RC time delays at all.
 

Thread Starter

hrs

Joined Jun 13, 2014
520
Do you mean something like this? How can you get a 1 second time base out of this? It resets itself every something ms.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,195
That CD4060 as shown does not constitute what I would use for a ONE SECOND time base. And generally, a counter intended to display a frequency with useful accuracy needs to have a one second time base. Of course, I have not experimented with using low frequency crystals oscillators.
The circuit shown lacks most of the functions that I listed. Opening and closing the signal gate does affect accuracy and repeatability.
 

Thread Starter

hrs

Joined Jun 13, 2014
520
That CD4060 as shown does not constitute what I would use for a ONE SECOND time base.
If you add a FF or 2 to Q14 of the CD4060 you get 1 Hz or 0.5 Hz out. That would be the 1 second time base. But it resets before it ever reaches Q14, see my question in post #12. What do you mean by "one second time base"?
The circuit shown lacks most of the functions that I listed.
It does? Let's see. NB, I've been liberal in using 4017 outputs as long as they're in the sequence that you described, but I don't how that makes a difference.

From post #11:
1) a CD4017 as the sequence generator, tapping into about one KHZ in the time base divider.
2) The 1 output sets a FF
3) that closes the count input gate
4) the 3 output triggers the latch count register
5) the 5 output resets the counter
6) the 6 output resets the time base counter
7) the 8 output opens the count input gate
8) the 9 output resets the 4017 to wait for the next time-base counter

What functions does it lack? Perhaps you could provide a CIRCUIT DIAGRAM.
 

Attachments

MisterBill2

Joined Jan 23, 2018
27,195
OK, I have not used that counter IC and I am not familiar with it. And I see only the single output of the CD4060 serving as the time base, I guess. I had used a much higher frequency to step the 4017 thru the different functions.
So there would be the one pulse for the one second counting time and the the 1024 Hz pulses to step the 4017 thru the sequence. The counter ICs that I was using did not have enable/disable controls, nor internal latches.
 
Top