In many electronic systems, it is often necessary to use a sine wave signal with adjustable frequency and amplitude as a reference or carrier signal. Sine wave signals are mainly generated through two methods: analog circuits or DDS (Direct Digital Synthesis). Compared with analog circuits, DDS has many advantages such as continuous phase, high frequency resolution, fast conversion speed, and stable signal. Therefore, DDS storage radar , communications, testing, instrumentation and other fields have been widely used.
1 System composition
The core component of the system is AD7008, which is a highly integrated DDS frequency synthesizer launched by ADI. First, the microcontroller sends the frequency control word to the AD7008, and the required sinusoidal signal can be obtained at the output port of the AD7008. In order to make the frequency of the output signal more stable, the output signal is passed through a center frequency adjustable bandpass filter composed of MAX262 Carry out filtering processing. The center frequency of MAX262 is set according to the output frequency of AD7008 through the microcontroller. The function of DAC0832 is to control the amplitude of the output signal. The system block diagram is shown in Figure 1.
2 Main hardware circuit
The main hardware circuit of the system is shown in Figure 2. It mainly consists of three parts: the interface between AD7008 and the microcontroller, program-controlled filter, and amplitude control. Now they are introduced separately.
1.2.1 The interface between A07008 and the microcontroller
AD7008 can form parallel or serial interface modes with the peripheral MPU. The parallel interface can be divided into 8-bit and 16-bit. Since the system uses an 8-bit microcontroller, considering the response speed, an 8-bit parallel interface is adopted. When the microcontroller sends data to the PO port. If a negative pulse occurs on the WR pin of AD7008 (connected to P1.0 of the microcontroller), the data in the PO port is sent to the parallel register of AD7008. If the LOAD pin of AD7008 (connected to Pl.1 of the microcontroller) has a positive pulse, then according to the logical relationship of TC3 ~ TC0 (connected to PO.3 ~ PO.0 of the microcontroller), the data in the AD7008 parallel register will be Send it to the on-chip command register, frequency register 0, frequency register 1 or phase register. This is used to control the sinusoidal signal generated by the AD7008. The output pins lOUT and IOUT of AD7008 are connected to ground through a resistor, which converts the output current into voltage, and then passes through a subtraction circuit composed of an operational amplifier to generate a sine wave.
2.2 Design of program-controlled filter
In order to improve the quality of the output signal, the sinusoidal signal generated by AD7008 must be filtered. Since the signal generator is used in electrical measuring instruments, its frequency requirement for sinusoidal signals is 40Hz to 5kHz. The author chooses MAX262 with an operating frequency of 1Hz ~ 140kHz to form a band-pass filter with a programmable center frequency. The MAX262 has three programmable parameters: center frequency , Q value and operating mode. All program control parameters are input through data pins DO and Dl. Address pins A3~A0 control input data into different registers. When the frequency of the AD7008 output signal is determined, the center frequency and Q value of MAX262 can be set. In this way, a programmable band-pass filter is formed to filter the output signal of AD7008.
2.3 Amplitude control
The amplitude control of the sinusoidal signal is achieved through the D/A converter DAC0832. The filtered sinusoidal signal is connected to the reference voltage pin VREF of DAC0832. The eight-bit data input pin of DAC0832 is connected to the P0 port of the microcontroller, and the chip select signal CS (connected to PI.2 of the microcontroller) determines whether the input data is strobed. As can be seen from Figure 2, DAC0832 works in a single buffer register mode, that is, when CS is low level, the data sent by the DO~D7 data lines is directly converted to D/A.
According to the working principle of D/A conversion:
Substituting , we have:
The first-stage operational amplifier converts the current into a voltage output, then we have:
Substituting the expression, we get that
the second-stage operational amplifier acts as a reverse amplification, and its The relationship between the input and output voltages is:
Substituting the expression, we finally get the following relationship:
Because , after the input voltage passes through the circuit, its output is attenuated by digital control. When R changes the value of DO~D7, the output voltage also changes accordingly, that is, the amplitude control of the sinusoidal signal is realized.
3 Software Design
After the microcontroller is powered on and reset, first initialize AD 7 0 0 8 and MAX262. Then start detecting the peripheral input unit. When there is frequency setting input. Then send the frequency control word to AD7008, and then set the center frequency and Q value of MAX262 according to the signal frequency. When there is an amplitude setting input, the amplitude control word is sent to DAC0832. The program flow diagram is shown in Figure 3.
Conclusion:
This signal generator has been successfully used in an electrical measurement system with good results. Due to limitations of the actual needs of the system, the full advantages of DDS technology have not yet been fully utilized. DDS can also be used in frequency hopping communications, digital modulation and other fields. Especially in applications that require high frequency accuracy and short conversion time, the use of DDS technology has incomparable advantages over other frequency synthesis technologies. Due to its own advantages, DDS will be widely used in frequency synthesis fields with high performance requirements.
Previous article:Using AD7008 to construct a programmable sine wave signal generator
Next article:DDS device AD9858 and its application in radar signal source
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Portable energy storage power supply-Nanxin Semiconductor enters the market with strength
- Summary of the characteristics of 5 wireless transmission protocols for the Internet of Things
- Can dual 12V power supplies be used in parallel?
- MSP-FET430UIF driver cannot be installed in Windows 7
- Use GD32 to make a music spectrum to practice
- Zhou Ligong ZDS1104 and Macosin Oscilloscope STO1104C Operation Video (Transferred)
- Energy Harvesting with MSP430 FRAM Microcontrollers
- Live FAQ|Maxim IO-Link Solution
- How to solve the problem that a pin of the HuaDa MCU always outputs a high-level pulse after power-on reset/hardware reset?
- 【Qinheng RISC-V core CH582】WeChat applet controls lighting