Design and build a remote amplitude-frequency characteristic testing device.
(1) Create a signal source. Output frequency range: 1MHz-40MHz; step: 1MHz, and has automatic scanning function; when the load resistance is 600Ω, the peak-to-peak value of the output voltage is adjustable between 5mV-100mV.
(2) Make an amplifier. Required input impedance: 600Ω; bandwidth: 1MHz-40MHz; gain: 40dB, required to be continuously adjustable from 0-40dB; when the load resistance is 600Ω, the output voltage peak-to-peak value is 1V, and the waveform has no obvious distortion.
(3) Make an amplitude-frequency characteristic testing device displayed with an oscilloscope. The amplitude-frequency characteristic is defined as the law in which the amplitude of the signal changes with frequency. On this basis, wires are used to connect the signal source, amplifier, and amplitude-frequency characteristic test device. The amplitude-frequency characteristic test device completes the amplitude-frequency characteristic test of the amplifier output signal, and displays the amplitude-frequency characteristic of the amplifier output signal on the oscilloscope. frequency characteristics.
(1) When the power supply voltage is +5V, the amplifier is required to have an effective output voltage of 1V when the load resistance is 600Ω, and the waveform has no obvious distortion.
(2) As shown in Figure 2, connect the frequency information of the signal source and the output signal of the amplifier to the amplitude-frequency characteristic testing device using a 1.5m-long twisted pair (one is the signal transmission line and the other is the ground wire) , the amplitude-frequency characteristic test device completes the amplitude-frequency characteristic test of the amplifier output signal, and displays the amplitude-frequency characteristic of the amplifier output signal on the oscilloscope.
(3) Use a WiFi router to build a local area network independently, and connect the frequency information of the signal source and the output signal information of the amplifier with the laptop. The laptop completes the amplitude-frequency characteristic test of the amplifier output signal, and displays the amplifier output signal in a curve. Amplitude-frequency characteristics.
(4) Others.
The amplitude-frequency characteristic detection and remote transmission are completed through four parts: signal generator module (DDS), program-controlled amplifier module (VGA), detector module, and remote signal transmission module.
Main control: stm32F103RCT6 development board
Display: LCD12864 display
The selected chip is AD9910, which has a built-in 14 bit DAC and supports a sampling rate of up to 1 GSPS. The AD9910 uses advanced DDS patented technology to greatly reduce power consumption without sacrificing performance. The DDS/DAC combination forms a digitally programmable high-frequency analog output frequency synthesizer capable of generating frequency-agile sine waveforms at frequencies up to 400 MHz.
Users have access to three signal control parameters used to control DDS: frequency, phase and amplitude. The AD9910 utilizes a 32-bit accumulator to provide fast frequency hopping and frequency tuning resolution. At 1 GSPS sampling rate, the tuning resolution is ~0.23 Hz. This DDS also implements fast phase and amplitude switching functions. Users can program the AD9910's internal control register through the serial I/O port to control the AD9910. The AD9910 integrates static RAM to support multiple combinations of frequency, phase, and/or amplitude modulation. The AD9910 also supports user-defined CNC digital ramp operation modes. In this mode, the frequency, phase, or amplitude changes linearly with time. The built-in high-speed parallel data input port of AD9910 can realize direct modulation of frequency, phase, amplitude or pole to support more advanced modulation functions.
Note: The design of the signal generator module is relatively complex, so the modules used in this project were purchased from Taobao.
The buttons are integrated into the operation panel during control, and the LCD displays the frequency and amplitude of the current signal in real time, making it easy to control.
const uchar cfr1[]={0x00,0x40,0x00,0x00}; //cfr1控制字
const uchar cfr2[]={0x01,0x00,0x00,0x00}; //cfr2控制字
const uchar cfr3[]={0x05,0x0F,0x41,0x32}; //cfr3控制字 40M输入 25倍频 VC0=101 ICP=001;
uchar profile11[]={0x3f,0xff,0x00,0x00,0x25,0x09,0x7b,0x42}; //profile11控制字 0x25,0x09,0x7b,0x42
void Txfrc(void)
{
uchar m;
CS=0;
txd_8bit(0x0e); //发送profile1控制字地址
for (m=0;m<8;m++)
txd_8bit(profile11[m]);
CS=1;
UP_DAT=1;
UP_DAT=0;
// Delay_ms(1);
}
void Freq_convert(ulong Freq)
{
ulong Temp;
Temp=(ulong)Freq*4.294967296;//将输入频率因子分为四个字节 4.294967296=(2^32)/1000000000
profile11[7]=(uchar)Temp;
profile11[6]=(uchar)(Temp>>8);
profile11[5]=(uchar)(Temp>>16);
profile11[4]=(uchar)(Temp>>24);
Txfrc();
}
void Amp_convert(ulong Amp)
{
u16 Temp = (u16)Amp;
profile11[1]=(uchar)Temp;
profile11[0]=(uchar)(Temp>>8);
Txfrc();
}
The AD9910 can achieve a continuously adjustable peak-to-peak value of 5mV to 700mV, and the frequency is continuously adjustable from 1 to 50Mhz in steps of less than 1MHz, fully meeting the requirements of the question.
The automatic scanning function can arbitrarily set the scanning frequency range, frequency step and interval time, and use pure button control, independent of the computer, to meet the question requirements.
The selected chips are AD8370, OPA695, OPA690, and AD8370.
The AD8370 is a programmable amplifier that provides two gain control ranges that can be controlled through a three-wire digital interface and allows the user to fine-tune the gain control to obtain the highest receiver sensitivity. Supports up to 750MHz, and controls the amplification factor through the microcontroller to achieve adjustable gain. OPA690 and OPA695 are operational amplifiers, and the AD8370 post-stage conditioning circuit functions as a follower and subtractor, and will further increase the amplification factor.
The OPA695 is a high-bandwidth, current-feedback operational amplifier that combines an excellent 4300V/µs slew rate with low input voltage noise in a precision, low-cost, intermediate frequency (IF) amplifier. The OPA695 is optimized for high-gain operation and is ideal for buffering surface acoustic wave (SAW) filters in the IF strip or delivering high output power with low distortion for cable modem upstream line drivers. At lower gain, a higher bandwidth of 1400 MHz is achieved.
The OPA690 operational amplifier is a unity gain stable voltage feedback operational amplifier. The internal architecture delivers slew rate and full power bandwidth, and the new output stage architecture delivers high current with minimal headroom requirements. These features combine to provide excellent single-supply amplification. Using a single 5V supply, the OPA690 can provide an output swing of 1V to 4V with an output current of over 150 mA and a bandwidth of 150 MHz. The combination of these features makes the OPA690 an ideal wideband amplifier.
The magnification is controlled by buttons, with good precision, and the LCD displays it in real time, making it easy to debug and call. The input stage has been impedance matched, and the ideal gain multiple is achieved through three stages of amplification. The first stage uses AD8370 for program-controlled amplification to achieve preliminary signal amplification, the second stage uses OPA690 to follow the DC bias, and the third stage uses opa695 to The amplified differential mode output is biased to output a pure AC amplified signal. Amplifiers at all levels match each other to achieve good amplification effects.
void writedataAD8370(u8 id, u8 dat)
{
int i;
AD8370_LATCH_HIGH;
delay_us(1);
AD8370_LATCH_LOW;
//发送8bit数据到AD8370
for(i = 0; i < 8; i++){
delay_us(2);
AD8370_CLK_LOW;
(dat & 0x80) ? AD8370_DAT_HIGH : AD8370_DAT_LOW; //判断dat最高位,决定数据位发送高或发送低
delay_us(2);
AD8370_CLK_HIGH; //AD8370在时钟沿上升时读取1位数据
dat <<= 1;
}
AD8370_LATCH_HIGH;
}
It accepts 1~50MHz signals from DDS and achieves a 40dB gain, and the output waveform is perfect without distortion. The highest peak value can reach 1.13V, which meets the requirements of the question.
And further testing can reach a maximum signal bandwidth of more than 100MHz.
The chip of choice is the AD8361, suitable for high frequency receiver and transmitter signal chains up to 2.5 GHz. The device is very simple to use, requiring only a single 2.7 V to 5.5 V supply, supply decoupling capacitors, and input coupling capacitors to operate in most applications. The output responds linearly to DC voltage with a conversion gain of 7.5 V/V rms. An external filter capacitor can be added to improve the averaging time constant. The response is fast, the noise is extremely low, and no clutter can be seen in the output DC signal using an oscilloscope. Special attention needs to be paid when using this module. The effective value of the signal that AD8361 can receive is not easy to be too high, generally not exceeding 700mV .
Voltage detection can be achieved by directly transferring the output voltage value to the ADC pin of stm32F103RCT6. However, it is necessary to calculate the proportional coefficient between the effective value of the signal and the output level through linear regression in advance, so that it can be passed into the microcontroller for subsequent drawing of the amplitude-frequency characteristic curve.
Use the DAC signal of the STM32 as the X input, the signal output of the detector module as the Y input, use the oscilloscope XY mode, and control the AD9910 to sweep the frequency. The amplitude-frequency characteristics can be drawn on the oscilloscope.
Select the ESP8266 module, process the serial port signal output by the microcontroller, and directly transmit the frequency and effective value information to the TCP server established by the computer. Then use the Python program to establish a coordinate system based on the existing values to draw the corresponding amplitude-frequency characteristics, which are displayed in on the computer.
(1) Read all the serial port information into a string at one time.
(2) Determine whether the string header is valid serial port information sent by the microcontroller.
(3) String processing, extract amplitude frequency information, and send it to the TCP server created by the computer.
(4) PC-side Python program drawing.
Through the TCP server of the router LAN, the amplitude-frequency characteristics of STM32 can be better transmitted to the PC, and the amplitude-frequency characteristic curve can be drawn in real time through python.
RX——PA9
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet