Design and production of low frequency sweeper

Publisher:Meiren520Latest update time:2016-10-21 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Introduction
  In today's world, electronic technology is developing rapidly, and digitalization, networking, and informatization have affected people's clothing, food, housing, and transportation. However, the existing electronic research laboratories lack sweep frequency instruments with a frequency below 1MHz, which seriously hinders the speed of scientific researchers' creation. When a voice signal is to be digitally processed, it must first be sampled, quantized, and encoded. According to the Nyquist sampling theorem, if the original signal is to be reconstructed without distortion, the sampling frequency must be greater than or equal to twice the highest frequency of the original signal (Ws≥2Wh), otherwise the spectrum of the sampled signal will be aliased, and the original signal cannot be restored at this time. Obviously, the lower the frequency Wh of the original signal, the lower the sampling frequency Ws, the lower the digital rate, and the storage space and information transmission rate can be greatly reduced. Therefore, the original signal can be passed through a low-pass filter before sampling, allowing only frequency components below Ws/2 to pass, and filtering out higher frequency components. According to the standard of the voice signal, the frequency band of the voice signal can be limited to the range of 300Hz~3400Hz by bandpass filtering before sampling. Undoubtedly, in the above series of speech signal processing, sweep frequency instruments below 1MHz are indispensable, especially when designing and producing 300Hz~3400Hz bandpass filters, low-frequency sweep frequency instruments must be used for data verification during adjustment and testing.
2 Design and demonstration of the scheme
   According to the above requirements, we can have the following three design schemes:
   (1) With the help of the laboratory's low-frequency signal generator and oscilloscope,
use the following method to perform fixed-point measurement manually, that is, the low-frequency signal generator generates frequency points one by one and transmits them to the circuit under test. Its output is connected to the oscilloscope to observe the attenuation amplitude of each frequency point and record it for data analysis.
  (2) With the single-chip microcomputer as the core, the peripheral frequency synthesizer, rectifier filter, A/D conversion, LCD display, keyboard control and other parts are used to design an intelligent and fully automated integrated system. The working principle is described in detail later. The system block diagram is shown in Figure 1.
  (3) With the DSP chip as the core, the intelligent system design is carried out for the peripheral broadband signal generator, broadband signal receiver, LCD display, control panel and other parts. Its basic working principle is: the signal generating unit generates a broadband signal from 20Hz to 2MHz and transmits it to the circuit under test. Its output is connected to the signal receiving unit, and then the DSP chip performs spectrum analysis. The sweep result is intuitively displayed on the LCD display. The keyboard uses a touch switch to control the sweep range, output/input signal attenuation dB value and other settings. The system block diagram is shown in Figure 2.
  Obviously, Scheme 1 is a traditional manual scheme, which is troublesome to test, slow, and inefficient. It does not meet the modern electronic design standards; Schemes 2 and 3 are both fully automated instrument design schemes. Scheme 3 has better test performance and accuracy indicators than Scheme 2, but Scheme 2 is low in cost and easy to produce, so we choose Scheme 2. 3 Working principle of sweep frequency meter   In electronic measurement, the problem of measuring the impedance characteristics and transmission characteristics of the network is often encountered. The transmission characteristics include gain and attenuation characteristics, amplitude-frequency characteristics, phase-frequency characteristics, etc. The instrument used to measure the above characteristics is called a frequency characteristic tester, or sweeper for short. It provides great convenience for the adjustment, calibration and troubleshooting of the network under test.   The sweeper is generally composed of a sweep sawtooth wave generator, a sweep signal generator, a broadband amplifier, a frequency standard signal generator, an X-axis amplifier, a Y-axis amplifier, a display device, a panel keyboard and a multi-channel output power supply. Its basic working process is to step down the 50Hz mains voltage through a power transformer and send it to the sweep sawtooth wave generator to form a sawtooth wave. On the one hand, this sawtooth wave controls the sweep signal generator to modulate the sweep signal. On the other hand, the sawtooth wave is sent to the X-axis deflection amplifier for amplification to control the X-axis deflection plate of the oscilloscope to make the electron beam produce horizontal scanning. Since this sawtooth wave controls the horizontal scanning of the electron beam and the sweep oscillator at the same time, each horizontal position of the electron beam on the oscilloscope screen corresponds to a certain instantaneous frequency. The frequency increases gradually from left to right and changes linearly. The swept frequency signal generated by the swept frequency signal generator is sent to the broadband amplifier for amplification, then sent to the attenuator, and then the swept frequency signal is output to the circuit under test. In order to eliminate the parasitic amplitude modulation of the swept frequency signal, the broadband amplifier is equipped with an automatic gain controller (AGC). The swept frequency signal output by the broadband amplifier is sent to the frequency standard mixer, where it is mixed with 1MHz and 10MHz or 50MHz crystal oscillator signals or external frequency standard signals. The generated frequency standard signal is sent to the Y-axis deflection amplifier for amplification and then output to the Y-axis deflection plate of the oscilloscope. After the swept frequency signal passes through the circuit under test, it is amplified by the Y-axis potentiometer, attenuator, and amplifier and then sent to the Y-axis deflection plate of the oscilloscope to obtain the amplitude-frequency characteristic curve of the circuit under test. 4 Hardware Design 4.1 Hardware Composition   The hardware part of this system consists of CPU (89C51), frequency synthesizer (MC145151-1), rectifier filter, A/D conversion (ADC0 809), LCD display, touch keyboard and other units. The system block diagram is shown in Figure 1. The keyboard controls the frequency sweep range. The microcontroller transmits 14-bit data to MC145151-1 to control the oscillation frequency of the voltage-controlled oscillator (VCO). The frequency passes through the circuit under test, is rectified and filtered, and then is sent back to the CPU through A/D conversion. The oscillation frequency of the VCO changes slowly from the low frequency end to the high frequency end to the low frequency end within the frequency sweep range. At the same time, the CPU controls the A/D conversion timing, and then the software converts it into a liquid crystal display code for display. 4.2 Phase-locked frequency synthesis circuit   This unit is the key part of the machine's operation. The system structure is shown in Figure 3. The synthesis frequency step Fr is set to 1/128 of the frequency sweep range. The maximum frequency sweep range can be 20Hz~2MHz. Obviously, the smaller the frequency sweep range, the higher the frequency sweep accuracy. There   are many frequency synthesizer integrated circuits on the market. We choose Motorola's MC145151. The chip is a single-mode, monolithic phase-locked loop frequency synthesizer with 14-bit parallel code input. It contains reference oscillator, reference divider, phase detector, programmable divider and other components. The maximum variable frequency ratio is 16383, and the maximum operating frequency is 30MHz, which can meet the design requirements of the system.   In the phase-locked loop, the design of the loop filter is very important. This system uses a passive proportional integral filter, which has a simple structure, stable performance and convenient debugging. 4.3 Rectification and filtering circuit   The task of the rectifier circuit is to convert the sinusoidal wave signal received from the circuit under test into direct current. The completion of this circuit mainly relies on the unidirectional conductive effect of the diode, so the diode is the key component of the rectifier circuit. In the low-power rectifier circuit, the common rectifier circuits are half-wave, full-wave, bridge and voltage doubler rectifier circuits. In order to ensure the integrity of the measured signal, we use a bridge rectifier circuit, as shown in Figure 4.
                            








                           



  The filter circuit is used to filter out the ripple in the rectified output voltage. There are many ways to classify the filter circuit. Common structures include C-type filter circuit, inverted L-type filter circuit, and π-type filter circuit. Comparing the above filters, we choose the π-type filter circuit with simpler circuit and better performance.
4.4 A/D conversion circuit
  The function of the A/D converter is to convert the input analog signal into digital form, so that the CPU can process the analog signal received from the circuit under test. Because the A/D converter has a wide range of applications, there are many varieties and types of conversion chips. Common ones include ADC0809, ADC570, ADC574, ADC1210, ADC0804, 5G14433 and other integrated circuits. We choose ADC0809 integrated converter, which is an eight-channel multiplexer, single-chip CMOS analog/digital converter. Each channel can convert 8-bit digital quantity. It is a successive approximation comparison converter, including a high-impedance chopper comparator, a tree switch network with 256 resistor dividers, a control logic link and an eight-bit successive approximation digital register. The final output stage has an eight-bit three-state output latch.
  In order to ensure the frequency sweep accuracy, a sampling and holding circuit must be added before the A/D converter. This is because the conversion from analog quantity to digital quantity takes a certain amount of time. During the conversion, the signal should remain stable. The sampling and holding circuit is shown in Figure 5. 4.5 Liquid crystal display circuit   Liquid crystal display (LCD) is a passive display. Due to its low power consumption, strong anti-interference ability and good display interface effect, it is widely used in low-power single-chip microcomputer systems. There   are many types of LCD display screens on the market. We purchased the SMG12232B-2LCM product produced by Changsha Sunman Electronics Co., Ltd. Its display capacity is 122×32 dot matrix, the chip working voltage is 4.5~5.5V, the working current is 5mA (5.0V), it has 16 pins and eight data lines. 4.6 Touch keyboard part   The control panel is an essential part of the instrument. Like the display output device, it is a window for the operator to interact with the instrument, and it is also a link and interface between the system and the outside world. A safe and reliable application system must have convenient and flexible interactive functions, which can not only reflect the important status of the system operation in a timely manner, but also realize appropriate manual intervention when necessary. The   keyboard interface can be classified in different ways according to different standards. According to the keyboard arrangement method, it can be divided into independent mode and row and column mode; according to the method of reading key values, it can be divided into direct reading mode and scanning mode; according to whether hardware encoding is performed, it can be divided into non-encoding mode and hardware encoding mode; according to the CPU response method, it can be divided into interrupt mode and query mode. We choose a row and column scanning non-encoding interrupt mode keyboard with simple structure and easy processing. The circuit schematic is shown in Figure 6.
                       






                           

  This panel has control keys for Y-axis attenuation, X-axis compression, center frequency adjustment, and corresponding tuning keys "+", "-", and full-automatic adjustment key (AUTO).
4.7 Single-chip microcomputer console
  The single-chip microcomputer (CPU) is the core of the entire automation system and the summary of the entire hardware part. It is driven by the software described below to control each control unit. There are many types of CPUs. GI, Rockwell, Intel, Zilog, Motorola, NEC and other major computer companies in the world have launched their own single-chip microcomputer series. We selected the most commonly used AT89C51 chip in the MCS-51 series produced by Intel. It has 40 pins, 8-bit data lines, 16-bit address lines, 4KBROM, 128ByteRAM, two external interrupts, two 16-bit timers/counters, a programmable full-duplex serial port, and a total of 32 programmable I/O lines. The
  interrupt signal line of the interrupt keyboard is connected to the CPU's external interrupt INT0, and its row and column scan lines are generated by port P1. The chip select signal of MC145151, ADC0809, SMG12232B-2 LCM is generated by the high 8-bit address line. Since MC145151 has 14-bit data lines, and AT89C51 outputs only 8-bit data lines, we send the CPU out twice, first sending the low byte and then the high byte (called right alignment). The corresponding interface circuit sets two latches to latch the high byte and the low byte respectively. ADC0809 uses interrupt mode to receive data, and its interrupt signal line is connected to the CPU's external interrupt INT1.
5 Software Design
  The software part of this system adopts modular programming method and is written in assembly language A51. It is divided into several modules including main program (MAIN), external interrupt 0 subroutine (INT00), external interrupt 1 subroutine (INT11), sweep signal generation subroutine (SPXHCS), and liquid crystal display subroutine (LCDSSEE).
  A counting pointer R7 is set in the main program to represent the step from the low frequency end to the high frequency end within the sweep frequency range. When R7 finishes counting, reassign R7 and return to search for the key value. If the key value remains unchanged, the frequency sweep parameters remain unchanged and the frequency sweep is repeated; if the key value changes, the corresponding frequency sweep parameters are calculated and the frequency sweep is repeated, and the cycle repeats.
  The external interrupt 0 subroutine is used as a keyboard scanning subroutine. This program adopts a new design method, that is, when initializing the CPU, data #0FH is sent to port P1 in advance. If a key is pressed, one of the column lines becomes a low level "0", and the column line AND gate also outputs a low level "0", and an interrupt is generated at this time; otherwise, if no key is pressed, all column lines are high level "1", and the column line AND gate also outputs a high level "1", and no interrupt is generated. In the interrupt subroutine, the data of port P1 is transferred to accumulator A, and "OR" with #0F0H, and then transferred to port P1. At this time, the data in port P1 can be used as the key value. The program flowchart is omitted.
  The external interrupt 1 subroutine is used as the frequency sweep Y-axis scanning subroutine. When the program generates an interrupt, it immediately reads the data in ADC0809 and then converts it into a liquid crystal display code. The display code conversion adopts the table lookup method, and a display code table is established at the end of the program. The program flowchart is omitted. The
  frequency sweep signal generation subroutine is not responsible for generating the frequency sweep signal. It only sends 14 bits of data to the MC145151 chip. The frequency sweep signal
is generated and calibrated by the hardware frequency synthesizer. Since MC145151 is a 14-bit data line and AT89C51 is an 8-bit data line, the software design adopts the right-aligned method to send the data twice, that is, first send the lower 8 bits and then send the upper 8 bits. In the hardware design, a two-level data latch is used. The program flowchart is omitted. The
  liquid crystal display subroutine is divided into three steps: the first step is to detect the "busy" of the liquid crystal chip; the second step is to locate the internal write data pointer; the third step is to write the display code data. Among the above three steps, the key step is the second step of internal data pointer positioning, and the positioning pointer is controlled by the X-axis and Y-axis sweep frequency at the same time. The program flowchart is omitted.
6 System expansion function
  Since this system includes high-precision analog/digital conversion, it can be slightly modified in the software design and use the principle of sampling oscilloscope to complete the function of oscilloscope. And this oscilloscope can measure signals with long cycles and slow changes, such as temperature changes, climate changes and other parameters.

  references
1 蔡美琴等编著.MCS-51系列单片机系统及其应用(第一版).北京:电子工业出版社,1992年8月
2 谢良友编著.电子测量与仪器(第一版).北京:电子工业出版社,1994年3月
Reference address:Design and production of low frequency sweeper

Previous article:Design of a low-power multifunctional myoelectric measuring instrument
Next article:Design of ultra-low power consumption and low measurement frequency data acquisition and recording system

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号