Silicon Chip40MHz 6-Digit Frequency Counter Module - August 2001 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Knowledge nation is a woolly headed wish list
  4. Feature: Geocaching: Treasure Hunting With A GPS by Ross Tester
  5. Project: A Direct Injection Box For Musicians by John Clarke
  6. Feature: A PC To Die For; Pt.3 - You Can Build It Yourself by Greg Swain
  7. Feature: Help Reform Electrical Legislation by Silicon Chip
  8. Project: Build A 200W Mosfet Amplifier Module by Leo Simpson
  9. Feature: The Role Of Electronics In Mine Clearing by Bob Young
  10. Feature: Using Linux To Share An Internet Connection; Pt.3 by Greg Swain
  11. Project: Headlight Reminder For Cars by John Clarke
  12. Project: 40MHz 6-Digit Frequency Counter Module by David L Jones
  13. Order Form
  14. Product Showcase
  15. Weblink
  16. Feature: Uniden Mini UHF Two-Way Radio Competition Winners by Ross Tester
  17. Vintage Radio: Substituting for valves that are no longer available by Rodney Champness
  18. Book Store
  19. Back Issues
  20. Notes & Errata
  21. Market Centre
  22. Advertising Index
  23. Outer Back Cover

This is only a preview of the August 2001 issue of Silicon Chip.

You can view 32 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "A Direct Injection Box For Musicians":
  • Direct Injection Box PCB pattern (PDF download) [01108011] (Free)
  • Panel artwork for the Direct Injection Box (PDF download) (Free)
Articles in this series:
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For - And You Can Build It For Yourself (June 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.2 - You Can Build It Yourself (July 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
  • A PC To Die For; Pt.3 - You Can Build It Yourself (August 2001)
Items relevant to "Using Linux To Share An Internet Connection; Pt.3":
  • Linux script files for Internet Connection Sharing (Software, Free)
Articles in this series:
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.1 (May 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.2 (June 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.3 (August 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
  • Using Linux To Share An Internet Connection; Pt.4 (September 2001)
Items relevant to "Headlight Reminder For Cars":
  • Headlight Reminder PCB pattern (PDF download) [05108011] (Free)
  • Panel artwork for the Headlight Reminder (PDF download) (Free)
Items relevant to "40MHz 6-Digit Frequency Counter Module":
  • 40MHz 6-Digit Frequency Counter PCB patterns (PDF download) [04108011/2] (Free)

Purchase a printed copy of this issue for $10.00.

By DAVID L. JONES This low-cost 6-digit frequency counter module uses readily available components and can measure up to 40MHz with a resolution of 1kHz. It is ideal for adding a digital frequency display to a function generator or to some other project. A 6-Digit Frequency Counter Module M OST SIMPLE frequency counter designs are based on the 74C926 integrated counter chip. Unfortunately, this device is now quite expensive and can only handle four digits which means the resolution isn’t all that great. By contrast, this alternative design is much lower in cost and has six digits for improved display resolution. As presented, the circuit features two signal inputs. The first of these is fed directly to the main counter circuit and this gives a direct readout in Hertz (Hz) up to a maximum of 999999Hz (ie, just under 1MHz). The second input is fed to the counter circuit via an on­board divider circuit or prescaler. This prescaler divides the input frequency by 1000, which means that the display now 76  Silicon Chip shows the measured frequency in kHz. As a result, the circuit can now measure frequencies up to about 40MHz. Because the display reads directly in Hz or kHz, there is no need for decimal point switching and the associated complexity that this involves. There are no switches or controls – you simply feed the signal into the appropriate input for a direct readout in Hz or kHz. BCD output multi­plexer with an internal oscillator. That’s quite a lot in one package and makes the 4553 ideal for a frequency counter applica­tion. The basic principle behind the frequency counter is to count the number of input pulses that occur within a precise one-second window. The value stored in the counter chip will then equal the exact frequency in Hertz and this is then displayed on the How it works Let’s now take a look at the circuit details – see Fig.1. At the heart of the design are two 4553 triple BCD (binary coded decimal) counters (IC4 & IC5), which are wired in cascade fash­ion. Each of these ICs contains three synchronously cascaded BCD count­ers, three output latches and a 3-channel Fig.1 (right): the circuit is based on two 4553 triple BCD counters, which are wired in cascade. The drive the displays via 7-segment decoder drivers IC6 & IC7 and transistors Q1-Q3. IC2 provides the clock signal, while IC1 & IC8 form a divide-by-1000 prescaler. www.siliconchip.com.au www.siliconchip.com.au August 2001  77 Specifications Frequency Readout: 6-digit 7-segment LED display. Frequency Range: 1Hz-1MHz (1Hz resolution); 1kHz-40MHz (1kHz resolution). Can be easily modified for other ranges and resolu­tions. Input Signal Level: 5V TTL/CMOS compatible. Decimal Point Switching: Optional. Size: 116mm x 35mm x 25mm x 30mm. Supply Requirements: 5V DC <at> 90mA. 6-digit display. Lets take a look at how this works in de­tail. IC2 is a 24-stage binary divider and oscillator. It divides the 4.194304MHz crystal (X1) frequency by 8,388,608 (223) at its Q23 output, to give a precise 0.5Hz clock signal. This signal then drives the DISABLE input (pin 11) of the first 4553 (IC5). Let’s initially assume that IC4 and IC5 have both been reset and that the DISABLE line has just gone high. This stops input pulses from clocking the counter and is the Latch/Display phase of the operation. At the same time, the DISABLE signal is differentiated by a .001µF capacitor and 10kΩ resistor (to form a short positive-going pulse) and fed to IC3a. IC3a inverts this signal and the resulting negative-going pulse on its pin 3 output drives the latch enable (LE) pins of ICs 4 & 5. This latches the current counter value into the output registers and this is the value that’s displayed on the 7-segment LED read­outs. Pin 3 of IC3a also drives a second differentiating circuit, again consisting of a .001µF capacitor and 10kΩ resistor. The resulting signal is then squared and buffered by IC3b and IC3c to provide a master reset (MR) pulse. This resets the counters in ICs 4 & 5, so that they are ready to start counting again. After that, the DISABLE signal line goes low and the counters count the input pulses for precisely one second until the DISABLE line returns high again. This is the counting phase of the operation. This Counting & Latch/Display sequence continues indefi­nitely while ever power is applied. As a result, the display is updated every two seconds with the current input frequency. The OVF output (pin 14) of IC5 provides the means to cas­ cade the second 4553 counter (IC4). It connects to the CLK input of IC4, so that we effectively have a 6-digit BCD counter. IC5 has an internal free-running oscillator between pins 3 & 4. Its frequency is set by the .001µF capacitor between these two pins. Pin 3 also directly drives pin 4 of IC4 to keep it in sync and this also sets the multiplexing rate for the 7-segment displays. As shown in Fig.1, the BCD outputs from ICs 4 & 5 (ie, at pins 5, 6, 7 & 9) Fig.3: this scope shot shows the latch enable (LE) signal (top), the master reset (MR) signal centre and the 0.5Hz clock signal (bottom). 78  Silicon Chip each drive 4511 BCD-to-7-segment decoder/driver ICs (IC6 & IC7). These in turn each drive the a-g display segments of three displays. IC7 drives the seg­ments of displays DISP1-DISP3, while IC6 drives the segments of DISP4-DISP6. Note that the corresponding segments of DISP1-DISP3 are all connected in parallel. The same goes for the segments of DISP4-DISP6. The DS1-bar, DS2-bar and DS3bar lines from counter IC4 control the display multiplexing – ie, they control which dis­plays are turned on at any given instant. When DS3-bar goes low, PNP transistor Q3 turns on and “sinks” the current for DISP1 and DISP4. Similarly, when DS2-bar goes low, transistor Q2 turns on and enables DISP2 & DISP5. And when DS1-bar is low, transistor Q1 switches on DISP3 & DISP6. Prescaler circuit IC1 and IC8, both dual 4-digit decade counters, form the divide-by-1000 prescaler circuit. The first thing to note here is that the MR line also drives the CP1-bar input (pin 12) of IC1b. This may look puzzling at first glance because IC1b doesn’t appear to do anything. And that’s exactly what it does – nothing! This was just a convenient way to tie the CLK input on the PC board layout. After all, there’s no point adding extra links or tracks if you don’t have to. It’s the three remaining 4-bit decade counters (IC1a, IC8a & IC8b) that do all the prescaling work, with each stage dividing by 10 to give an overall division of 1000. As shown in Fig.1, the input signal is fed to the CP0-bar (pin 1) input of IC1a and the divided output appears at the Q3 output (pin 7). This then drives the CP0-bar input of IC8a which in turn drives decade counter IC8b. Finally, IC8b drives the clock input (pin 12) of IC5. The maximum frequency that can be displayed depends on the upper limit of the 74HC390 chips, which is around 40MHz. Note that this circuit will only accept TTL-level signals although signal-conditioning circuitry could be added to cater for other signal levels if required. The 4553 BCD counter chips will handle input frequencies up to about 1MHz. The 7-segment LED displays are LT313 0.3-inch common-cathode types. Compatible types are the www.siliconchip.com.au Parts List 1 PC board, code 04108011, 35 x 116mm 1 PC board, code 04108012, 35 x 116mm 4 15mm M3 tapped spacers 8 M3 screws 5 PC board stakes Fig.2: install the parts on PC boards as shown here, taking care to ensure that all polarised parts are correctly orientated. The two boards are stacked together on spacers and joined at both ends using wire links (see photo). Agilent 5082-7613 and the smaller HDSP7303/HDSP7803 units. These were used in favour of the more popular FND500 displays (which have a different pinout) to simplify the PC board layout and to minimise the size. The module requires a single +5VDC supply rail and this could come from any well-regulated source. The current consump­tion is around 90mA. output of IC8a to the clock input (pin 12) of IC5. The decimal point is just as easy. All you have to do is connect a 470Ω resistor between pin 7 of DISP5 and the +5V rail. So it’s quite easy to “customise” the display to your own requirements. If necessary, you could even add a switching ar­ rangement so that you could easily select different ranges. Possible modifications Construction The circuit can be easily modified to display any resolu­tion and direct readout you require within its 40MHz capability. For example, let’s say that you wanted a direct readout in MHz with a display resolution of 100Hz – ie, the display must be capable of showing 99.9999MHz (if the circuit could handle frequencies that high). This requires two things: a divide-by-100 prescaler and a decimal point between DISP4 and DISP5. The divide-by100 prescaler is easy – just bypass IC8b by connecting the pin 7 The design is built on two PC boards measuring 116 x 35mm. These are stacked together on 20mm spacers to form a single compact module. The two boards are joined at both ends using straight wire links running directly from one to the other. Alternatively, flexible ribbon cable could be used to join the two boards and this could be left long enough so that the two boards could be easily separated at a later stage (eg, for modifications). Straight wire links are much neater, however. Semiconductors 2 74HC390 dual 4-bit decade counters (IC1,IC8) 1 4521 24-stage divider/oscillator (IC2) 1 74HC132 quad NAND gate (IC3) 2 4553 3-digit BCD counters (IC4,IC5) 2 4511 BCD to 7-segment decoder/driver (IC6,IC7) 3 BC557 PNP transistors (Q1-Q3) 6 LT313 or equivalent 8mm 7-segment LED displays (DISP1-DISP6) 1 4.194304MHz crystal (X1) Capacitors 1 10µF 10VW tantalum 3 .001µF ceramic 1 82pF ceramic 1 22pF ceramic Resistors (0.25W, 1%) 1 3.3MΩ 2 10kΩ 1 4.7kΩ 3 1kΩ 2 470Ω 7-way DIL resistor packs or 14 x 470Ω resistors Fig.2 shows the assembly details for the two PC boards. Begin the assembly by installing the ICs and 7-segment LED dis­plays on the display board, taking care to ensure that the dis­plays are correctly orientated (ie, decimal point to bottom right). Don’t The prototype used sockets for the ICs on the logic board but we suggest that you solder the ICs straight in. Note that two resistors adjacent to IC2 are mounted “end-on”. www.siliconchip.com.au August 2001  79 A short length of insulated wire can be used to join the “Divider Output” to the “Freq Input” if the counter is to be used in divide-by-1000 mode. use sockets for the display board ICs – this would raise the ICs above the level of the displays and could lead to mounting problems later on. The displays can be mounted in sockets to increase their height above the PC board if desired (eg, you might want them to protrude through the front panel of an instrument case). Normal­ l y, however, the displays would be mounted directly on the PC board and would sit behind a Perspex window. Additional holes are provided in each PC board to make mounting easy. Note that the prototype used two 470Ω DIL resistor packs which look just like (gold-coloured) ICs. Alternatively, you can fit individual 470Ω resistors here, as shown in Fig.2 You are now ready to build the logic board. Begin by fit­ting wire links to the locations shown, then fit PC stakes at the five points marked with a “star”. This done, you can fit the resistors and capacitors, crystal (X1) and the three transistors (Q1-Q3). The crystal should be a low-profile HC49/4H type to reduce its height. You can now complete the logic board assembly by installing the six ICs. Make sure that each IC is in Resistor Colour Codes       No. Value 1 3.3MΩ 2 10kΩ 1 4.7kΩ 3 1kΩ 14 470Ω 4-Band Code (1%) orange orange green brown brown black orange brown yellow violet red brown brown black red brown yellow violet brown brown 5-Band Code (1%) orange orange black yellow brown brown black black red brown yellow violet black brown brown brown black black brown brown yellow violet black black brown Fig.3: here are the full-size etching patterns for the two PC boards. The extra corner holes make it easy to mount the module on a panel or bracket. 80  Silicon Chip its correct location and is correctly orientated. The use of sockets is optional here – they were used on the prototype but you can save money by directly mounting the ICs on the PC board. Once the board assemblies are complete, they can be stacked together on the 20mm spacers and secured using machine screws, nuts and washers. Finally, complete the assembly by installing the connecting links between the two boards. There are 13 links in all, seven at one end and six at the other. Note that once the two boards are joined together, it can be difficult to access the top of the logic board for trou­bleshooting. For this reason, you might like to temporarily “patch” the two boards together using rainbow cable, so that they can be powered up and tested before the final assembly. Using the module The module can be mounted on the front panel of your pro­ject by using another set of spacers or by gluing it in position. All external connections are made via the PC stakes on the logic board. Be careful when you connect the 5V DC power supply – there’s no reverse polarity protection, so if you get the leads the wrong way around, something’s bound to fry. If you want the display to read in “Hz”, connect your input signal directly to the “Freq Input” terminal. This configuration can be used for signal frequencies up to 999,999Hz. Alternatively, if you want the display to read in kHz, connect the input signal to the “Divider Input” terminal instead. You will also have to connect the “Divider Output” terminal to the “Freq Input” terminal using an insulated lead (see photo). As previously stated, this configuration allows measurements up to about 40MHz. The frequency accuracy of the module will be dependant on the crystal used and the values of the two associated capacitors (22pF and 82pF). If necessary, these can be tweaked to “cali­brate” the module. An accurate function generator or another frequency meter of known accuracy will be required for this task. That’s all there is to it – your module should accurately indicate the input frequency and update the display every two seconds. Its application is limited only by your imagination. SC www.siliconchip.com.au