In electronic engineering design and testing, some complex signals with special requirements are often needed, requiring that their waveforms can be generated arbitrarily and the frequency can be easily adjusted. It is difficult for ordinary signal generators to meet the requirements, and the arbitrary signal generators sold on the market are expensive. In combination with actual needs, we designed an arbitrary waveform generator. In the circuit design, the simulation function of MATLAB is fully utilized to complete the generation, sampling and analog-to-digital conversion of the desired waveform signal in MATLAB, and the obtained digital waveform data is stored in the data storage device. Through the control of the single-chip microcomputer and CPLD, the waveform data is read out and sent to the backward channel for A/D conversion and amplification to obtain the required analog signal waveform. The arbitrary waveform generator designed by the above method has flexible and convenient signal generation, flexible function expansion, and adjustable signal parameters, realizing the software design of hardware circuits. It has the advantages of simple circuit structure, strong practicality, and low cost.
System Block Diagram
The design idea of the arbitrary waveform generator is to use the powerful simulation function of MATLAB to conveniently and quickly generate arbitrary waveform data of given frequency, period, and pulse width; and pre-store the data in the data memory. Under the control of the single-chip microcomputer, the CPLD circuit is used to generate the address read data, which is sent to the D/A conversion circuit to obtain the required arbitrary waveform signal. The system structure block diagram is shown in Figure 1; the frequency division circuit and address generator in the figure are implemented by CPLD.
Related pictures for this topic are as follows:
Figure 1 System Block Diagram
Circuit design and implementation
Single chip control circuit
The single-chip microcomputer uses AT89C52 chip, and generates the required control signal through software programming. The main control parameters include: signal period, pulse width; start signal of frequency division circuit, reset signal of address generator; selection signal of E2PROM; selection signal of D/A conversion circuit. In the specific circuit, port P1.0 controls the start of frequency division circuit, P1.1 controls the reset of address generator, and P2.0 controls the selection signal of 28C256 and AD7545. The single-chip microcomputer works in timer 0 mode, and the software design is implemented in C language. The flow chart is shown in Figure 2.
Related pictures for this topic are as follows:
Figure 2 Software Flowchart
Waveform data generation
As an excellent mathematical tool software, MATLAB has powerful computing functions. It can easily generate various signal waveforms and realize the generation, sampling and analog-to-digital conversion of waveform signals in the software. The designed arbitrary waveform generator uses 28C256 chip as the data storage device. The signal waveform is generated by MATLAB simulation. The obtained waveform data is stored in the data storage device 28C256. In the specific design, we require the generation of a single/FM mixed signal with a period of 200ms and a pulse width of 5ms. The pulse width of the single frequency signal is 4ms and the frequency is 30KHz; the pulse width of the FM signal is 1ms and the frequency is 30KHz_35KHz. The sampling rate is set to 500KHz in MATLAB, and 2500 waveform data are obtained. In the process of burning these mixed waveform data into the data storage device, due to the large amount of waveform data, it is not only time-consuming and error-prone to directly enter the data storage device manually. In order to overcome this drawback, the generated waveform data is stored in the INTEL format of the HEX file through MATLAB programming, and then these waveform data are burned into the data storage device in batches. By adopting the above method, waveform data generation is simple and fast; signal parameters can be conveniently modified in the software program as needed; and functional expansion of signal parameters can be achieved without changing the hardware circuit.
CPLD Logic Design
The frequency division circuit is implemented by two 74HC163 chips. Through the frequency division circuit, the 12MHz crystal oscillator standard frequency is divided to obtain a 500KHz sampling frequency, which is used as the clock of the address generator. The operation of the frequency division circuit is controlled by a single-chip microcomputer.
The address generator circuit is composed of three 74HC163 chips, with a clock frequency of 500KHz, provided by a frequency division circuit; it is consistent with the sampling frequency of the pre-stored waveform data to achieve distortion-free reading of the data.
In the circuit design, the EPM7128AETC100-10 chip of ALTRA Company is used to complete the frequency division and the PLD circuit design in the MAX+PLUSⅡ development environment. Most of the small and medium-scale integrated circuits and discrete components can be omitted, making the circuit have the significant advantages of high integration, fast working speed, convenient programming and low price. Through the signal realization method of CPLD and data pre-generation, the signal parameters can be adjusted arbitrarily without changing the hardware circuit; at the same time, the peripheral circuit is very simple, which brings convenience to engineering debugging and application.
D/A conversion circuit
The implementation of the D/A conversion circuit is shown in Figure 3. In the circuit, AD7545 converts waveform data into analog signals; LF353 performs signal filtering and shaping.
Related pictures for this topic are as follows:
Conclusion
The arbitrary waveform generator designed by the above method, through the combination of software and hardware, gives full play to the powerful simulation function of MATLAB and reduces the hardware cost as much as possible. According to actual needs, it can generate a variety of waveforms such as sine wave, triangle wave, sawtooth wave, square wave, etc. It can generate a variety of waveform parameters such as linear frequency modulation signal (LFM), single frequency pulse signal (CW), cosine envelope signal and their combination signals; it meets the needs of engineering. The arbitrary waveform generator has been applied to the ongoing project "underwater moving target trajectory measurement" with good results.
Previous article:Ward Calling System Based on Low Voltage Power Line Carrier Technology
Next article:51 MCU --- Timer/Counter
Recommended ReadingLatest update time:2024-11-15 13:35
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- Learn CPLD and Verilog HDL programming technology from scratch_Let beginners easily learn CPLD system design technology through practical methods
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Today is International Day Against Spatting. Were you ever spanked as a child?
- B&O Beoplay E8 TWS True Wireless Bluetooth Earphones
- Flyback switching power supply simulation using Saber
- Our company makes FOC motor drivers. The algorithm is mature. We want to find a chip manufacturer to cooperate with us to make a motor-specific chip.
- How to build a simple and efficient isolated power supply below 2W
- Six common circuit board surface treatment processes
- [RISC-V MCU CH32V103 Review] - 5: Failed to leave API and enter Assembly, returned to API......
- BQ76940 sampling chip damage issue
- [RVB2601 Creative Application Development] LoRa Gateway Wireless Host Computer
- There is a program with a total of 10 feeders