Wavemeter based on interferometer: Difference between revisions
| Line 52: | Line 52: | ||
The whole setup including air track and optics is built on a 750mmx750mm breadboard table. The aluminum linear stage is 550mmx50mm with a 150mmx50mm sledge sliding on its V-shape surface. The friction is reduced by producing an air cushion between the two surfaces using 10 small holes on the bottom of sledge that is provided with compressed air via a silicon tube. Two springs are attached to both ends of the sledge and fixed around two long screws. Besides the force provided by springs when reflected from ends, the kinetic energy loss is also compensated by a small push pull solenoid fixed on one end of the stage. Two optical switches are mounted on board to detect the signal when sledge reaches ends by a piece of paper fixed on sledge, controlling the solenoid. | The whole setup including air track and optics is built on a 750mmx750mm breadboard table. The aluminum linear stage is 550mmx50mm with a 150mmx50mm sledge sliding on its V-shape surface. The friction is reduced by producing an air cushion between the two surfaces using 10 small holes on the bottom of sledge that is provided with compressed air via a silicon tube. Two springs are attached to both ends of the sledge and fixed around two long screws. Besides the force provided by springs when reflected from ends, the kinetic energy loss is also compensated by a small push pull solenoid fixed on one end of the stage. Two optical switches are mounted on board to detect the signal when sledge reaches ends by a piece of paper fixed on sledge, controlling the solenoid. | ||
===Control Circuit=== | |||
The schematic of the circuit for control is shown below. Arduino UNO<ref>https://store.arduino.cc/usa/arduino-uno-rev3</ref> board is used to control and count signals and should be connected to a computer to power it and get reading. Two optical switches are used to get rid of signal change when car gets pushed back. The optical switch 0 is also used to turn on/off solenoid. A push pull solenoid is used to push the car and compensate for energy loss in motion. | The schematic of the circuit for control is shown below. Arduino UNO<ref>https://store.arduino.cc/usa/arduino-uno-rev3</ref> board is used to control and count signals and should be connected to a computer to power it and get reading. Two optical switches are used to get rid of signal change when car gets pushed back. The optical switch 0 is also used to turn on/off solenoid. A push pull solenoid is used to push the car and compensate for energy loss in motion. | ||
[[File:wavemeter_optical_switch.jpg|200px|right|thumb|optical switch]] | [[File:wavemeter_optical_switch.jpg|200px|right|thumb|optical switch]] | ||
[[File:wavemeter_solenoid.jpg|200px|right|thumb|push pull solenoid]] | [[File:wavemeter_solenoid.jpg|200px|right|thumb|push pull solenoid]] | ||
[[File:wavemeter circuit.png|thumb|right|300px|control circuit]] | [[File:wavemeter circuit.png|thumb|right|300px|control circuit]] | ||
Components we used: | ;Components we used: | ||
2 Optical switches OPB881T55Z | :2 Optical switches OPB881T55Z | ||
1 Push-Pull solenoid TAU0730TM-14 | :1 Push-Pull solenoid TAU0730TM-14 | ||
2 Optical detectors PDA10CS-EC and PDA50B-EC | :2 Optical detectors PDA10CS-EC and PDA50B-EC | ||
2 Resistors for photodiode <math>240\Omega</math> | :2 Resistors for photodiode <math>240\Omega</math> | ||
2 Resistors for phototransistor <math>6.7k\Omega</math> | :2 Resistors for phototransistor <math>6.7k\Omega</math> | ||
1 Resistor for transistor base <math>1k\Omega</math> | :1 Resistor for transistor base <math>1k\Omega</math> | ||
1 Transistor 2N2222A | :1 Transistor 2N2222A | ||
1 diode to protect 1N4007G | :1 diode to protect 1N4007G | ||
==Program== | ==Program== | ||
Revision as of 12:38, 27 April 2021
This project aims to build a wavemeter which can be used to measure laser in our lab precisely.
Team: Qin Qichen, Zhao Qi, Zhang Zhao.
Introduction
There are many methods to measure the wavelength of laser. One easy idea is to use an interferometer. The fringes of interference is associated with wavelength of laser. So by comparing it with the result of a reference laser the wavelength can be measured. Now there is something wrong with the wavemeter in our lab. Hence, we aim to build a wavemeter to measure laser in our lab. The range of wavelength our wavemeter can detect aim to be around 1100nm - 1700nm, determined by optics. A precision around 100MHz is expected.
Theory
Michelson interferometer is a good tool to measure the length if there is a good laser. Similarly, it can also be used to measure the unknown wavelength of a laser by calculating the ratio of wavelengths between the unknown and a known laser. Here we use a 1550nm laser as our reference. By counting zeros in the signal, we can get the ratio between wavelengths.

In Michelson interferometer[1], an input beam is splitted into two and reflected back by their respective mirror. The two beams with a phase difference caused by travelling different optical path lengths would form an interference pattern after overlapping. If we change the optical path length difference of the two beams, i.e. change the length of one arm by moving the mirror, the interference pattern would change simultaneously.
Consider the planar wave case, the two reflected beams could be written as and , where is the amplitude of the input beam, is the angular frequency, is the wavenumber, is the refractive index of air, is the length of one constant arm and is the length difference changing with time of the other arm.
Then the total electrical field at the output would be
The intensity would thus be
For , the number of zero-crossings of the interference pattern would be . According to this equation, we can relate the ratio of wavelengths of two lasers and with their number of zero-crossings as
.
Components

Optics
List of all the optic components used:
Silver mirror x6 (to adapt broadband laser that might be measured)
BB1-E04 mirror x2 (for 1550nm reference laser)
50/50 Beamsplitter 1100nm-1600nm x1
C220-c Aspherical lens x2 (for fiber input of two lasers)
TS975M-M01B Retroreflector x2
f50mm lens x1 (for unknown-laser detector)
f35mm lens x1 (for 1550nm detector)
PDA10CS-EC detector x1
PDA50B-EC detector x1
Air track
The whole setup including air track and optics is built on a 750mmx750mm breadboard table. The aluminum linear stage is 550mmx50mm with a 150mmx50mm sledge sliding on its V-shape surface. The friction is reduced by producing an air cushion between the two surfaces using 10 small holes on the bottom of sledge that is provided with compressed air via a silicon tube. Two springs are attached to both ends of the sledge and fixed around two long screws. Besides the force provided by springs when reflected from ends, the kinetic energy loss is also compensated by a small push pull solenoid fixed on one end of the stage. Two optical switches are mounted on board to detect the signal when sledge reaches ends by a piece of paper fixed on sledge, controlling the solenoid.
Control Circuit
The schematic of the circuit for control is shown below. Arduino UNO[2] board is used to control and count signals and should be connected to a computer to power it and get reading. Two optical switches are used to get rid of signal change when car gets pushed back. The optical switch 0 is also used to turn on/off solenoid. A push pull solenoid is used to push the car and compensate for energy loss in motion.



- Components we used
- 2 Optical switches OPB881T55Z
- 1 Push-Pull solenoid TAU0730TM-14
- 2 Optical detectors PDA10CS-EC and PDA50B-EC
- 2 Resistors for photodiode
- 2 Resistors for phototransistor
- 1 Resistor for transistor base
- 1 Transistor 2N2222A
- 1 diode to protect 1N4007G
Program
The main program consists of two parts.

One is to control the car. When the car passes across the optical switch 0 and move to the edge, the program will receive a signal change from OS0 and then turn on the solenoid. Then the small solenoid will be driven and push the car. So the position of optical switch 0 should be suitable because if the solenoid is on when the car moves towards the edge, the car will be decelerated. The right timing is to push the car when the spring is compressed to the minimum length. This can be done by changing the position of OS0.
The other part is two counters, for reference and measured laser. We make use of Arduino UNO to do this. There are three timers inside Atmega328P[3](this chip is the core controller of Arduino UNO). Timer0 and Timer2 are 8bit timer and Timer1 is a 16bit timer. Normally when you enable the timer, it will use the internal 16MHz clock and count the clock signal. For example, if you set no prescale(which means the clock frequency is 16/1 = 16Mhz), the timer register will increase every 1/16M second. Then it will be cleared when its value overflows. For 8 bit timer the range of register is from 0 to 255. Then we use these timers to count the rising in the interferometer signal. As tested before, it should be noticed the frequency should be no more than 3MHz and the transition must cross 2.5V and Vpp must be larger than 1V. Otherwise, the timer will lose signals.
As shown here, the initial state of the wavemeter should be like this, the car should be between two optical switches. That's because the setting in code. The circuit does not know where the car is and it only knows whether the car passes across optical switches. So I set the initial state variable as 1 which means the car is between two optical switches and the counters are working. The program will pause the counter by cutting off power for counters when the car passes across optical switches. Because we want to get rid of the signal when the car changes its direction.
Result
Future work
History
Mar 9
We find the optics for our wavemeter and order the retroreflectors. The design files of our air track and car are sent to Bob.
We test our pull-push solenoids and optical switch. We aim to use Arduino UNO as our controller. Today we test using an optical switch to generate the voltage signal.
Mar 16
Arduino UNO is tested to do the counter. We try to use the simple functions provided by Arduino compiler environment to do this. The idea is to detect the rising of the signal. So I make the comparison between two samplings with a given time interval to see if there is a rising. The problem is this method is too slow. The function provided by the compiler is actually a bunch of pieces of the atomical operations. The time interval set by function is also limited by an internal timer of the board.
There are two types of timers in this Arduino UNO board, which are actually provided by the microcontroller chip Atmega328P. The chip has an internal clock with 16MHz frequency. Theoretically, our signal is around 1MHz if assuming the speed of our car is around 1m/s. So it seems feasible if we use the internal clock to do this counter. Need to read documents and search to see how other people do this.
Mar 29
Sampling and comparing the signal is not good enough to do the counter. This method is useful only for very slow signals such as 1kHz. If the frequency of our signal is 1MHz, if we want to do the counting by comparing the sampling, our sampling should be at least 2MHz to capture all rising. But when we compare the executing of those codes can waste a lot of time, then we will miss a lot of rising signal. So it is not a good idea.
I check some useful documents. It seems use port manipulation will minimize the time used to do the read and write. I can also use the interrupt which is associated with a timer to do some tasks. A good instruction about this can be seen on the sites below.
https://www.arduino.cc/en/Reference/PortManipulation
https://www.instructables.com/Arduino-and-Port-Manipulation/
https://www.instructables.com/Arduino-Timer-Interrupts/
http://gammon.com.au/interrupts
Apr 5
Bob finished the mechanical work. We get our air track and car. We are beginning to set up the air track.
Apr 6
We use compressed air in our lab as our air source. we put the car on the air track. But their are two problems here.
First, the air port of the car is on one side so the pipe may touch some optics. So we need an L shape adapter to make the pipe vertical.
Then, the pipe connected to the car is hard, which means when we move the car it will be forced by the pipe. We need to find a softer pipe,
Murray suggests using a 90 curved copper pipe to connect the car.
Apr 7
Tried the method in https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/. Use the signal to trigger the interrupt. I use two signals from the function generator to test. The result is it can detect a signal no more than 100kHz. So this method is not good and we still need to find a way to do the counting.
Make one 90 curved copper pipe and try it. But it is so heavy that the car tilts and touches one side of the air track. It is better not to use this. We find a curved plastic pipe which is better to do this. We also borrow a soft pipe and the compression spring from Kai's Lab(the spring we bought before is too hard, the k is too high).

Apr 8
The clock frequency is designed to be 16MHz so theoretically signal with a lower frequency than 16MHz can all be counted. It also reminds me that the timer inside the chip can be chosen as the counter. Choosing the timer inside needs an understanding of the register inside the microcontroller. Basically, registers can store some bits and the value of these bits can determine how the chip works. Details about this can be found in https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf
Use this method as our counter. It is found the board can work pretty well when we use two MHz signals as input from a function generator. Now the control part can be added in.
Apr 9
The picture shows the basic idea about our circuit.

Two optical switches and one solenoid are connected to our Arduino UNO board. We want to make sure the board stops counting when the car moves to the edge. So the optical switch 1 is connected to the INT1 pin of Atmega328p which is used to request an interrupt[4] to pause counting when the signal changes. The optical switch 0 is connected to INT0 and can also pause counting. INT0 is also used to control solenoid. This pull push solenoid is on when the car reaches the edge and pushes the car back. We use a simple transistor to control it.
The result shows our board can count the risings in signal and when one counting reaches a maximum value we set before it will show and then clear the counting.
Use two signals from a function generator as input. One is 1.2MHz and the other one is 1MHz. The counting from our board is 5120000 and 4266671. The ratio is 1.19999878125. The maximum value of counting, 5120000, can be changed to get different precision.
Apr 12
Test the circuit which controls the car. Change the position of optical switch 0 a little to make the car keep moving. The result shows the car can move at least several hours if the air pressure is suitable.
Apr 14
Use a PCB board found in the workshop and make a board instead of using the breadboard in case someone messes up our circuit.

Apr 16
Finish setting up for optics preliminarily. Now we use 701 laser to test our wavemeter.
Apr 19
Check the signal from detectors. The signal from 1550nm reference laser is not stable while the signal from 701nm laser is stable. That is because we set up 1550 first and now the optics is optimized for 701 laser. When the car moves, the reference signal shows an oscillating. It is also a problem that the signals are too small for our counter to work. We need to process the signal first.
Apr 21
Because the interference is not ideal so there is a DC voltage in our signal. We test a high pass filter to do this.
Apr 23
Make a board to process the signal. The board is designed to filter dc signal and amplified the sine signal. The output is designed to be a 0-5V square wave which is more suitable for our counters.
Apr 26
Test the wavemeter today. The circuit and counter work well but the result is wrong. The problem is from 1550 reference laser. Because this signal is not stable. When the signal is very small, the counter will miss counts. Then the counts for 1550 will be smaller than the actual number which means our result will be smaller than the real value. So need to check our setup.
Reference
Code
<syntaxhighlight lang="python" line='line'> def quick_sort(arr): less = [] pivot_list = [] more = [] if len(arr) <= 1: return arr else: pass </syntaxhighlight>