PICAXE-based dual frequency counter
This circuit uses a PICAXE microcontroller to measure the frequency of two different signals and displays both on an LCD panel. It has no controls since it uses auto-ranging for the two counters. The circuit was designed to be combined with a function generator based on a pair of XR2206 ICs but it can be built as a stand-alone device or as part of a different project.
Its two inputs accept TTL signals and should work with signals of around 3-6V peak-to-peak. As presented, it will measure frequencies up to 100kHz but the software can be modified to work up to at least 350kHz.
The frequencies of the two signals are alternately measured by the PICAXE 20X2 microcontroller (IC1), which runs at either 16MHz or 32MHz, as needed. The signals are AC-coupled via 100nF capacitors and then applied to inputs C2 and C1 of the micro via 3.3kΩ current-limiting resistors. Diodes D2 & D3 help clamp the signal so that their troughs are no lower than -0.7V.
Bi-colour LED1 indicates which input is currently being sampled. It turns green for input CH1 and red for input CH2.
The frequency readings (Hz, kHz, MHz, etc) are displayed separately on the two lines of an AXE033 16x2 serial LCD module. This module is available from Revolution Education, the same company that developed the PICAXE microcontroller range (www.rev-ed.co.uk).
S1 and S2 were originally switches to control the function generator modulation mode so IC1 monitors their position and shows information about the mode on the LCD. If the switches are left out (but the 10kΩ pull-up resistors left in) then this feature is disabled. Otherwise, the software can be changed to monitor switches on these inputs for some other purpose.
The circuit includes a programming header for the PICAXE. Both the microcontroller and LCD module run from a 5V rail which is derived from a 6.2-7V supply using zener diode (ZD1) and a 22Ω current limiting resistor. A linear regulator (eg, 7805) or a 5V regulated supply could be used instead and would allow a wider range of supply voltages (say, 7-15V).
The PICAXE program, DualFrequencyCounter_v1.6.bas, is available for download from the SILICON CHIP website.
Port Macquarie, NSW. ($50)