Design and Implementation of Spectrum Analysis System Based on LabWindows/CVI

Publisher:脑洞飞翔Latest update time:2012-07-12 Source: 61icKeywords:LabWindows Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

When the WDP500-2A plane grating monochromator is used to test the emission wavelength of a high-power laser diode at different currents, the matching of the laser diode has the disadvantages of low automation, low efficiency and unfriendly analysis interface.

A self-made RS232 serial communication interface card was used, and the analysis software was developed using the virtual instrument programming language LabWindows/CVI of the American NI company, which realized the automatic positioning, scanning, data analysis, and data processing functions of the monochromator. The spectral analysis system ran well and improved the test efficiency.

1 Introduction

When using diodes to pump all-solid-state lasers, due to the limited output power of each laser diode bar , to achieve a certain output optical power, it is often necessary to use several diode bars to jointly pump the YAG rod. However, due to the limitations of the manufacturing process, the actual parameter distribution of the same batch of diode bars is not completely consistent. In order to achieve the best pumping efficiency, the usual practice is to package several diode bars with the closest parameters into a group and then jointly pump the YAG rod. This requires testing the spectral characteristics of each laser diode bar under the normal operation of a single tube, so as to obtain parameters such as the central wavelength, bandwidth, and temperature drift. The WDP500-2A plane grating monochromator is used for testing, and manual operation is adopted. The process is monotonous and boring, the test results have large errors, and the efficiency is low. There is also a plane grating monochromator data analysis system based on MS-DOS, but the operation interface is not friendly, and data cannot be displayed dynamically or controlled in real time. In view of the practical difficulties encountered in the test and analysis process, we designed and produced an RS232 serial communication interface card and developed a spectrum analysis system based on LabWindows/CVI language, which realized the automation and real-time test and analysis of the spectrum characteristics of laser diode strips, which not only improved the accuracy of parameters, but also greatly improved the efficiency. The superiority of this analysis system was fully reflected and proved in the process of assembling the diode pump head.

2 Principle of plane grating monochromator

The plane grating monochromator is mainly composed of a light source, a grating, a photodetector, a stepper motor, etc. After the light beam emitted by the light source or the lighting system is split by the grating, the incident composite light is decomposed into monochromatic light and shines on the photodetector. At this time, the angle of the grating rotation corresponds to a monochromatic light of a certain wavelength, and the voltage on the photodetector corresponds to the intensity of the monochromatic light. Among them, the angle of the grating rotation is controlled by the movement of the stepper motor.

3 Interface Card Design

According to the basic principle of the plane grating monochromator, the wavelength of the test can be controlled by controlling the rotation of the stepper motor, and the light intensity at the rotation angle can be measured. This system uses AT89C51 and MAX180 as the core devices to design the hardware interface card, which mainly realizes the following functions:

1) Realize serial communication between RS232 and computer ;

2) Control the stepper motor to realize the positioning, forward, backward and speed setting of the stepper motor;

3) Preprocess the signal on the photodetector and perform sampling;

4) Realize keyboard control and status display functions.

3.1 Hardware block diagram design

The hardware block diagram of this system is shown in Figure 1. The monochromatic light signal decomposed by the monochromator is converted into a weak analog electrical signal by the photodiode. After being amplified by the high-precision instrument amplifier MAX4197, 模数转换\'); companyAdEvent.show(this,\'companyAdDiv\',[5,18])"> it is converted by the 12-bit resolution A/D converter MAX180 . The converted data is sent to the microcontroller AT89C51 for packaging and processing, and finally sent to the PC. On the other hand, the command frame sent by the PC is received by the microcontroller, decoded, and the specific control and sampling operations of the stepper motor are realized.

Hardware block diagram of this system

The communication between the microcontroller and the PC must be level-converted, converting the TTL level into the RS-232C level. This can be achieved using a MAX232 dedicated conversion chip. The drive circuit controls the start/stop, forward, backward, speed, etc. of the stepper motor (where the P1.4 port of the microcontroller is responsible for generating the drive square wave, and the P1.3 port is responsible for direction control). At the same time, in order to improve the stability of the microcontroller, an optoelectronic isolation circuit is added between the drive circuit and the microcontroller.

In addition, this system uses the LCD display module TM162A to realize status display and the keypad to realize the initial parameter setting of the interface card.

3.2 Specific circuit design

The specific circuit is shown in Figure 2. In the photoelectric conversion circuit, considering that our measured band range is around 808nM, the photoelectric conversion sensor OP T uses a low-noise, high-amplification silicon photodiode produced by the 44th Institute of the Ministry of Electronic Industry. According to the provided parameters, in order to further reduce its dark current and ensure a certain degree of accuracy, we use a bias voltage of -24 volts. Considering the voltage-dividing effect of the load resistor, the load resistor R1 should not be too large, and 200 ohms is more suitable. The weak signal output by the photoelectric conversion is increased through a high-precision amplifier circuit composed of MAX4197 to meet the requirements of the A/D converter input signal. The acquisition and transmission circuit consists of AT89C51 and a 12-bit resolution A/D converter MAX180. Using the stepper motor pulse distribution circuit and direction control bit provided by the WDP500-2A plane grating monochromator, we use the single-chip microcomputer P1.4 to simulate the drive square wave and P1.3 to control the direction. The use of optical couple isolation eliminates the interference that may be caused by the stepper motor.

Specific circuit

[page]

3.3 Several practical issues

In the actual design process, it is necessary to prevent the stepper motor from losing steps; when testing the light intensity at a certain wavelength, the stepper motor should be guaranteed to be stable; in order to ensure the reliability of the data, numerical filtering should be performed to eliminate the interference of 50HZ power frequency, stepper motor, background light, etc.; because there is a contradiction between the test speed and the test accuracy, the design of the stepper motor rotation speed should not be too fast.

In order to improve the scanning speed and transmission accuracy, we use the frame format shown in Figure 3. First, to improve the reliability of sampling, we consider sampling data 5 times at one frequency point, and then perform two-rejection-three average filtering (that is, among the 5 sampled data, first remove the largest and smallest two sampled data, and then average the remaining three sampled data).

Frame format

Since one frequency point needs to sample data five times, the amount of data transmission is very large. We use the RS232 serial communication method. Although its implementation method is simple, the data transmission speed is very limited. To overcome this shortcoming, we also consider that the number of bits of the lowest bit is different for five data samplings at the same frequency point. Therefore, we use the data compression coding of transmitting the high eight bits once and the low four bits five times to transmit the data five times at the same frequency point. This can achieve the simultaneous improvement of sampling speed and reliability, reduce the burden of data transmission and ensure real-time performance.

In addition, in the stepper motor drive control circuit, during actual debugging, we found that if a standard square wave signal is directly applied to the drive waveform input end, a "click, click" sound will be heard. By using the power provided by the plane grating monochromator and adding a CMOS NAND gate U6 (4011) as a waveform buffer, the above problem is well solved, allowing the stepper motor to run smoothly.

3.4 Interface Card Software Design

The hardware interface card program is written in AT89C51 assembly language to complete the control of the stepper motor, data collection, communication with the PC, and display keyboard and other functions. The main program flow chart is shown in Figure 4 below:

The timer 0 interrupt service routine is used to generate a square wave drive signal to drive the stepper motor. It works in mode 1, where TH0 and TL0 are determined by the rotation rate set by the PC. The sampling/transmission flag 07H is set by the PC or keyboard command. If (07H) = 1, the flag (00H) = 1 is set to start the sampling subroutine and the data transmission subroutine. Otherwise, (00H) = 0 stops the sampling subroutine and the data transmission subroutine. The end flag 08H, when (08H) = 1, ends the sampling. Otherwise, the sampling process continues. An appropriate delay should be added before each data acquisition so that the stepper motor can be stabilized before reading.

The BUSY terminal of AD converter MAX180 is connected to INT0 of AT89C51, and INT0 is set to edge trigger mode IT0=1. When the BUSY signal changes from valid state to invalid state, the microcontroller enters its external interrupt service program SAMINT0 to complete a data acquisition. During debugging, in order to ensure that the software function is executed once, the indicated wavelength of the plane grating monochromator is turned by one unit, which can be achieved by fine-tuning the initial value of the timing interrupt.

AT89C51 receives data/commands from the host PC through the serial port interrupt service program MCRXPCINT.

Part of the assembly program is as follows:

program

4 Design of data analysis system

At present, there are many application development software, such as VC, VB, etc., but the development cycle is relatively long and the difficulty is relatively high; the virtual instrument programming language LabWindows/ CVI launched by the American NI company , with its rich buttons, graphics and other user interface library functions, has greatly shortened the software development cycle and can meet the actual needs of development.

During the design process, according to actual requirements, we divided the system into three modules: parameter setting and dynamic collection, data analysis and processing, and data management.

In the "Parameter Setting and Dynamic Acquisition" module, in order to improve the adaptability of the system, the serial port communication rate is adjustable to meet the requirements of various sampling rates. Therefore, when the system is applied, the serial port parameters should be set first, and then sampling, positioning and other operations can be performed. Therefore, the function buttons such as "Sampling Start/Stop" and "Parameter Positioning" on the system analysis interface are gray (in an invalid state) at first, and only become valid after the serial port parameters are set. Before the test starts, the system must be calibrated, that is, according to the wavelength indicated by the current position of the plane grating monochromator pointer, the current position value of the stepper motor on the system interface is set to make the two completely consistent. Then click the "Parameter Positioning" button to set the starting wavelength and end wavelength of the test scan. At this time, the stepper motor will automatically position to the starting position required for scanning. Then click the "Sampling Start/Stop" button, the system starts sampling and records the sampled data. When the sampling reaches the preset end wavelength, the system automatically stops sampling.

In the "Data Analysis and Processing" module, we first pass the collected data through a 50th-order FIR power frequency notch filter to eliminate power frequency interference. The filtered data is processed to find the extreme value, so as to obtain the bandwidth of the waveform, the presence of multiple peaks, and other characteristics. After adding the cursor control, the current wavelength and relative intensity value can be dynamically obtained.

In the "Data Management" module, we save the characteristic data of different diodes under different currents. When specific analysis is needed, the data can be reproduced and automatically matched and screened in a batch of test data according to parameter requirements. This greatly improves the assembly efficiency when installing the diode pump head.

LabWindows /CVI programming language provides a wealth of library functions, which can easily realize the functions of the above three modules. RS-232 library functions such as ComWrtByte() serial port byte sending command, ComReadByte() serial port receiving byte command, CloseCom() serial port closing command, and OpenComConfig() serial port opening command can be used to realize data/command sending and receiving functions with AT89C51. Use the SuspendTimerCallbacks() and ResumeTimerCallbacks() functions of the timer control Timers to realize dynamic drawing of data, automatic positioning and other functions in the callback function.

[page]

5 System Application Examples

The system was applied to the assembly of high-power lasers, and the results were very satisfactory. Figure 5 shows the spectral characteristic curves of the 808 continuous diode bar produced in Germany under the action of 30A and 45A currents. It can be directly read from the analysis system interface that the center frequency of the diode bar is 806.10nM at 30A and 808.20nM at 45A; the bandwidth changes from 0.7nM to 1.0nM; similarly, several diode bars can be tested in this way to extract their characteristic values; finally, automatic matching and screening can be performed among these diodes according to parameter settings.

The spectral characteristic curve of the 808 continuous diode strip produced in Germany under the action of 30A and 45A current is actually tested.

6 Conclusion

This test and analysis system has realized the improvement of the WDP500-2A plane grating monochromator test system and the optimization of the plane grating monochromator data analysis system based on MS-DOS. It uses the hardware interface card of RS232 serial communication, which is easy to use; it uses LabWindows/CVI language to develop the analysis system, which is fast and practical. Its analysis interface is simple and friendly, with complete functions, and it realizes the automatic positioning, scanning, data analysis, data processing and other functions of the plane grating monochromator. In the assembly of high-power lasers, the application of this test and analysis system not only improves the efficiency of assembly, but also improves the quality of assembly. At the same time, this test and analysis system can also be widely used in the spectrum analysis of other optical devices and the research of optical communications.

References

[1] Miao Jiading et al., Optoelectronic Technology, 1994, Zhejiang University Press

[2] Li Chaoqing, PC and MCU Data Communication Technology, 1999, Beijing University of Aeronautics and Astronautics

[3] Yao Tianren et al., Modern Digital Signal Processing , Huazhong University of Science and Technology Press, 2000

[4] WDP500-2A Planar Grating Monochromator User Manual

[5] NI LabWindows/CVI User Manual

Keywords:LabWindows Reference address:Design and Implementation of Spectrum Analysis System Based on LabWindows/CVI

Previous article:Using ZLGCAN Interface Function Library in LabVIEW
Next article:Implementation of FIFO depth setting in FPGA module based on LabVIEW

Latest Test Measurement Articles
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号