You are on page 1of 1

Why GitHub?

Enterprise Explore Marketplace Pricing Search Sign in Sign up

tardate / LittleArduinoProjects Watch 52 Star 318 Fork 122

Code Issues 1 Pull requests 1 Projects 0 Security Insights

Branch: master LittleArduinoProjects / Equipment / FrequencyCounterKit / Create new file Find file History

tardate remove catalog link from readmes Latest commit 82d362f on Apr 21

..

assets [FrequencyCounterKit] add project 2 years ago

.catalog_metadata update categorisation 9 months ago

FrequencyCounterKit.fzz [FrequencyCounterKit] add project 2 years ago

README.md remove catalog link from readmes 2 months ago

README.md

#295 FrequencyCounterKit
Build and test a common PIC-based frequency counter kit.

Notes
I picked up a kit similar to this one after watching Julian Ilett's videos on the kit build.

Not that I really need another frequency counter, but it is interesting to see how this one is constructed.

Julian's investigation of the circuit was thorough, including the discovery that the kits available are deritative from original
work by Wolfgang "Wolf" Büscher, DL4YHF, in his Frequency counter with a PIC and minimum hardware.

Specifications
From seller product information pages:

Color: Red, Simple Construction , compact design, easy to install and debug. Designed to measure the frequency of
oscillation of most crystal oscillators. Based on PIC microcontroller can measure the frequency of 1 Hz to 50 MHz. Five
digits of precision, for example kHz x.xxxx, MHz or xx.xxx x.xxxx MHz. General for feeding USB interface can be used for
power supply, AC adapter or a battery of 9 V can be used too, it is used. Color: Red, Simple Construction , compact
design, easy to install and debug.
Designed to measure the frequency of oscillation of most crystal oscillators.
Based on PIC microcontroller can measure the frequency of 1 Hz to 50 MHz.
Five digits of precision, for example kHz x.xxxx, MHz or xx.xxx x.xxxx MHz.
General for feeding USB interface can be used for power supply, AC adapter or a battery of 9 V can be used too, it is
used.
Optional mode of power saving: can automatically convert the display if the frequency does not change significantly in
15 seconds
Very small number of components: a PIC16F628, 5, 7-segment LED screens, a 20 MHz crystal and some resistors
Frequency range: 1 Hz-50 MHz
Glass Test Range: 4 KHz-48 KHz
Built Item Size: 8 * 5.5 * 0.7 cm / 3.2 * 2.2 * 0.3 inches

Parts

Ref Item Qty

IC1 PIC16F628 1

IC2 7550A-1 5V regulator 1

LED1-5 5161AS 7-segment LED, common-cathode 5

D1-4 1N4148 diode 4

XTAL1 20MHz crystal 1

C1,3,4 22pF capacitor 3

C2 10-40pF variable capacitor 1

C5 102 1nF capacitor 1

C6 104 100nF capacitor 1

Q1 S9014 NPN transistor 1

Q2 S9018 transistor 1

R1,2 10kΩ resistor 2

R3-11 1kΩ resistor 9

R12 100kΩ resistor 1

J3 barrel jack 1

J1,2 3-pin headers 2

S1 pushbutton switch 1

DIP socket 1

PCB 1

The PCB is a nice 2-layer layout:

Construction
The circuit in this kit is based on Construction - Variant 2 by Wolfgang "Wolf" Büscher, DL4YHF. Modifications:

addition of the crystal tester circuit


variable capacitor on one leg of the crystal
5V regulator on the power supply

Here is my redrawing of the schematic used in the actual kit:

Performance
Julian and others have reported issues with the frequency counter (temperature effects; failure to register). However in my
tests I didn't see any of these problems. I tested crystals from 4MHz to 16MHz and got quite accurate results in all cases.
Here's an example of a 7MHz crystal under test:

With a function generator, I also got accurate readings form 1kHz to 24MHz (the upper limit of the function generator). The
input signal is a 0V to 5V square wave:

Configuration
The press-button is used to access a control menu for the device. To get good results, I had to make two changes:

"Zero" - resets the frequency offset. When I first tried the device, it had a 5MHz offset which needed clearing.
"PSave" - enables/disables power save feature. When I first tried the device, power save was enabled, which causes the
device to keep turning off (may be misleading and make you think it is not working).

Input Connections
Input connections are not fully documented. Here's how they seem to work. The connector and pin identifications refer to
the schematic:

Connector Pin Purpose

J1 1 crystal leg 1; ground

J1 2 no connection

J1 3 crystal leg 2

J2 1 frequency input; direct connect to PIC pin 3

J2 2 VIN / bypass power

J2 3 ground / bypass power

J3 1 VIN / power jack

J3 3 ground / power jack

J3 4 ground / bypass power

J2 and J3 and configured to allow by-pass power supply. J3 is the barrel jack - when power is plugged in here, it by-passes
any power supply connected on J2. For my tests, I just had power connected on J2.

Next Steps and Improvements


One of the issues with the counter is that it requires an input signal that registers across 0-5V as it is fed as a direct input to
the PIC. This can be problematic:

no over-voltage protection
unable to read small signals
AC-coupled signals may not have sufficient high-side amplitude

The preamplifier described by DL4YHF looks like an interesting addition.

So perhaps next things I'll do with this kit:

add a pre-amplified stage, perhaps with over-voltage protection


mount in a case with a BNC connector for input frequency
add a switch and battery connected on J2 (so can be mounted with a battery in a case, with external power bypass on
J3)

Credits and References


Frequency counter with a PIC and minimum hardware - original circuit design and description by Wolfgang "Wolf"
Büscher, DL4YHF
50 MHz Crystal Oscillator Frequency counter Testers DIY Kit - similar product from an aliexpress seller
Fairly Easy - Frequency Counter - Electronic Kit Build (part 1)
Fairly Easy - Frequency Counter - Electronic Kit Build (part 2)
Fairly Easy - Frequency Counter - Electronic Kit Build (part 3)
PIC16F628 datasheet
SC56-11 Datasheet - similar LED 7-segment display
S9014 datasheet
S9018 datasheet - parts.io
HT7550A-1 datasheet
..as mentioend on my blog

© 2019 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About

You might also like