Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-software:colorimeter [18 May 2015 22:31] – removing linux code section Brandon Busheyresources:tools-software:linux-software:colorimeter [24 May 2018 13:35] (current) – Add an important note to close iio-osc before starting the app. Istvan Csomortani
Line 1: Line 1:
 ====== CN0363 Colorimeter Application User Guide ====== ====== CN0363 Colorimeter Application User Guide ======
  
 +===== Starting the Application =====
  
 +<note important>Before starting the application please close all the running ADI IIO Oscilloscope instances. </note>
  
-===== Introduction =====+{{:resources:tools-software:linux-software:cn0363_startup.png?250 |Launch ADI CN0363 Colorimeter Application}}
  
-{{:resources:tools-software:linux-software:colorimeter_block_diagram.png?600|}} +The CN0363 Colorimeter Application can be launched from the top-left **"Applications Menu"** in the **"Other"** section.
- +
-{{:resources:tools-software:linux-software:colorimeter_photo.png?600|}} +
- +
- +
-The circuit shown above from [[adi>CN0363]] is a dual channel colorimeter featuring a modulated light source transmitter, programmable gain transimpedance amplifiers on each channel, and a very low noise, 24-bit sigma delta ADC. The output of the ADC connects to a standard FPGA mezzanine card. The FPGA takes the sampled data from the ADC and implements a synchronous detection algorithm.   +
-By using modulated light and digital synchronous detection, rather than a constant (dc) source, the system strongly rejects any noise sources at frequencies other than the modulation frequency, providing excellent accuracy.  +
-The dual channel circuit measures the ratio of light absorbed by the liquids in the sample and reference containers at three different wavelengths. This forms the basis of many chemical analysis and environmental monitoring instruments used to measure concentrations and characterize materials through absorption spectroscopy. +
- +
-<note tip>Further details of the circuit can be found in the circuit note [[adi>CN0363]]</note> +
-  +
-<note tip>A complete design support package containing schematic, assembly drawing, layout files, Gerber files, and bill-of-materials is available at [[adi>CN0363-DesignSupport]]</note> +
- +
-===== Equipment Needed ===== +
-The [[adi>CN0363]] software is designed to operate with the following hardware and FPGA development system: +
- +
-  [[http://www.zedboard.org/|ZED Board]], Rev C or later +
-  USB Keyboard/Mouse +
-  HDMI Monitor (Full HD) +
-  [[adi>CN0363]] hardware: EVAL-CN0363-PMDZ +
-  * Two vials: one filled with water and one filled with the sample liquid under test +
-  Formatted and partitioned 8GB SD card supplied with EVAL-CN0363-PMDZ board +
-  Ethernet connection for updating SD card +
- +
-The equipment should be connected as shown below, but make sure all power is turned off before beginning the software installation.  +
- +
-{{:resources:tools-software:linux-software:colorimeter_test_setup.png?300|}} +
- +
-===== Software Installation ===== +
- +
- +
-An 8GB formatted and partitioned SD card is supplied with the CN0363 board. This SD card contains most of the images required to run the various FMC boards, but it must be updated before the application software for CN0363 is run. Use the following procedure: +
- +
-  - Connect the HDMI monitor, power supply, keyboard/mouse, and Ethernet cable to the ZedBoard. Make sure the ZedBoard power switch is off. +
-  - Connect the EVAL-CN0373-PMDZ board to the ZedBoard, but do not connect the power at this time.  +
-  - Install the Analog Devices SD card in the ZedBoard +
-  - Verify the jumpers (JP7-JP11, and JP6) are set to the SD Card Boot Mode as described in [[http://www.zedboard.org/support/documentation/1521]]. +
-  - Turn the ZedBoard power switch on. The board should boot after about 30 seconds. +
-  - Enter "Updateon the keyboard <fc #ff0000>(Note: I'm not exactly sure if this is correct, or if you need to select something on menu first)</fc>. The latest image files will be downloaded from the ADI website to the SD card. This may take some time, so don't get in a hurry.  +
-  - When the update is complete, turn the ZedBoard power off.  +
-  - As an alternative, the SD card can be updated using a PC with an internet connection and an SD card writer/reader. This procedure is described in [[resources/tools-software/linux-software/zynq_images|Create SD Image for Zynq Boards. (it is a single image for all boards)]]. After the SD card has been updated in the PC, install it in the ZedBoard with the power off. +
-  - Turn the EVAL-CN0363-SDPZ power on. +
-  - Turn the ZedBoard power on. +
-  - Select the "CN0363-Colorimeter" application from the menu and hit ENTER. <fc #ff0000>Please correct this if incorrect</fc> +
-  - The system is now ready to analyze samples.+
  
 <WRAP clear></WRAP> <WRAP clear></WRAP>
- 
-===== Source code ===== 
-The source code for the Colorimeter application can be found on the [[https://github.com/orgs/analogdevicesinc|Analog Devices GitHub account]] in the [[https://github.com/analogdevicesinc/colorimeter|colorimeter repository]]. 
- 
- 
 ===== Analyzing a Sample ===== ===== Analyzing a Sample =====
  
 The Colorimeter application has three main tabs [[#Automated Data Collection]], [[#Current/Absorbance Measurement]] and the [[#Sample Library]]. The Colorimeter application has three main tabs [[#Automated Data Collection]], [[#Current/Absorbance Measurement]] and the [[#Sample Library]].
 +
 ===== Automated Data Collection ===== ===== Automated Data Collection =====
 +
 {{ :resources:tools-software:linux-software:colorimeter_automated_data_collection.png?500 |Automated Data Collection Tab}} {{ :resources:tools-software:linux-software:colorimeter_automated_data_collection.png?500 |Automated Data Collection Tab}}
  
Line 66: Line 21:
 ==== Analyze Sample ==== ==== Analyze Sample ====
  
-Clicking the **Analyze Sample** button will perform automated sample analyzes which will cycle through all three colors and calculate the absorbence factor for each of them. The analyzing process will take a few seconds and a progress-bar will be updated to indicate the current step. Once the process has completed the absorbance values will be displayed.+Clicking the **Analyze Sample** button will perform an automated sample analyzes which will cycle through all three colors and calculate the absorbence factor for each of them. The analyzing process will take a few seconds and a progress-bar will be updated to indicate the current step. Once the process has completed the absorbance values will be displayed.
  
 Once the analyzing process has finished it is also possible to either try to match the sample to a existing sample from the sample library or save the sample into the sample library for future use. Once the analyzing process has finished it is also possible to either try to match the sample to a existing sample from the sample library or save the sample into the sample library for future use.
 +
 ==== Match Sample ==== ==== Match Sample ====
  
 Clicking the **Match Sample** button will compare the current sample to all samples in the sample library. If a sample is found that has a close enough matching score the sample including its name and match score will be displayed. Clicking the **Match Sample** button will compare the current sample to all samples in the sample library. If a sample is found that has a close enough matching score the sample including its name and match score will be displayed.
 +
 ==== Save Sample ==== ==== Save Sample ====
  
Line 100: Line 57:
 {{ :resources:tools-software:linux-software:colorimeter_sample_library.png?500|Sample Library Tab}} {{ :resources:tools-software:linux-software:colorimeter_sample_library.png?500|Sample Library Tab}}
  
-The sample library allows to manage and compare previously saved sample data. On the left side is a list of all samples. On the right side the absorbence values for the currently selected samples is displayed. It is possible to select multiple samples by holding the Ctrl key, this can be used to directly compare the absorbance of multiple samples to each other.+The sample library allows to manage and compare previously saved sample data. On the left side is a list of all samples. On the right side the absorbance values for the currently selected samples is displayed. It is possible to select multiple samples by holding the Ctrl key, this can be used to directly compare the absorbance of multiple samples to each other.
  
 Samples can also be removed from the library by selecting the sample and then clicking the **Remove** button. A sample that has been removed from the library can not be restored. Samples can also be removed from the library by selecting the sample and then clicking the **Remove** button. A sample that has been removed from the library can not be restored.
Line 109: Line 66:
 {{ :resources:tools-software:linux-software:colorimeter_calibration.png?400|Calibration Dialog}} {{ :resources:tools-software:linux-software:colorimeter_calibration.png?400|Calibration Dialog}}
  
-For optimum performance it is necessary to calibrate the application to the connected board and the environment. This calibration can be performed in the calibration dialog which can be opened form then application's menu. It allows to set the calibration parameters the LEDs and photo-diodes as well as performing a automated calibration.+For optimum performance it is necessary to calibrate the application to the connected board and the environment. This calibration can be performed in the calibration dialog which can be opened from the application's menu. It allows to set the calibration parameters the LEDs and photo-diodes as well as performing a automated calibration.
  
 Calibration must be performed with distilled water in both the reference and the sample probes. It is also recommended that during calibration the photo-diodes are shielded from ambient light. Calibration must be performed with distilled water in both the reference and the sample probes. It is also recommended that during calibration the photo-diodes are shielded from ambient light.
  
 Start the automatic calibration procedure in the software; from the Menu Start the automatic calibration procedure in the software; from the Menu
-bar, open the **Calibration** dialog box, and click **Calibrate**.Once the calibration is done the calibration values will be updated.+bar, open the **Calibration** dialog box, and click **Calibrate**. Once the calibration is done the calibration values will be updated.
  
 It is also possible to save the current calibration data for later use by clicking the **Export** button or to load previously saved calibration data by clicking the **Import** button. It is also possible to save the current calibration data for later use by clicking the **Export** button or to load previously saved calibration data by clicking the **Import** button.
Line 120: Line 77:
 Calibration data includes a zero-offset for each channel and gain setting, which removes any potential offset that is measured if no excitation signal is present. The calibration data also includes a gain factor which expresses the relative relationship of the reference and sample channel values at full-scale excitation. Calibration data includes a zero-offset for each channel and gain setting, which removes any potential offset that is measured if no excitation signal is present. The calibration data also includes a gain factor which expresses the relative relationship of the reference and sample channel values at full-scale excitation.
  
 +===== Source code =====
 +
 +The source code for the Colorimeter application can be found on the [[https://github.com/orgs/analogdevicesinc|Analog Devices GitHub account]] in the [[https://github.com/analogdevicesinc/colorimeter|colorimeter repository]].
 +
 +<div>
 +**Install colorimeter application**
 +<xterm>
 +<nowiki>$ git clone https://github.com/analogdevicesinc/colorimeter.git
 +Cloning into 'colorimeter'...
 +remote: Counting objects: 65, done.
 +remote: Compressing objects: 100% (33/33), done.
 +remote: Total 65 (delta 13), reused 2 (delta 2), pack-reused 28
 +Unpacking objects: 100% (65/65), done.
 +Checking connectivity... done.
 +$ make
 +cc -shared -o capture.so capture.c -liio -lm -Wall -Wextra -fPIC -std=gnu99 -pedantic -O3
 +$ make install
 +sed 's/@PREFIX@/\/usr\/local/' adi-colorimeter.desktop.in > adi-colorimeter.desktop
 +sed 's/@PREFIX@/\/usr\/local/' lib/config.py.in > lib/config.py
 +root@analog:~/colorimeter# make install
 +install -d //usr/local/bin
 +install -d //usr/local/share/adi_colorimeter/
 +install -d //usr/local/lib/adi_colorimeter/
 +install ./adi_colorimeter //usr/local/bin/
 +install ./capture.so //usr/local/lib/adi_colorimeter/
 +install ./adi_colorimeter.glade //usr/local/share/adi_colorimeter/
 +./setup.py install --prefix=/usr/local --root=/
 +running install
 +running build
 +running build_py
 +copying lib/config.py -> build/lib.linux-armv7l-2.7/adi_colorimeter
 +running install_lib
 +copying build/lib.linux-armv7l-2.7/adi_colorimeter/config.py -> /usr/local/lib/python2.7/dist-packages/adi_colorimeter
 +byte-compiling /usr/local/lib/python2.7/dist-packages/adi_colorimeter/config.py to config.pyc
 +running install_egg_info
 +Removing /usr/local/lib/python2.7/dist-packages/adi_colorimeter-1.0-py2.7.egg-info
 +Writing /usr/local/lib/python2.7/dist-packages/adi_colorimeter-1.0-py2.7.egg-info
 +xdg-icon-resource install --noupdate --size 16 ./icons/adi-colorimeter16.png adi-colorimeter
 +xdg-icon-resource install --noupdate --size 32 ./icons/adi-colorimeter32.png adi-colorimeter
 +xdg-icon-resource install --size 64 ./icons/adi-colorimeter64.png adi-colorimeter
 +xdg-desktop-menu install adi-colorimeter.desktop</nowiki>
 +</xterm>
 +</div>
  
 ===== Supported Devices ===== ===== Supported Devices =====
  
-[[adi>CN0363]]+  * [[adi>CN0363]] + [[http://zedboard.org/product/zedboard|ZED Board]], Rev C or later 
 + 
 +===== More Information =====
  
-[[http://www.zedboard.org/|ZED Board]], Rev C or later+  * [[:resources:eval:user-guides:eval-cn0363-pmdz|EVAL-CN0363-PMDZ User Guide]]
resources/tools-software/linux-software/colorimeter.1431981075.txt.gz · Last modified: 18 May 2015 22:31 by Brandon Bushey