CMOS FREQUENCY COUNTER

Introduction: CMOS FREQUENCY COUNTER

About: I enjoy making my own projects at home

This a guide with included PDFs and photos of how I designed my own Frequency counter for fun out of discrete logic. I wont go into full detail on how i made the circuit boars or how to wire it but the schematics are made in KICAD which is free software that allows you to make your projects on a professional grade PCB. feel free to copy or use this information as a reference guide. this is a good learning exercise, I found it to be an exciting journey and absolute head ache at the same time but this project utilizes many skills learned in a basic digital design course. this could probably all be done with one micro controller and a few external part. but what's the fun in that haha!

Step 1: Designing a Frequency Counter Using Discrete CMOS Logic Chips

So as an introduction, I designed, wired, and tested this circuit. I did most of the work in NI multisim and used the simulations to design most of the modules. after testing in multisim, I then constructed the test circuit in pieces onto a bread board, this was to be sure each part was working properly, this was a real headache and took me almost a week to get the first complete version running. In the next step I will include the BOM (Bill of materials) and a block diagram of the design and then go into detail on how it was put together. I didn't use any schematics to make this, I just simply read the data sheets for the chipsets and ran simulations and tested each chip for the proper function. This project features 4 main concepts that are all tied together in the final assembly that will be outlined in the block diagrams. I used these blocks to describe how it was all going to be organized and designed.

  1. Timing moduleA Pierce oscillator circuit with a xtal (crystal) oscillating at 37.788 kHz is fed into a CD4060B (14-stage ripple carry binary counter and frequency divider), this results in a 2Hz signal. That signal is then sent into a JK flip flop configured for toggle mode. This will reduce it in half to a 1Hz square wave. the signal is then sent to yet another JK flip flop and divided down to 0.5Hz (1 second on 1 second off). this will be the precise time base to set up our enable clock in order to "slice" a one second sample of the incoming frequency. This is essentially a slice of pulses that needs to get counted for a duration of one second.
  2. Synchronous decade counter Their are two main concepts to understand about how the incoming frequency gets counted. The incoming signal needs to be a square wave, and also compatible to the logic level of the chips. I used a function generator on my lab bench but one can be constructed with a 555 timer and a JK or D flip flop configured as a frequency divider. the second concept uses the 0.5Hz signal to enable the measured pulse to exit an AND gate for one second intervals. and blocking it when it goes logic LOW. this pulse exits the AND gate and enters the decade counters at the paralleled clock. the counters function as synchronous counters and uses the carry out and in functions described in the data Sheet for the CD4029.
  3. Reset The circuit needs to reset every 2 seconds to sample the frequency and not get a compounding reading on the display. we want it to reset the counters to zero before the next slice comes in or it will add to the previous value. which isn't all that interesting! we do this By using D flip flop wired to feed back and we clock the 0.5 Hz signal into the clock which is out putted into the Pre set enable pins of the decade counters. this sets all the counters to zero for two seconds and then goes high for 2 seconds. simple but effective not this could also be done with a JK flip flop but I like to show two ways of doing the same thing. This is all for fun and self learning so feel free to deviate!
  4. LED SEGMENTS The best part is saved for the end! the Classic 7 segment displays and the driver chips I highly recommend to design this around the data sheet of the 7 segment display and the driver chip. You will need to pay close attention to the difference between common cathode or anode. the chip I used will need to be high or low depending on the LEDs you choose to use and as good practice 220 ohm resistors are used to limit current there is some flexability it is always best to refer to the data sheet no one is really that smart the answers all lie in the Data sheet. When in doubt read it as much as you can.

Step 2: Block Diagram

This next part Is just a visual of the Block diagram. Its a good idea to look at this when you are designing something to cut the problem into pieces.

Step 3: Time Base and Schematics

the o-scope shows how the output should look compared to the time base.

This circuit uses the cd 4060 wired up as shown in the picture refer to the PDF for full picture

the Chips uses in this circuit are

  • 3X CD4029
  • 1X CD4081
  • 1X CD4013
  • 1X CD4060
  • 1X CD4027
  • 3X CD4543
  • 21 X 220 ohm RESISTORS
  • 3 X 7 SEGEMNT LED DISPLAYS
  • 37.788 KHZ CRYSTAL
  • 330K OHM RESISTOR
  • 15M OHM RESISTOR
  • 18x 10K 8 PIN RESITOR NETWORK (RECOMENDED)
  • LOTS OF HOOKUP WIRES IF USING A BREAD BOARD
  • MANY BREAD BOARDS

RECCOMENDED EQUIPMENT

  • BENCH POWER SUPPLY
  • O-SCOPE
  • FUNCTION GENERATOR
  • MULTI-METER
  • PLIERS

RECOMENDED DESIGN SOFTWARE

  • KICAD
  • NImultisim

Be the First to Share

    Recommendations

    • Jewelry Challenge

      Jewelry Challenge
    • Raspberry Pi Contest

      Raspberry Pi Contest
    • One Board Contest

      One Board Contest

    2 Comments

    0
    randofo
    randofo

    1 year ago

    Cool use of logic chips!

    0
    XZYRN
    XZYRN

    Reply 1 year ago

    Thankyou!