Trace:
Differences
This shows you the differences between the selected revision and the current version of the page.
people:mcmullpm:spectrograph 2011/11/07 10:52 | people:mcmullpm:spectrograph 2011/11/07 11:21 current | ||
---|---|---|---|
Line 24: | Line 24: | ||
The optics inside the spectrometer was realigned for the new configuration and parts. The MATLAB program was fixed to work for the UNO and the results were tested. The spectrometer resolves a single LED at a time, using MATLAB, and produces a result, indicating which colour the LED is. The spectrograph only distinguishes between red, green and blue LEDs. | The optics inside the spectrometer was realigned for the new configuration and parts. The MATLAB program was fixed to work for the UNO and the results were tested. The spectrometer resolves a single LED at a time, using MATLAB, and produces a result, indicating which colour the LED is. The spectrograph only distinguishes between red, green and blue LEDs. | ||
+ | ===== Operating Instructions ===== | ||
+ | |||
+ | ==== Device Operation ==== | ||
+ | |||
+ | These are the instructions for operating the spectrometer, assuming the ports are properly connected, the ARDUINO sketch has been uploaded to an ARDUINO UNO and the MATLAB file is being run on MATLAB R2009a Student or a later version. These are necessary for the spectrometer to work, unless a C# program is uploaded for use without MATLAB. This is unavailable at the current date however. | ||
+ | |||
+ | - Open MATLAB and run attempt05_gui.m. A GUI should appear with the label “Spectrograph.” | ||
+ | - Connect the USB cable to the spectrometer and to the PC. | ||
+ | - Turn the spectrometer on by switching the switch located above the USB cable. A blue LED should light up to indicate the system is receiving power. | ||
+ | -Turn the switches on the left on, to make sure the LEDs are working. The LEDs that go into the spectrometer should match with the indicating LEDs that light up when the switch is turned on. | ||
+ | - Make sure the two position switches are to the left (position 1) | ||
+ | - Press “Acquire Spectrum” on the GUI to find the spectrum and colour of the LED | ||
+ | - The background data is taken first, so be sure that no LED is on, or in the LED slot. | ||
+ | - The program will pop up a message indicating background data is being taken. Switch the position switches to the right as indicated. Press “Ok.” | ||
+ | - Now the background data has been taken, and the LED data can be taken. Return the switches to position 1, plug in the LED which you want to measure and turn the LED on. An indicating LED should also turn on. Press “Ok.” | ||
+ | - Switch the switches to position 2 to obtain the last of the data. Press “Ok.” | ||
+ | - The spectrum should appear in the graph on the GUI. | ||
+ | - A pop up box should appear notifying you the colour of the LED. | ||
+ | |||
+ | ==== Troubleshooting ==== | ||
+ | * If the LEDs do not turn on, but power is being supplied to the device the LEDs might be shorting out in the PCB. | ||
+ | * If the spectrum analyzer gives no results (every point is zero), the detector PCB might be shorted. | ||
+ | * If only a single point on the spectrum analyzer is zero, make sure that detector is connected to the ARDUINO. Also, check to make sure the wires are not being shorted at the back of the detectors. | ||
+ | * If the result does not appear as a graph, or the graph appears in one of the pop-up boxes, run the code again. When prompted to press “Ok,” do not press “Ok,” instead press anywhere else on the GUI. This will cause the program to continue running without further problems. | ||
+ | |||
+ | ==== Sketch Upload and Port Connections ==== | ||
+ | * To upload the sketch Adiosrv.pde sketch to the ARDUINO, first connect the ARDUINO to the PC via USB cable. | ||
+ | * Verify the COM port being used by the device: | ||
+ | * Windows>>Control Panel>>Device Manager>>Ports(COM & LPT)>>ARDUINO UNO(COM#) | ||
+ | * Where # represents the port number that the ARDUINO is connected to. | ||
+ | * Open adiosrv.pde and upload to the ARDUINO | ||
+ | * Verify the correct port and board | ||
+ | * Tools>>Board>>ARDUINO UNO | ||
+ | * Tools>>Serial Port>>COM# | ||
+ | * Where # matches the port number that the ARDUINO is connected to that was connected to. | ||
+ | * Upload the sketch to the ARDUINO | ||
+ | * Open MATLAB | ||
+ | * Open attempt05_gui.m | ||
+ | * Verify the correct port in lines 117 and 119 | ||
+ | *The sketch will now work with the MATLAB code. | ||
+ | |||
+ | ===== CAD Drawings ===== | ||
+ | The following CAD drawings were constructed in SolidEdge V20. The construction can be viewed using this program and the file Final Design.par located in the J: drive. | ||
+ | |||
+ | * Drawings will be uploaded at a later date. | ||
+ | |||
+ | ===== Figures and Images ===== | ||
+ | The following figures and images are the GUI representations of the results and the GUI itself. These images should be seen when running the program. | ||
+ | |||
+ | |||
+ | ===== Code ===== | ||
+ | This code is uploaded to the ARDUINO to allow simple communication between the ARDUINO and the MATLAB program. It is used in conjuction with the MATLAB ARDUINO IO package. | ||
+ | {{:research:spectro_arduino_ml.zip}} | ||
You are here: start » people » mcmullpm » spectrograph