ENCYCLOPEDIA OF RADIO ELECTRONICS AND ELECTRICAL ENGINEERING Frequency meter - digital scale on PIC16CE625. Encyclopedia of radio electronics and electrical engineering Encyclopedia of radio electronics and electrical engineering / Measuring technology The proposed device continues a number of amateur developments on microprocessors and can be used as a home laboratory frequency meter or a digital scale for all types of communication and radio receiving equipment. Despite the simple scheme, the device differs from previously published designs by the ability to measure frequencies up to the microwave range, high resolution, and the ability to enter values of several intermediate frequencies into the controller's memory. The device allows you to measure the signal frequency in the range of 0,1 Hz to 40 MHz. The input signal level can be in the range of 100...200 mV. The resolution of the device is 100,1, 0,1 Hz with a measurement time of 0,1, 1, 10 s, respectively. The number of indicator digits is 8. The supply voltage of the device is 7,5 ... 14 V, and the current consumption depends on the number of operating segments, but does not exceed 130 mA. Using an external microwave divider with a division factor ranging from 1 to 255, frequencies over 40 MHz can be measured. The principle of operation of the frequency meter is classical: measuring the number of pulses of the input signal for a certain time interval. The 10 s limit is for accurate low frequency measurements. In the digital scale mode, the measurement time of the device is 0,1 or 1 s. Up to 15 values of intermediate frequencies in the range from 0 to 99 Hz can be stored in the non-volatile memory of the digital scale. In this case, the indicator readings will be determined by the formula where Fin - input frequency; Kd - division factor of the external divider; Fp - intermediate frequency. The subtraction is carried out in absolute value, i.e. the smaller value is subtracted from the larger value. The intermediate frequencies, the division factor of the used external divider, as well as the calibration constants can be set and changed by the user without the use of any additional devices. All this data is stored in the non-volatile memory of the PIC controller. It also provides the possibility of software frequency calibration, which allows the use of a reference quartz resonator in the device in the frequency range of 3,9...4,1 MHz. The schematic diagram of the device is shown in Fig.1. The signal of the measured frequency is fed to the input shaper, made on the transistor VT1 and chip element DD1. Diodes VD1 and VD2 limit the amplitude of the input signal to 0,7 V. For a sinusoidal input signal, the lower limit of the measured frequencies is determined by the capacitance of the capacitors C4 and C5, and at the values \u10b\u2bspecified in the diagram, it is 1 Hz. From the output of the DDI chip, the generated pulses are sent to the PIC controller DD2. A sufficiently high load capacity of its outputs made it possible to connect the cathodes of the HG17 indicator directly to it. The anodes of the indicator are connected through composite emitter followers on transistors VT3-VT1 to the outputs of the counter DDXNUMX, which scans the bits. Such a scheme allows you to power the indicator with an unstabilized voltage, which greatly facilitates the thermal regime of the DAXNUMX microcircuit and practically eliminates the effect of current surges during switching of the indicator discharges on the operation of the input driver. The input impedance of the shaper is low, therefore, to expand the capabilities of the device and eliminate the influence of the cable capacitance, an external probe is connected to it. Its scheme is shown in Fig. 2. The input impedance of the probe is about 500 kOhm, the output resistance is 50 ... 100 Ohm. The gain is about 2, and the upper limit of the bandwidth is 100 ... 150 MHz. Diodes VD1, VD2 protect the field-effect transistor from failure when high voltage enters the input. The device is controlled by three buttons displayed on the front panel and five switches. Buttons SB1, SB2, SB3 select the measurement time of 0,1, 1 or 10 s, respectively. The new frequency value on the indicator will appear on the indicator after the selected interval after the button is released. If you press and hold one of these buttons, the current frequency value will be fixed on the indicator. When using an external divider, the price of the least significant digit of the frequency meter changes. If its division factor is in the range from 3 to 20, the discharge price decreases by 10 times, if Kd is above 20, then by 100 times at any measurement time. If Kd = 2, the discharge price does not change. The closed state of switch SA1 corresponds to the operation of the device with an external microwave divider, and the open state - without it. Switches SA2-SA5 are used to select one of 15 pre-programmed IF values. The corresponding IF number is dialed in binary code (1-2-4-8). If switches SA2-SA5 are open, IF = 0 (frequency counter mode). The outputs of the switch SA1 can be brought to the free contacts of the connector, which includes a microwave divider. A jumper should be installed between these contacts on the mating part of the connector. Thus, the connection of the divider will be automatically determined. If the FC number needs to be changed remotely, for example, when switching the receiver ranges, then electromagnetic relays can be used as SA2-SA5. The frequency meter is assembled on a printed circuit board with dimensions of 107x46 mm from one-sided foil fiberglass. The layout of the conductors and the location of parts on the board are shown in fig. 3. All fixed resistors MLT 0,125, trimmer - SPZ-19a. Permanent capacitors - KM, tuning - KT4-21, oxide - K50-35. Transistor VT1 any npn with a cutoff frequency of at least 600 MHz. Transistors VT10 - VT17 with a permissible current of at least 300 mA. Indicator HG1 - eight-digit LED, with decimal points to the right of the numbers. Its design can be arbitrary, for example, composed of single-digit indicators with a common anode. Chip DD1 KR1554TL2 can be replaced by KR1554TLZ, but this will require an adjustment to the printed circuit board pattern. Unused outputs of the microcircuit elements should be connected to the +5 V power bus. The use of TTL analogs in this circuit reduces the upper limit of the device's operating frequencies to 10-60 MHz. Transistor VT1 of a remote probe - a field transistor with an insulated gate, an n-type channel and a gate-source voltage of 0 ... 2 V at a drain current of 5 mA - KP305A, B, V; KP313A, B; VT2 - with a cutoff frequency of at least 600 MHz. Resistor R1 is mounted directly in the pin part of the XP1 connector. A drawing of the probe PCB and the location of the parts are shown in fig. four. The probe is mounted in a metal case. It is also desirable to shield the frequency meter, especially if the device will be used as a digital scale. The power supply can be any unstabilized with an output voltage of 7,5 ... 14 V and a load current of up to 150 mA. When adjusting the frequency meter by adjusting the resistor R2, the maximum sensitivity of the device at high frequencies is achieved. The voltage on the collector of the transistor VT1 should be about 2,5 V. Setting up a remote probe consists in setting the current of each transistor to about 5 mA. They are exposed by picking up R3. The voltage on the VT2 collector should be 4 V. Then, using the SB1-SB3 buttons, you should set the required values of the frequency meter parameters in the service mode. To enter this mode, press three buttons at the same time. In this case, the indicator will display the value of the measurement time, which will be selected by default when the device is turned on. By pressing the button SB1 or SB2, you can select one of three values - 0,1 s, 1 s or 10 s. After that, press the SB3 button. In this case, the selected value is entered into non-volatile memory, and the indicator shows the value of the division factor of the microwave divider, which will be used with the device. You can change its value by pressing SB1 or SB2, and then confirm the selection by pressing SB3. If one or more of the switches SA2-SA5 are closed, the number of the enabled inverter and its sign (stylized + or -) appear on the indicator. The sign is selected by pressing the SB1 or SB2 button, pressing SB3 confirms the choice, and the IF value appears on the indicator, which can be changed by pressing SB1 or SB2 again. The rate of change will increase with the time the button is pressed, i.e. the longer the button is held down, the faster the reading will change. The price of the least significant bit is 1 Hz. Confirmation of the choice is similar to the previous modes - pressing SB3. After that, the indicator shows the inscription "SETUP". If you do not press any of the buttons, after about 3 seconds the device will switch to the measurement mode with the newly selected parameters. To enter "SETUP" press SB3. In this mode, software calibration of the device for a specific used resonator is carried out. This may be necessary, since in this circuit it is excited at the parallel resonance frequency, and the resonators are usually indicated at the serial frequency, which can differ by several kilohertz. Calibration is carried out by selecting nine constants that determine the duration of the measurement intervals. The constants C1, C2 and C3 determine the interval of 0,1 s; C4, C5 and C6 - 1 s, and C7, C8 and C9 - 10 s. C1, C4, C7 are for accurate span calibration; C2, C5 and C8 - for the middle; C3, C6 and C9 - for rough. C1, C4 and C7 can vary from 0 to 17. Increasing or decreasing them by one increases or decreases the corresponding interval by 1 µs (one machine cycle). C2, C5 and C8 take a value from 0 to 255. Changing them by one changes the interval by 18 µs. C3, C6 and C9 can also be from 0 to 255 and make an even coarser interval change. The values of all constants are entered sequentially, similarly to the previous modes. After entering C9, the device switches to the measurement mode. If the oscillation frequency of the quartz resonator is exactly 4 MHz, the constants should have the following values: С1=9, С2=99, C3=2, С4=13, С5=17, С6=199, С7=17, С8=215, С9=117. In the author's version, the quartz frequency is 4 001 120 Hz and the constants are somewhat different: С1=1, С2=101, C3=2, С4=5, С5=33, С6=199, С7=5, С8=117, С9=118. To calibrate the device, you must have a reference frequency meter and a generator. At the beginning, using a reference instrument, measure the frequency of generation of a quartz resonator in the instrument. In this case, the rotor of the capacitor C7 should be in the middle position. The frequency meter is connected to point X1. The measured value is rounded to the nearest multiple of 40 Hz, eg 4, 000, 000, etc. Then the remote probe of the device is connected to point X4 and the readings are recorded at all three limits. If the readings differ from the measured value, you should enter the service mode, then "SETUP" and change the values of the constants. In this case, one should adhere to the rule - changing the duration of the interval of 000 s by 040 μs, the duration of the interval of 4 s should be changed to 000 μs, and 080 s - to 1 μs. Otherwise, the readings of the device at different limits may not correspond to each other. After some trial and error, the influence of the constants on the readings becomes clear. In this way, readings of the true generation frequency are obtained. As mentioned above, it must necessarily be a multiple of 0,1 Hz. In the author's version, the readings of the device with a measurement interval of 1 s are 1; with an interval of 10 s - 10; and with an interval of 100 s - 40. After calibration, connect this device and a reference frequency meter to a signal generator with a frequency of 20 ... 40 MHz and an amplitude of 0,2 ... 0,5 V and compare the readings at all limits. If the readings do not correspond to each other at different limits, it means that an error was made when entering the constants and this operation should be repeated. The final exact correspondence of the readings to the frequency is achieved by adjusting the capacitor C7. If the range of its change is not enough, the constants should be corrected, as described above. The calibration process is quite complicated, but the need for it may arise only once after the manufacture of the device. The author's values of all constants and parameters in the non-volatile memory can be restored, if necessary, by typing the C3 value in the range from 128 to 255. One of the possible schemes of the microwave divider by 10 is posted on the author's website . Codes of the control program of the microcontroller Author: N. Khlyupin See other articles Section Measuring technology. Read and write useful comments on this article. Latest news of science and technology, new electronics: Machine for thinning flowers in gardens
02.05.2024 Advanced Infrared Microscope
02.05.2024 Air trap for insects
01.05.2024
Other interesting news: ▪ The main molecule of the Universe is determined ▪ The car will understand that the driver is talking on a mobile phone ▪ 35 minutes of walking a day reduces the risk of stroke News feed of science and technology, new electronics
Interesting materials of the Free Technical Library: ▪ site section Voltage converters, rectifiers, inverters. Article selection ▪ article Earthly life having passed halfway, I found myself in a gloomy forest. Popular expression ▪ article How long has weaving existed? Detailed answer
Leave your comment on this article: All languages of this page Home page | Library | Articles | Website map | Site Reviews www.diagram.com.ua |