Background
The PAS requires a 12 VDC supply and a USB connection to a host computer to run.
The PAS data acquisition software is written in Julia. A full waveform is acquired over the designated sampling time and an FFT is performed by the host computer in Julia. The data are plotted to the screen for real-time viewing. Optionally, the magnitudes for each wavelength can be saved to a text file.
A separate script performs a frequency sweep and can be run prior to the start of data acquisition to determine the resonant frequency.
Turn on the PAS
- Plug the USB cable into the host computer if needed.
- Plug the sound card into the host computer, if needed, and make sure the the BNC cable is connected to the signal output on the PAS.
- Turn on or plug in the 12V power supply.
- Turn on the +3.3 V and -3.3 V supplies (you may also need to press the soft on/off button if using the Rigol bench supply). Do not exceed 3.6 VDC or you will destroy the microphone and the preamp board will have to be replaced!
Open the Real-time Plots and/or Save Data
-
Open the Julia REPL by first opening a Terminal and then typing
julia
. -
Load and start the PAS software by typing the following:
include("pas.jl"); runPAS(f=2000) # replace 2000 with the resonant frequency in Hz.
Other options are available (defaults shown, all arguments are optional except
f
):runPAS(f=2000; buffer = 120, range = 50, save = true, datadir = pwd()*"/pas-data/", baud = 115200, rate = 2)
Argument Description f resonant/measurement frequency in Hz; must be specified buffer length of the circular buffer display on the time series plots in number of data points range the range of frequencies to plot in the FFT on either side of f
in Hzsave whether or not the save the data to a CSV file ( true
orfalse
)datadir the location to which data will be saved baud the baud rate to use for serial connections rate the sample interval in seconds If you get an OS/serial port error try starting the program a couple more times. If it still won't start, reset the serial devices by unplugging their USB cables and plugging them back in. Also make sure the devices are not in use by another program.
If you need to turn off individual lasers or need to manually change the modulation frequency, you can do so via the serial port. See the Laser Controller documentation for more details.
Perform a Frequency Sweep
-
Fill the cell with a constant concentration of absorbing gas and let the signal stabilize.
-
Set the start (
f1
) and stop (f2
) frequencies and ensure thepas-sweep.jl
script is set to save the data file. This can be done with any text editor, or by issuingmicro ~/pas-sweep.jl
in the Terminal. Note that each frequency takes approximately 2 seconds.f1 = 1190 f2 = 1200 save = true
-
Run the
pas-sweep.jl
script. Open Terminal on the host computer and type the following command:julia ~/pas-sweep.jl
Currently the data must be fit manually after acquisition. Typically looking by eye in a spreadsheet program is close enough for the 3-λ system.
Shut Down the PAS
-
Ensure the PAS has been purged with nitrogen or zero air.
-
Turn off or unplug the 12 V supply.
-
In the terminal on the host computer, press
CTRL + C
to stop the real-time plots. Sometimes you may have to press this more than once in rapid succession to stop the program. You should see the Julia REPL prompt (julia >
) when done. Some error messages are normal upon exit. The plots window can be left open or closed by clicking the 'x' in the upper right corner.