Evaluation of methods for measuring low frequencies on the Arduino. Power Supply for Frequency Counter FC1100-M2

The main feature of this frequency meter:
A highly stable TCXO (Thermo-Compensated Reference Oscillator) is adopted. The use of TCXO technology allows immediately, without preheating, to provide the declared frequency measurement accuracy.

Technical characteristics of the FC1100-M2 frequency counter:

parameter minimum norm maximum
Measuring frequency range 1 Hz. - 1100 MHz.
Frequency readout resolution from 1 to 1100 MHz - 1 kHz. -
Frequency readout resolution from 0 to 50 MHz - 1 Hz. -
Input signal level for input "A" (from 1 to 1100 MHz). 0.2 V.* 5 W.**
Input signal level for input "B" (0 to 50 MHz). 0.6V 5 V.
Update period - 1 time/sec -
Testing of quartz resonators 1 MHz - 25 MHz
Supply voltage/current consumption (Mini-USB) +5V./300mA
Frequency stability @19.2MHz, at temperature -20С...+80С 2ppm(TCXO)

Distinctive features of FC1100 and FC1100-M2 frequency meters in particular:

Highly stable reference oscillator TCXO(stability is not worse than +/-2 ppm).
Factory calibration.
Independent simultaneous measurement of two frequencies (Input "A" and Input "B").
Input "B": Provides frequency measurement resolution of 1 Hz.
Input "B" has a full-fledged analog input comparator threshold control (MAX999EUK), which makes it possible to measure signals that are noisy with harmonics, by adjusting the comparator threshold to a clean section of the periodic signal.
Input "A" allows you to remotely measure the frequency of portable VHF radios at a distance of several meters, using a short antenna.
Function of fast testing of quartz resonators from 1 to 25 MHz.
Modern TFT color display with economical backlight.
The manufacturer does not use unreliable electrolytic capacitors. Instead, modern high-quality SMD ceramic capacitors of significant capacities are used.
Unified power supply via Mini-USB connector (+5v). Mini-USB power cord - supplied.
The design of the frequency meter is optimized for integration into the flat front panel of any enclosure. Nylon insulating posts M3*8mm are supplied in the kit to provide a gap between the front panel and the printed circuit board of the frequency meter.
The manufacturer guarantees that programmed aging technologies, which are widely used in modern technology, are not used.
Made in Russia. Small batch production. Quality control at every stage of production.
The best solder pastes, non-cleaning fluxes and solders are used in the production.

Dimensions of the printed circuit board of the FC1100-M2 device: 83mm * 46mm.
Display color TFT LCD with backlight (diagonal 1.44" = 3.65cm).
* Sensitivity according to DataSheet MB501L ("Input Signal Amplitude" parameter: -4.4dBm = 135 mV@50 Ohm respectively).
** The upper limit of the input signal is limited by the dissipation power of the B5819WS protective diodes (0.2W*2 pcs).


Back side of the FC1100-M2 counter

Scheme of the comparator / shaper of the input signal 0 ... 50 MHz.

Scheme of the frequency divider of the input signal 1...1100 MHz.

Brief description of FC1100-M2 frequency counter:

The FC1100-M2 frequency meter has two separate frequency measurement channels.
Both channels of the FC1100-M2 counter operate independently and can be used to measure two different frequencies simultaneously.
In this case, both values ​​of the measured frequency are simultaneously displayed on the display.
"Input A" - (Connector type SMA-FEMALE) Designed to measure relatively high-frequency signals, from 1 MHz to 1100 MHz. The lower sensitivity threshold of this input is slightly less than 0.2 V., and the upper threshold is limited at the level of 0.5 ... 0.6 V. by protective diodes connected in anti-parallel. It makes no sense to apply significant voltages to this input, because voltages above the opening threshold of protective diodes will be limited.
The applied diodes allow dissipating power no more than 200 mW, protecting the input of the MB501L divider chip. Do not connect this input directly to the output of high power transmitters (more than 100mW). To measure the frequency of signal sources with an amplitude of more than 5 V., or a significant power, use an external voltage divider (attenuator) or a low-capacity transition capacitor (units of picofarads) connected in series. If it is necessary to measure the frequency of the transmitter - usually a short piece of wire is sufficient as an antenna, included in the frequency counter connector, and located at a short distance from the transmitter antenna, or you can use a suitable rubber band antenna from portable radios connected to the SMA connector.

"Input B" - (Connector type SMA-FEMALE) Designed to measure relatively low-frequency signals, from 1 Hz to 50 MHz. The lower sensitivity threshold of this input is lower than that of "Input A", and is 0.6 V., and the upper threshold is limited by protective diodes at a level of 5 V.
If it is necessary to measure the frequency of signals with an amplitude of more than 5 V, use an external voltage divider (attenuator). This input uses a MAX999 high speed comparator.
The input signal is applied to the non-inverting input of the comparator, and resistor R42 is also connected here, increasing the hardware hysteresis of the MAX999 comparator to a level of 0.6 V. The bias voltage is applied to the inverting input of the MAX999 comparator, from the variable resistor R35, which sets the level of operation of the comparator. When measuring the frequency of noisy signals, it is necessary to turn the knob of the variable resistor R35 to achieve stable readings of the frequency meter. The highest sensitivity of the frequency meter is realized in the middle position of the knob of the variable resistor R35. Counter-clockwise rotation - reduces, and clockwise - increases the threshold voltage of the comparator, allowing you to shift the threshold of the comparator to a noise-free section of the measured signal.

The "Control" button switches between the "Input B" frequency measurement mode and the quartz resonator testing mode.
In the testing mode of quartz resonators, it is necessary to connect the tested quartz resonator with a frequency from 1 MHz to 25 MHz to the extreme contacts of the "Quartz Test" panel. The middle contact of this panel - you can not connect, it is connected to the "common" wire of the device.

Please note that in the test mode of quartz resonators, in the absence of the tested quartz in the panel, there is a constant generation at a relatively high frequency (from 35 to 50 MHz).
Also, it should be noted that when the investigated quartz resonator is connected, the generation frequency will be slightly higher than its typical frequency (within units of kilohertz). This is determined by the parallel mode of excitation of the quartz resonator.
The testing mode of quartz resonators can be successfully used to select the same quartz resonators for ladder multi-crystal quartz filters. In this case, the main criterion for the selection of quartz resonators is the closest possible generation frequency of the selected quartz.

Connectors used in the FC1100-M2 frequency counter:

Power Supply for Frequency Counter FC1100-M2:

The FC1100-M2 frequency meter is equipped with a standard Mini-USB connector with a supply voltage of +5.0 Volts.
Current Consumption (300mA max) - Provides compatibility with most USB voltage power supplies.
Included is a cable "Mini-USB"<>"USB A", which allows you to power the frequency counter from any device that has such a connector (Personal Computer, Notebook, USB-HUB, USB Power Supply, USB Wall Charger) and so on.

For autonomous power supply of the FC1100-M2 Frequency Meter, the widely used "Power Bank" batteries with built-in Lithium-Polymer batteries, which are usually used to power equipment with USB connectors, are optimally suited. In this case, in addition to obvious convenience, as a bonus, you get galvanic isolation from the network and / or power supply, which is important.



Structurally, the device consists of a display formed by seven 7-segment LED indicators, a microcontroller and several transistors and resistors. The microcontroller performs all the necessary functions, so the use of any additional microcircuits is not required.

The circuit diagram of the device is quite simple and is shown in Figure 2. The Eagle project (circuit diagram and PCB) is available for download in the download section.

The tasks performed by the microcontroller are simple and obvious: counting the number of input pulses in 1 second and displaying the result on a 7-digit indicator. The most important point here is the accuracy of the master generator (time base), which is provided by the built-in 16-bit Timer1 timer in CTC mode. The second, 8-bit, timer-counter operates in the mode of counting the number of pulses at its input T0. Every 256 pulses cause an interrupt, the handler of which increments the value of the coefficient. When the duration of 1 s is reached with the 16-bit timer, an interrupt occurs, but in this case, the factor is multiplied by 256 (left shift by 8 bits) in the interrupt handler. The remaining number of pulses registered by the counter is added to the result of the multiplication. The resulting value is then divided into separate numbers, which are displayed on a separate indicator in the corresponding category. After that, just before exiting the interrupt handler, both counters are simultaneously reset and the measurement cycle is repeated. In "free time", the microcontroller outputs information to the indicator using the multiplexing method. In the source code of the microcontroller program, the author gave additional comments that will help to understand in detail the algorithm of the microcontroller.

Resolution and measurement accuracy

The measurement accuracy depends on the clock source for the microcontroller. By itself, the program code can introduce an error (adding one pulse) at high frequencies, but this practically does not affect the measurement result. The quartz resonator used in the device must be of good quality and have a minimum error. The best choice would be a resonator whose frequency is divisible by 1024, such as 16 MHz or 22.1184 MHz. To obtain a measurement range of up to 10 MHz, it is necessary to use a quartz resonator at a frequency of 21 MHz and higher (for 16 MHz, as in the diagram, the measurement range becomes slightly lower than 8 MHz). A 22.1184 MHz quartz resonator is ideal for our device, but acquiring one with a minimum error will be a difficult task for many radio amateurs. In this case, you can use a quartz resonator for a different frequency (for example, 25 MHz), but you must perform the master oscillator calibration procedure using an oscilloscope that supports hardware measurements and a trimmer capacitor in the quartz resonator circuit (Figure 3, 4).

In the download section, several versions of firmware for various quartz resonators are available for download, but users can compile the firmware for an existing crystal resonator themselves (see comments in the source code).

Input signal

In the general case, a signal of any shape with an amplitude of 0 ... 5 V can be applied to the input of the device, and not just rectangular pulses. You can apply a sinusoidal or triangular signal; the pulse is determined by the falling edge at the level of 0.8 V. Please note: the input of the frequency meter is not protected from high voltage and is not pulled up to power, this is a high resistance input that does not load the circuit under study. The measurement range can be extended up to 100 MHz with a resolution of 10 Hz by using an appropriate high-speed frequency divider at the input.

Display

The device uses seven LED 7-segment indicators with a common anode as a display. If the brightness of the indicators is insufficient, you can change the value of the resistors that limit the current through the segments. However, do not forget that the magnitude of the pulse current for each output of the microcontroller should not exceed 40 mA (indicators also have their own operating current, do not forget about its value). In the diagram, the author indicated the value of these resistors is 100 ohms. Insignificant zeros are suppressed when displaying the measurement result, which makes reading the readings more comfortable.

Printed circuit board

The double-sided printed circuit board has dimensions of 109 × 23 mm. The free version of the Eagle PCB design environment does not have seven-segment LED indicators in the component library, so they were hand-drawn by the author. As can be seen in the photographs (Figures 5, 6, 7) of the author's version of the printed circuit board, it is additionally necessary to make several connections with a mounting wire. One connection on the front side of the board is power to the Vcc pin of the microcontroller (through a hole in the board). There are two more connections on the underside of the board, which are used to connect the decimal point segment pins of the indicators in digits 4 and 7 through 330 ohm resistors to ground. For in-circuit programming of the microcontroller, the author used a 6-pin connector (in the diagram, this connector is shown as a composite JP3 and JP4), located at the top of the printed circuit board. This connector does not have to be soldered to the board, the microcontroller can be programmed in any way possible.

Downloads

Schematic diagram and drawing of the printed circuit board, source code and microcontroller firmware -

Built . It allows you to measure frequencies up to 10 MHz in four automatically switchable ranges. The smallest range has a resolution of 1 Hz.

Specifications of the frequency meter

  • Band 1: 9.999 kHz, resolution 1 Hz.
  • Band 2: 99.99 kHz, resolution up to 10 Hz.
  • Band 3: 999.9 kHz, resolution up to 100 Hz.
  • Band 4: 9999 kHz, resolution up to 1 kHz.

Description of the frequency counter on the microcontroller

The Attiny2313 microcontroller is powered by an external crystal oscillator with a clock frequency of 20 MHz (this is the maximum allowed frequency). The measurement accuracy of the frequency meter is determined by the accuracy of this quartz. The minimum half-cycle length of the measured signal must be greater than the period of the crystal oscillator (this is due to the limitations of the architecture of the ATtiny2313 microcontroller). Therefore, 50 percent of the oscillator clock is 10 MHz (this is the maximum measurable frequency).

Installing fuses (in PonyProg):



What else to read