This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
resources:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0537 [07 Jul 2020 11:00] – [General Description/Overview] Andrei Drimbarean | resources:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0537 [18 Apr 2022 21:20] (current) – [Available commands] updated screenshot Brandon Bushey | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== General Description/ | ===== General Description/ | ||
- | - initialization of the algorithm and PTR measurements | + | The **ADuCM_demo_cn0537** project uses **EVAL-CN0537-ARDZ** and **EVAL-ADICUP3029** to provide an **UL-217 compliant** solution to smoke detection. The application gives user access to the **ADPD188BI** registers and other software defined application parameters to get smoke data at the desired rate and use it to calculate the **Power Transfer Ratio (PTR)** that directly correlates to the amount of smoke in the chamber. The alarm algorithm then takes the **PTR measurement** and measures it against a calculated baseline to determine if the alarm should trigger or not. |
- | - idle state at the beginning (no sampling yet but can control operation parameters) | + | |
- | - starting streaming mode and what information is displayed | + | |
- | - how to stop streaming and alarm if necessary | + | |
- | + | ||
- | The **ADuCM_demo_cn0537** project uses **EVAL-CN0537-ARDZ** and **EVAL-ADICUP3029** to provide an **UL-217 compliant** solution to smoke detection. The application gives user access to the **ADPD188BI** registers and other software defined application parameters to get smoke data at the desired rate and use it to calculate the **Power Transfer Ratio (PTR)** that directly correlates to the amount of smoke in the chamber. The alarm algorithm then takes the PTR measurement and measures it against a calculated baseline to determine if the alarm should trigger or not. | + | |
The application has two main stages: | The application has two main stages: | ||
- Initialization; | - Initialization; | ||
- Main process. | - Main process. | ||
In the initialization process the software modules and part drivers are instantiated and set to initial values. | In the initialization process the software modules and part drivers are instantiated and set to initial values. | ||
- | FIXME ADD PICTURE | + | {{ : |
- | The application initializes the CLI process on top of the UART core and then sets up the ADPD188BI for smoke detection measurements. The program then reads calibration data from the part and uses them to set up the PTR measurements. After the PTR measurements are ready the application initializes the algorithm. This process may take a few seconds to complete. The application finishes initialization by setting up temperature compensation and real time clock counter. The main process is then started in idle mode. | + | The application initializes the **CLI** process on top of the **UART core** and then sets up the **ADPD188BI** for smoke detection measurements. The program then reads calibration data from the part and uses them to set up the **PTR measurements**. After the **PTR measurements** are ready the application initializes the algorithm. This process may take a few seconds to complete. The application finishes initialization by setting up **temperature compensation** and real time clock counter. The main process is then started in **idle mode**. |
- | The main process has two modes of operation: idle and streaming. In idle mode the serial CLI may be used to alter functionality parameters like ADPD188BI registers and output data rate. The CLI can also be used to set up SD card logging by creating a file on it. Note that for the log to be complete, the file opened on the card must also be closed for the data to be saved. | + | The main process has two modes of operation: |
- | Using the ' | + | Using the **' |
+ | In **streaming mode**, if the serial terminal is connected, the application will display **temperature compensated** code values or **PTR values** at users choice, timestamped. The **timestamp** is in seconds relative to the start of the application. The alarm state is also displayed on the terminal while streaming. | ||
===== Demo Requirements ===== | ===== Demo Requirements ===== | ||
Line 27: | Line 23: | ||
* Hardware | * Hardware | ||
* EVAL-ADICUP3029 | * EVAL-ADICUP3029 | ||
- | * EVAL-CN0414-ARDZ | + | * EVAL-CN0537-ARDZ |
* Mirco USB to USB cable | * Mirco USB to USB cable | ||
* PC or Laptop with a USB port | * PC or Laptop with a USB port | ||
- | * 24V and 1A limited power supply (**optional**) | ||
* Software | * Software | ||
- | * [[https:// | + | * {{ :resources: |
- | * CrossCore Embedded Studio (2.8.0 or higher) | + | |
- | * ADuCM302x DFP (3.2.0 or higher) | + | |
- | * ADICUP3029 BSP (1.1.0 or higher) | + | |
- | * Serial Terminal Program | + | |
- | * Such as Putty or Tera Term | + | |
===== Setting up the Hardware ===== | ===== Setting up the Hardware ===== | ||
+ | - Set up the the **EVAL-CN0537-ARDZ** as shown in the [[resources: | ||
+ | - Connect **EVAL-CN0537-ARDZ** board to the **EVAL-ADICUP3029**. {{ : | ||
+ | - Connect a micro-USB cable to P10 connector of the EVAL-ADICUP3029 and connect it to a computer. The final setup should look similar to the picture below. {{ : | ||
- | - Connect **EVAL-CN0414-ARDZ** board to the **EVAL-ADICUP3029**. | + | ===== Programming |
- | - Set the jumpers into the position shown below. This is the standard position and only works for one board systems.{{ : | + | |
- | - Connect a micro-USB cable to P10 connector of the EVAL-ADICUP3029 and connect it to a computer. The final setup should look similar to the picture below.{{ : | + | |
- | ===== Configuring | + | This application software is used with the ADICUP3029 to demonstrate the capabilities of the CN0537 evaluation board. To upload the CN0537 software to the ADICUP3029, connect both boards together through the Arduino form factor connectors (P1 to P4 on the CN0537) and plug them to a computer through USB. Upon connection, the hardware should appear as a DAPLINK drive on the computer. Drag and drop the ADuCM3029_demo_cn0537.hex file to the DAPLINK drive to program the ADICUP3029. |
- | The configuration parameters can be found in the **config.h** file. | + | {{ : |
- | **vref** - Reference voltage of the **ADC**. If the internal reference is used this value must be **2.5V**. If an external reference is used then this value must be the value of the external reference. | + | <WRAP round 80% download> |
- | ^ Referece | + | |
- | | internal | + | |
- | | external | + | |
- | < | + | {{ : |
- | /* Reference voltage of the ADC */ | + | |
- | float vref = 2.5; | + | </WRAP> |
- | </code> | + | |
===== Outputting Data ===== | ===== Outputting Data ===== | ||
Line 68: | Line 55: | ||
^ Function ^ Command ^ Description ^ Example ^ | ^ Function ^ Command ^ Description ^ Example ^ | ||
- | ^ General | + | ^ Application |
| | //h// | Display available commands. | | | | | //h// | Display available commands. | | | ||
- | | | //stts// | + | | | //s// | Put the device in GO mode and stream data from the device to the terminal.\\ <//no//> = number of samples |
- | ^ Internal register commands ^ | | | | + | | | //i// | Stop the stream.\\ <//opt//> = 1 to put the program in idle mode, 0 to keep the program in streaming mode, but stop streaming. | | |
- | | | //r// | Display voltage or current on the selected channel.\\ <//chan//> = channel | + | | | //ms// |
- | | | // | + | | | //os// |
- | ^ HART commands ^ | | + | | | //og// |
- | | | //he// | + | | | //ra// |
- | | | //hd// | Disable HART channel. | | | + | | | //n// | Insert a note into the stream and also the SD card log if started. | n Note 1 = print 'Note 1' on th terminal stream and SD card log if started. | |
- | | | //hcc// | Select wanted channel.\\ <//chan//> = Channel | + | | | //ar// |
- | | | //ht// | + | | | //hc// |
- | | | //hg// | + | ^ SD card commands ^ ^ ^ ^ |
- | | | //hcz// | Send command zero with the specified number of FFs in the preambule.\\ <// | + | | | //fo// |
- | | | //hpt// | Send command zero with the specified number of FFs in the preambule.\\ <// | + | | | //fc// |
- | ^ ADC commands | | | + | ^ Device commands ^ ^ ^ ^ |
- | | | //arr// | Display value of ADC register | + | | | //rr// |
- | | | //awr// | Change value of the ADC register of the given address.\\ <//reg//> = address of the register.\\ <// | + | | | //rw// |
- | | | //ags// | Get a specific number of samples from the given channel.\\ <// | + | | | //rd// |
- | | | // | + | |
- | | | //asf// | Set filter option.\\ <// | + | |
- | | | // | + | |
- | | | //adp// | Select postfilter.\\ <//opt//> = selected postfilter option. | | | + | |
- | | | //asp// | Reset controller, parameters and faults | | | + | |
- | | | + | |
- | | | //aowd// | Disable open wire detection. | | | + | |
- | ^ EEPROM commands ^ | | | + | |
- | | | //de// | + | |
- | {{ : | + | {{ : |
- | ===== Obtaining the Source Code ===== | ||
- | We recommend not opening the project directly, but rather import it into CrossCore Embedded Studios and make a local copy in your workspace. | ||
- | The source code and include files of the **ADuCM3029_demo_cn0414** can be found here: | + | ===== UL-217 Testing Results ===== |
- | <WRAP round 80% download> | + | Using both the EVAL-CN0537-ARDZ and the EVAL-CN0537-ALGO, |
- | [[https:// | + | <WRAP center round download 60%> |
- | + | {{ :resources: | |
- | [[| AduCM3029_demo_cn0414.HEX]] | + | |
- | + | ||
</ | </ | ||
- | |||
- | ===== How to use the Tools ===== | ||
- | |||
- | The official tool we promote for use with the EVAL-ADICUP3029 is CrossCore Embedded Studio. | ||
- | |||
- | ==== Importing ==== | ||
- | |||
- | For more detailed instructions on importing this application/ | ||
- | |||
- | ==== Debugging ==== | ||
- | |||
- | For more detailed instructions on importing this application/ | ||
- | |||
- | ==== Project Structure ==== | ||
- | |||
- | The program is composed of two main parts: | ||
- | - Board setup with initial values. | ||
- | - Main process. | ||
- | |||
- | {{ : | ||
- | |||
- | Board setup initializes **UART**, **SPI** and **I2C** communication and verifies if there is an active **EVAL-CN0414-ARDZ** board connected by reading the AD4111 ID register. Here is also initialized the update timer for the internal channel registers. | ||
- | |||
- | {{ : | ||
- | |||
- | The main process routine implements the **CLI** and calls the commands input by the user. This routine also checks the flags asserted in the asynchronous events (the update channel register flag, the HART received flag and the floating channel flags) and calls the appropriate handler methods. There is also a flag asserted by the channel register update rate and the **ADC** output data rate. If the update rate would be too close to the output data rate, the actual update rate might slow down to be possible for the program to maintain all functionality. The update rate may never be bigger or equal to the **ADC** output data rate divided by 8 (for 8 channels). | ||
- | |||
- | {{ : | ||
- | |||
- | The flow chart below represents the way the channel registers are updated. Only one channel is active at any one time (the channel that must be read). | ||
- | |||
- | {{ : | ||
// End of Document // | // End of Document // |