Signal Acquisition System of Multi-wavelength Meter Based on ADμC842

Publisher:数字冒险Latest update time:2012-01-07 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

Laser wavelength/frequency measuring instruments, also known as wavemeters, can be used to measure the output wavelength of a tuned laser or the wavelength of an unknown laser, and play an important role in the field of optical frequency standard research. Laser wavelength meters are based on the Michelson interference principle: two laser beams are superimposed on each other to produce interference fringes. By comparing the number of interference fringes between a reference laser with a known wavelength and a laser with an unknown wavelength, the wavelength/frequency value of the laser being measured can be obtained.

2 Principle of wavelength meter based on Michelson interferometer

The Michelson wavelength meter is suitable for measuring the wavelength of continuous lasers. Its optical system adopts the Michelson interference principle, as shown in Figure 1.

The reference light source outputs light beam 1, which is divided into two beams of the same frequency after multiple reflections. Finally, they converge at point B to interfere and are received by the light detector D1 as a reference signal.

The light to be measured is injected through the light barrier and adjusted to coincide with the emitted reference light; the two reflectors R1 and R2 are installed on the same movable parallel rail. When the wavelength meter is working, the driving motor drags the rail to move back and forth continuously along the axial direction, so that the reference light and the light to be measured have an optical path difference, causing interference, which is received by the light detectors D1 and D2, thereby obtaining the signal of their interference fringes.

Figure 1 Michelson wavemeter structure

The single wavelength measurement technology obtains the number of interference fringes of the reference laser and the measured laser respectively through the subdivision, shaping and counting circuit of the interference fringes signal. The measured laser wavelength value can be directly obtained based on the reference laser wavelength value and the ratio of the two groups of fringes.

Since the system only uses a simple counting method for the photoelectric signal, when mixed-frequency lasers (such as green light and red light) are injected into the wavelength meter, an erroneous wavelength value will be obtained.

3. Improvement plan

3.1 Plan formulation

The light intensity signal obtained after photoelectric conversion is an analog electrical signal, which needs to be converted into a digital signal for computer analysis. The acquisition of light intensity signals requires high acquisition rate, large data storage capacity, and high analog-to-digital conversion accuracy.

To achieve the above performance, three parameters are required: Precision: The higher the number of AD conversion bits, the higher the precision; Sampling rate: The higher the conversion rate, the more favorable it is for high-frequency signals; Storage capacity: Large-capacity storage can facilitate the processing of large amounts of data.

Although the existing ADC has reached a conversion rate of hundreds of megahertz, it is usually an independent component separated from the microcontroller. The use of 6000 series DSP processors will increase costs and extend the development cycle. According to the characteristics of the signal and the requirements of fast system acquisition, a high-speed, large-capacity signal acquisition system for laser wavelength meters based on the ADμC842 microcontroller was developed.

Usually there are four ways to transfer I/O data, namely: synchronous transfer, asynchronous transfer, interrupt transfer, and DMA transfer .

In the above three data transmission methods, they all need to be transferred to the CPU to be realized. The single-chip microcomputer system cannot achieve high-speed data transmission and data acquisition that is less than its instruction cycle. This limits the application of single-chip microcomputers in the field of high-speed data transmission.

DMA (Direct Memory Access) means direct memory access, which is a working mode that uses hardware to perform data transfer. Today, ADI has launched a new ADμC842 microcontroller, which integrates AD conversion, DMA function, and microcontroller core, which can fully meet the required accuracy and acquisition rate. In addition, the ADμC842 chip can be connected to an external 16M off-chip memory.

3.2 System Principle and Composition

The data acquisition system consists of an ADμC842 single-chip microcomputer and an off-chip memory SDRAM, a photoelectric conversion circuit, a phase-locked frequency multiplication circuit, and a host PC. The measured light signal is converted into an electrical signal through a photodetector and input into the ADC port of the ADμC842 chip; the reference laser signal is used to trigger the AD conversion after frequency multiplication, and is used as the time base for data acquisition to offset the unstable speed of the drive motor dragging the reflector to scan. The system consists of a lower computer and a host computer, which are connected via RS232. The entire system is shown in Figure 2.

The ADμC842 chip can use external triggering to perform high-speed signal acquisition, that is, input a square wave trigger pulse to the trigger end of the microcontroller. Every time a square wave is input, the microcontroller acquires the signal once and stores it.

According to the sampling theorem, to ensure that the original continuous time signal can be restored without distortion from the discrete time signal after the signal is sampled (that is, sampling will not cause any information loss), it must be satisfied that: the signal is band-limited (the signal frequency range is limited); the sampling rate is at least twice the highest frequency of the signal. After the reference light is multiplied by 16 using the NE564 phase-locked loop chip, the multiplied signal is used as the trigger signal to meet the sampling theorem. In this way, it can be ensured that the undistorted signal is collected when the frequency of the signal to be collected is unstable. www.51kaifa.com

The ADμC842 chip is a high-performance multi-channel data acquisition system with an embedded MCU, but the internal data storage is limited. The addition of a flash memory such as a 62512 chip can solve these problems. Finally, the collected signal is transformed by FFT to obtain a spectrum signal, which can intuitively observe the frequency domain characteristics of light, and thus solve the problem of two lights of different frequencies entering the wavelength meter at the same time, causing the count value to be wrong. www.51kaifa.com

3.3 Working Principle

3.3.1 DMA enable and response

When the microcontroller system is powered on or performing internal data processing, DMA should be set low to disable the DMA state. When DMA is enabled to 1, it enters the DMA preparation state and waits for the external trigger signal input. The DMA trigger signal can be a zero-crossing pulse of a periodic signal or a single pulse signal amplified and shaped output. When the first trigger pulse after DMA is enabled arrives, the microcontroller starts data acquisition and transmission.

3.3.2 Control of data lines and address lines

The bus selection control is controlled by the ALE enable signal to control two groups of 74LS373 three-state latches, making them in the open and high-impedance states respectively. Port P0 is an address/data multiplexing bus, which uses time-sharing multiplexing function to realize the time-sharing transmission of data signals and address signals on the same physical line.

2 Signal Acquisition System Principle Block Diagram

3.3.3 DMA block data transfer

At the beginning of the main program, the CPU sends the number of data to be input into the counter in the DMA controller through instructions in advance, and sends the starting address of the input data stored in the memory to the address register in the DMA controller. Then, the CPU can execute other programs in the main program, and also wait for the interrupt request sent by the DMA controller.

3.3.4 End of the response process

The DMA controller sends the input data in the address register to the internal memory at the address of the memory, and controls the input data in the data port to be stored in the corresponding storage unit of the internal memory, and then reduces the counter by 1 and determines whether it is equal to 0. If its content is not 0 (the amount of collected data is insufficient), it continues to collect data.

4 System software writing

4.1 Writing the lower computer software

To meet the needs of different working conditions, all components in the ADμC842 on-chip ADC module can be easily set through 3 SFR registers:

(1) ADCCON1 — controls conversion and sampling time

MD1 MD0: Control the working mode of ADC. Different values ​​of the two correspond to the four working modes of ADC power off; ADC normal operation; ADC power off when not executing conversion cycle; ADC standby when not executing conversion cycle.

CK1 CK0: Set the main clock division factor sent to the ADC clock. The optional division factors are 2, 4, 8, and 32.

AQ1 AQ0: Select the time when the sample-and-hold circuit samples the input signal. The optional sampling clock number is 1, 2, 3, or 4 ADC clocks.

T2C: When this bit is set to 1, the ADC conversion will be started by the overflow interrupt of Timer 2.

EXC: When this bit is set to 1, the ADC conversion will be started by the external input signal of the external pin CONVST.

(2) ADCCON2 — controls ADC channel selection and conversion mode www.51kaifa.com

ADCI: ADC interrupt flag. Set by hardware when ADC conversion is completed; cleared by hardware when MCU responds to the interrupt service subroutine.

DMA: DMA mode enable bit. When set to 1, the ADC DMA mode is started.

CCONV: Continuous conversion bit. When set to 1, the ADC enters the continuous conversion mode. www.51kaifa.com

SCONV: Single conversion bit. When set to 1, a single conversion cycle is started; the SCONV bit automatically resets to 0 when the conversion is completed.

CS3 CS2 CS1 CS0: Channel selection bits. 0-7 correspond to 8 analog input channels, 8 is the temperature sensor, and 15 is to stop DMA operation.

(3) ADCCON2 —ADC status indication

BUSY: ADC busy status bit.

It is a read-only status bit, which when set to 1 indicates that the ADC is in a conversion cycle or calibration cycle.

The remaining bits are reserved.

In DMA mode, the system can automatically store the AD conversion results in the specified location without the need for single-chip control. DMA mode is used to sample a fast-changing signal for a certain period of time, and the host computer can perform accurate spectrum analysis on the signal during this period of time.

4.2 Upper computer software writing

The host computer software uses VB visual programming tools. The receiving, sending and processing of command bytes are written in a multi-threaded manner. The collected data results are displayed in the interface. Data reception is completed by serial communication. The host computer part can also provide a data trend display function, which can dynamically display the change trend of data over a period of time. The data trend chart is represented by a line chart. The curve of the measured parameter changing with time can be displayed in the same rectangular system.

Figure 4 Reproduction of collected data and reproduction of graphics through VT RS232 host computer program

5. AD sampling debugging results

As shown in Figure 3, a signal generator is used to generate two waveforms, the sampling waveform is a square wave, and the waveform to be sampled is a sawtooth wave. In order to verify the correctness of the A/D conversion in the DMA mode, the following experiment was performed.

The waveform to be sampled is a sawtooth wave. After DMA conversion, the data can be viewed online on the PC through the RS232 communication serial port through the program DeBug V2, as shown in Figure 4. The correctness of the collected data can be verified, which can prove that DMA works normally.

6. Conclusion

As a new type of microcontroller, ADμC842 has powerful functions that cannot be matched by general single-chip microcomputers. It has an internal integrated 8-channel high-precision ADC, and can use the external trigger continuous conversion DMA mode when the ADC is collected, with an acquisition frequency of up to 420kHz. This project mainly uses the external trigger DMA mode of the ADC module of ADμC842 to realize the high-speed and large-capacity acquisition of the signal inside the laser wavelength meter, achieving the expected effect and providing a preliminary solution for the research of multi-wavelength measurement technology.

Innovation of the author of this article: At present, most of the wavelength meters based on the Michelson principle in China use simple photoelectric conversion, frequency doubling and counting to measure the laser wavelength value. Although the accuracy is getting higher and higher, when a laser with multiple wavelength values ​​is injected, the measurement will be wrong. This system uses the method of dual-path optical tracking to collect signals, and triggers the external DMA function through the reference light signal to realize the collection of the light signal to be measured, which overcomes this defect and can measure the laser values ​​of multiple wavelengths.

References

1. Zhang Hang, Li Yongjun, Sun Tiezheng, Yu Tao. Application of PXA255 in CCD image acquisition. Microcomputer Information, 2006, 10-1: 84-85

2. Li Gang. ADμC8XX series single chip microcomputer principle and application technology. Beijing: Beijing University of Aeronautics and Astronautics Press, 2002. www.51kaifa.com

3. ADμC842 Users Manual. Analogy Devices, Inc, 2004.

4. He Limin. Selected Microcontroller Application Technology. Beijing: Beijing University of Aeronautics and Astronautics Press, 1999.

5. Xu Aiqing. Single-chip microcomputer application and development system. Beijing: Beijing University of Aeronautics and Astronautics Press, 1995.

Reference address:Signal Acquisition System of Multi-wavelength Meter Based on ADμC842

Previous article:Design of dot matrix electronic display screen based on SPCE061A
Next article:Design of an ultra-low power consumption dairy cow estrus monitor

Recommended ReadingLatest update time:2024-11-16 23:51

s3c6410 DMA implementation (entry level)
char src = "abcdefghigklmn123456\n";  char dest = "kkkk\n"; void dma_init(void) {  DMACConfiguration = 1; //Enable the overall DMA  DMACC7SrcAddr = (int)src; //Assign the source address to the source address register  DMACC7DestAddr = (int)dest; //Assign the destination address to the destination address registe
[Microcontroller]
STM32F4 UART DMA initialization
The internal DMA initialization of the F4 chip is very different from that of the F103. Data streams are introduced here. There are 16 data streams in total for 2 DMAs (8 for each controller). Each data stream can process data from up to 8 channels. Each channel has an arbitrator to handle the priority of DMA requests
[Microcontroller]
STM32F4 UART DMA initialization
General steps of s3c2440 dma operation
 General steps of s3c2440 dma operation  Generally, in s3c2440, to perform dma transmission, the following seven steps are required: 1: int s3c2410_dma_request(unsigned int channel,             struct s3c2410_dma_client *client,             void *dev)   The definition of s3c2410_dma_client is: struct s3c2410_
[Microcontroller]
STM32F103 receives USART data with indefinite frame length based on DMA
DMA is a bus that copies data from one address space to another without using the CPU, which reduces the burden on the CPU and allows it to focus more on data operations. In order to reduce the burden on the CPU, DMA should be interrupted rather than inquired. Unfortunately, STM32F103 only provides three interrupts fo
[Microcontroller]
STM32 DMA application (II) DMA serial port data transmission--send
1. DMA request image From this we know that if we need to use the sending function of serial port 1, we need to use DMA1_Channel4 To use the receiving function of serial port 1, you need to use DMA1_Channel5     2. How to configure the software to use DMA to send data to the serial port? (1) Configuring DMA  
[Microcontroller]
STM32 DMA application (II) DMA serial port data transmission--send
stm32ADC非DMA mode的多时间的时间与可以时间的时间
The first one is a DMA mode of multiple channel acquisition void ADC_DMA_Config(void)  { ADC_InitTypeDef ADC_InitStructure; RCC_HSICmd(ENABLE); while (RCC_GetFlagStatus(RCC_FLAG_HSIRDY) == RESET);   RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE); ADC_DeInit(ADC1); ADC_StructInit(&ADC_InitStructure); ADC_InitStru
[Microcontroller]
STM32F407ZET6 USART DMA mode to send and receive data
There are two different ways to send and receive data using DMA on the serial port. The first way is to use the DMA transfer completion interrupt to send and receive; the second way is to use the serial port bus idle mode to send and receive data. Of these two ways, the second way is better because it can send and rec
[Microcontroller]
Data overwrite problem when serial port uses DMA to send data
In STM32 and other microcontrollers, in order to improve the execution efficiency of the program, DMA is often used to send and receive data when using the serial port. In this way, the CPU only needs to put the data in the send buffer and leave. However, since reference calls are used in serial port transmission, t
[Microcontroller]
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号