This is an old revision of the document!
The ADICUP3029_CN0357 is a toxic gas(CO) detector demo project for the EVAL-ADICUP3029 base board with additional EVAL-CN0357-ARDZ shield, created using the CrossCore Embedded Studio environment.
This userguide gives a detailed explanation about ADICUP3029_CN0357 toxic gas (CO) detection project for EVAL-ADICUP3029 base board and EVAL-CN0357-ARDZ gas sensor shield. The gas sensor shield consists of portable gas detector circuit.
The EVAL-CN0357-ARDZ shield circuit provides a potentiostatic circuit for biasing the electrochemical sensor and 16-bit Sigma-Delta ADC. The small currents passing in the sensor is being converted to a voltage that can be read by the ADC. The 16-bit ADC value is received via SPI interface of the EVAL-ADICUP3029 board, where the gas concentration is computed.
The ADICUP3029_CN0357 application configures the necessary components, processes ADC output value and make all necessary conversions in order to provide the gas concentration. A UART interface (38400 baud rate and 8-bits data length) is used to send the results to terminal window: CO Concentration in Parts Per Million(PPM) are the outputs provided in the terminal window.
At the start of the project, the software computes the necessary parameters and configure the digital rheostat(AD5270) . The required parameters are the sensor sensitivity and sensor range. These can be modified by changing the values of the constants SENSOR_SENSITIVITY and SENSOR_RANGE found in the CN0357.h header file of the project. See the “Project Structure” section for more details.
The ADuCM3029_demo_cn0357 uses UART connection via P0.10/P0.11 and SPI0 channel of the ADuCM3029 to communicate with EVAL-CN0357-ARDZ board.
- Similarly the jumper settings for EVAL-CN0357-ARDZ Rev C are as follows
We recommend not opening the project directly, but rather import it into CrossCore Embedded Studio and make a local copy in your workspace.
The source code and include files of the ADICUP3029_CN0357 can be found on Github:
The source code has to be inserted from the github
When the ADICUP3029 is in advertising mode, UART terminal would display
The ADI_CO_SENSOR node device found on iPAD
The ADICUP3029 connected to BLE peripheral and sending the CO ppm concentration values
The data transmission successful is indicated by green LED glow
The data transmission un-successful is indicated by red LED glow
The ppm concentration values displayed on ios
Graph displaying ppm values
The ADICUP3029 disconnected to BLE peripheral
The official tool we promote for use with the EVAL-ADICUP3029 is CrossCore Embedded Studio. For more information on downloading the tools and a quick start guide on how to use the tool basics, please check out the Tools Overview page.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.
* A debug configuration must be set up for this project in order to have the possibility to program and to debug the ADICUP3029_CN0357 project. To do this, follow the instructions from How to configure the debug session section.
After completion of the steps above the program will remain written into the system flash and it will run by default every time the board is powered up.
The ADICUP3029_CN0357 project use ADuCM302x C/C++ Project structure.
This project contains: system initialization part - disabling watchdog, enabling clock for peripherals; port configuration for SPI0;SPI2;UART , SPI and UART initialisation, SPI, UART read/write functions, AD7790 control, AD5270 control and gas concentration computation, BLE initialization, packet formation and sending data .
In the src and include folders you will find the source and header files related to CN0357 software application. The Communication.c/h files contain SPI and UART specific data, the AD7790.c/h files contain the ADC control, the AD5270.c/h files contain the rheostat control, the CN0357.c/h files contain ppm computations specific to the gas detector application and the CN0357.c/h .
In the appropriate header files you can configure next parameters:
#define SENSOR_RANGE 2000
#define SENSOR_SENSITIVITY 65