Wiki

Differences

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

Link to this comparison view

Next revision
Previous revision
resources:eval:user-guides:arduino-uno:reference_designs:demo_cn0396 [16 Jan 2018 18:15] – created Brandon Busheyresources:eval:user-guides:arduino-uno:reference_designs:demo_cn0396 [06 Jan 2021 10:13] (current) – Fixed bad link for en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-CN0396-ARDZ.html Ioana Chelaru
Line 5: Line 5:
 ===== General Description/Overview ===== ===== General Description/Overview =====
  
-The **CN0396_example** project uses the [[http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-CN0396-ARDZ.html|EVAL-CN0396-ARDZ shield]] which is a single-supply, low noise, portable gas detector, using a **4-electrode electrochemical** sensor, for simultaneous detection of two distinct gases - for this example is used the Alphasense COH-A2 sensor, which detects carbon monoxide(**CO**) and hydrogen sulfide(**H2S**).+The **CN0396_example** project uses the [[adi>CN0396|EVAL-CN0396-ARDZ shield]] which is a single-supply, low noise, portable gas detector, using a **4-electrode electrochemical** sensor, for simultaneous detection of two distinct gases - for this example is used the Alphasense COH-A2 sensor, which detects carbon monoxide(**CO**) and hydrogen sulfide(**H2S**).
  
-The **EVAL-CN0396-ARDZ** board provides a potentiostatic circuit for biasing the electrochemical sensor, along with dual programmable TIA's and 16-bit Sigma-Delta ADC. The TIA's convert the small currents passing in the sensor to a voltage that can be read by the [[http://www.analog.com/ad7798|AD7798]] a 3-channel, low noise, low power 16-bit ADC that converts the analog voltage into digital data. The **16-bit** ADC outputs are received via SPI interface of the EVAL-ADICUP360 board. An [[http://www.analog.com/ADT7310|ADT7310]] digital **temperature sensor** is also included to measure ambient temperature in order for correction of temperature effects.+The **EVAL-CN0396-ARDZ** board provides a potentiostatic circuit for biasing the electrochemical sensor, along with dual programmable TIA's and 16-bit Sigma-Delta ADC. The TIA's convert the small currents passing in the sensor to a voltage that can be read by the [[adi>ad7798|AD7798]] a 3-channel, low noise, low power 16-bit ADC that converts the analog voltage into digital data. The **16-bit** ADC outputs are received via SPI interface of the EVAL-ADICUP360 board. An [[adi>ADT7310|ADT7310]] digital **temperature sensor** is also included to measure ambient temperature in order for correction of temperature effects.
  
-{{:resources:eval:user-guides:eval-adicup360:reference_designs:cn0396:cn0396_demo_1.png?650 |}}+{{:resources:eval:user-guides:arduino-uno:reference_designs:img_20180123_170715.jpg?500 |}}
  
 The **CN0396_example** application reads temperature value from ADT7310 and ADC values for each gas channel (CO and H2S), processes the values and make all necessary conversions in order to provide the gas concentrations. A **UART** interface (**9600** baud rate and **8-bits** data length) is used to send the results to terminal window. The output data will be displayed continuously considering a data refresh parameter (see //DISPLAY_REFRESH//). The **CN0396_example** application reads temperature value from ADT7310 and ADC values for each gas channel (CO and H2S), processes the values and make all necessary conversions in order to provide the gas concentrations. A **UART** interface (**9600** baud rate and **8-bits** data length) is used to send the results to terminal window. The output data will be displayed continuously considering a data refresh parameter (see //DISPLAY_REFRESH//).
Line 51: Line 51:
 </WRAP> </WRAP>
  
-===== Project Structure =====+===== Project Structure=====
  
-FIXME   Add text, picture, images, that describe the project structure.  Any software flow diagrams or decision trees can be added her to help customers understand how the applications are structures.+{{ :resources:eval:user-guides:arduino-uno:reference_designs:arduino2.png?700 |}}
  
 +The Arduino Sketch is used to open the example into Arduino IDE. The project is composed of three main parts:
 +
 +  * the main program (arduino sketch)
 +  * application layer
 +  * communication layer
 +  * driver layer (IC drivers and sensor data)
 ===== Configuring the Software Parameters ===== ===== Configuring the Software Parameters =====
  
-Before running your program, make sure that you have configured the software appropriately to your settings:+Configure the ADC gain value in //CN0396.h// file. 
 + 
 +<code> 
 +#define ADC_GAIN      AD7798_GAIN_1 
 +</code> 
 + 
 +Configure the ADC samples/second value in the //CN0396.h// file. 
 + 
 +<code> 
 +#define ADC_SPS        0x05  //50SPS 
 +</code> 
 +             
 +Set the refres time in the //CN0396.h// file.  This is how often to display output values on terminal.(in ms) 
 + 
 +<code> 
 +#define DISPLAY_REFRESH        500   //[msec] 
 +</code> 
 + 
 +Set CO range for the sensor in the //CN0396.h// file. 
 + 
 +<code> 
 +#define MAX_CO_SENS  (100 * pow(10, -9)) 
 +#define CO_SENS      (75 * pow(10, -9))    /* Sensitivity nA/ppm CO 50 to 100 */ 
 +#define CO_RANGE     1000 /* Range ppm CO limit of performance warranty 1,000 */ 
 +</code>
  
-FIXME  -  Add text, picture, images, code blocks that describe how to configure the software.  Things like changing the accelerometer range from 2g to 4g should be a trivial change for the customer.  We don't have to show them everything, but think of the application, and what parameters are most likely need to be customized by the user (like providing a an ID or password for a local gateway using WI-FI)  +Set H2S range for the sensor in the //CN0396.h// file.
  
 +<code>
 +#define MAX_H2S_SENS (1000 * pow(10, -9))
 +#define H2S_SENS     (800 * pow(10, -9)) /* Sensitivity nA/ppm  H2S 450 to 900 */
 +#define H2S_RANGE    200  /* Range ppm H2S limit of performance warranty 200 */
 +</code>
 ===== Compiling, Verifying, and Programming ===== ===== Compiling, Verifying, and Programming =====
  
resources/eval/user-guides/arduino-uno/reference_designs/demo_cn0396.1516122939.txt.gz · Last modified: 16 Jan 2018 18:15 by Brandon Bushey