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:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0537 [07 Jul 2020 11:00] – [General Description/Overview] Andrei Drimbareanresources: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/Overview ===== ===== General Description/Overview =====
  
-- 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 +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0537_initialization.png |}} 
-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: **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>Note that for the log to be complete, the file opened on the card must also be closed for the data to be saved.</note>
  
-Using the 'stream' command the process switches to streaming mode where smoke data is taken out at the set sampling rate. After temperature compensation and PTR calculation, data is fed to the algorithm to determine the alarm state. If the alarm is triggered the buzzer is activated and the alarm can only be reset by pressnig the button on the shield or calling the 'reset_alarm' command on the CLI. If working parameters need to be adjusted it is recommended to return to idle mode by calling the 'idle' command and adjusting as necessary and then return to the stream mode.+Using the **'stream'** command the process switches to **streaming mode** where smoke data is taken out at the set sampling rate. After **temperature compensation** and **PTR calculation**, data is fed to the algorithm to determine the alarm state. If the alarm is triggered the buzzer is activated and the alarm can only be reset by pressing the button on the shield or calling the **'reset_alarm'** command on the **CLI**. If working parameters need to be adjusted it is recommended to return to **idle mode** by calling the **'idle'** command and adjusting as necessary and then return to the **stream mode**. 
 +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://github.com/analogdevicesinc/EVAL-ADICUP3029/tree/master/projects/ADuCM3029_demo_cn0414 AduCM3029_demo_cn0414 demo application]] +    * {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:aducm3029_demo_cn0537_hex.zip |Smoke detector demo .hex file and copyrights}}
-    * 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:eval:user-guides:circuits-from-the-lab:cn0537#connectors_and_jumper_configurations | Hardware User Guide]].
 +  - Connect **EVAL-CN0537-ARDZ** board to the **EVAL-ADICUP3029**. {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0537_arduino.jpg |}}
 +  - 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. {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0537_system_pc.jpg |}}
  
-  - Connect **EVAL-CN0414-ARDZ** board to the **EVAL-ADICUP3029**. +===== Programming the Firmware =====
-  - Set the jumpers into the position shown below. This is the standard position and only works for one board systems.{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0414_jumper_pos2.jpg?nolink |Standard jumper position}} +
-  - 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.{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:eval_cn0414_ardz_hard_setup3.jpg?nolink |Hardware setup example}}+
  
-===== Configuring the Software =====+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.+{{ :resources:eval:user-guides:circuits-from-the-lab:cn0537:cn0537_uploading_hex_file.png?nolink&600 |}}
  
-**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                  ^ vref value         ^ +
-| internal                  | 2.5                | +
-| external                  | Actual reference voltage |+
  
-<code> +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:aducm3029_demo_cn0537_hex.zip | Smoke detector demo software .hex file}} 
-   /* 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 commands ^  ^  ^  ^+Application commands ^  ^  ^  ^
 |  | //h//                  | Display available commands. |   | |  | //h//                  | Display available commands. |   |
-|  | //stts//               | Display parameters of the application. |  | +|  | //s//                  | Put the device in GO mode and stream data from the device to the terminal.\\ <//no//> = number of samples to be displayedIf not specified stream indefinitelyAfter the selected number of samples have been streamed the device will still sample, but not output data. |  | 
-^ 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 to be shown |  | +|  | //ms//                 Set the output mode.\\ <//opt//> = 'CODE' to stream data in codes; 'PTR' to stream PTR data. |  | 
-|  | //sur//                | Change channel update rate.\\ <rate> = new channel update rate in Hz.\\ If it is bigger than output data rate divided by 80 can cause unpredictable behaviour|  | +|  | //os//                 Set output data rate. <//odr//> = new sample rate. | os 2.45 = set sample rate to 2.45 samples per second. | 
-^ HART commands ^  |  |  | +|  | //og//                 Get current output data rate. |  | 
-|  | //he//                 Enable HART channel|  | +|  | //ra//                 Stop the alarm if triggered. |  | 
-|  | //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 to be selected. |  | +|  | //ar//                 Redo initialization of the algorithmUseful if conditions changed significantly since start of the program. |  | 
-|  | //ht//                 Transmit string through HART.\\ <//string//> = string to be transmitted|  +|  | //hc//                 Heater resistors control.\\ <//opt//> = 1 to turn heater resistors on; 0 to turn the heater resistors off. |  | 
-|  | //hg//                 Send the received buffer through UART connection. |  | +^ SD card commands ^  ^  ^  ^ 
-|  | //hcz//                Send command zero with the specified number of FFs in the preambule.\\ <//pbsize//> = size of the preambule (no. of 0xFFs in the beginning). |  | +|  | //fo//                 Open file on the SD card. If the file does not exist it is created.\\ If the file exists and has information the new information will be appended.\\ <//name//> = name of the file to be opened. | fo file1 a file named 'file1.txt' is opened on the card. | 
-|  | //hpt//                Send command zero with the specified number of FFs in the preambule.\\ <//byte//> byte to send in loop|  | +|  | //fc//                 Close the last file open on the SD cardThis also saves the latest content to memory. |  | 
-^ ADC commands |  |  +^ Device commands ^   ^  ^ 
-|  | //arr//                Display value of ADC register of the given address.\\ <//reg//> = address of the register. |  | +|  | //rr//                 Read device register.\\ <//addr//> = address of the register to be read in hexadecimal. | rr a = read register 0xA 
-|  | //awr//                Change value of the ADC register of the given address.\\ <//reg//> = address of the register.\\ <//val//> = new value of the register. |  | +|  | //rw//                 Write device register.\\ <//addr//> = address of the register to be read in hexadecimal.\\ <//val//> = value to be written to the register in hexadecimal. | rw a 12c = write 0x12C to register 0xA 
-|  | //ags//                Get specific number of samples from the given channel.\\ <//ch//> = selected chanel.\\ <//nr//> = number of channels; cannot exceed 2048. |  | +|  | //rd//                 Read and display all device registers in one command. |  |
-|  | //aso//                | Set sample rate.\\ <//sps//> selected sample rate option.\\ If it is smaller than channel update rate multiplied by 80 can cause unpredictable behaviour|  +
-|  | //asf//                Set filter option.\\ <//filter//> = selected filter option. |  | +
- | //aep//                | Enable post filter. |  | +
-|  | //adp//                Select postfilter.\\ <//opt//> = selected postfilter option. |  +
-|  | //asp//                | Reset controller, parameters and faults |  | +
-|  | //aowe//               | Enable open wire detection|  | +
-|  | //aowd//               | Disable open wire detection. |  | +
-^ EEPROM commands ^  |  |  +
-|  | //de//                 Discover EEPROM I2C addresses if there are any. |  |+
  
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:eval_cn0414_console.png?nolink Terminal example}}+{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0537_putty_update.png |}}
  
-===== 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, the setup was tested at a certified testing facility (Intertek) and passed all the smoke sensor aspects of the UL-217 8th Ed. standards.  You can view the entire report here.
  
-[[https://github.com/analogdevicesinc/EVAL-ADICUP3029/tree/master/projects/ADuCM3029_demo_cn0414AduCM3029_demo_cn0414 at Github]] +<WRAP center round download 60%> 
- +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0357:intertek_test_report_on_eval-cn0537-algo.pdf |UL-217 8th Edtesting and results document}}
-[[| AduCM3029_demo_cn0414.HEX]] +
- +
 </WRAP> </WRAP>
- 
-===== How to use the Tools ===== 
- 
-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 [[resources:eval:user-guides:eval-adicup3029:tools|Tools Overview page.]] 
- 
-==== Importing ==== 
- 
-For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our [[resources:eval:user-guides:eval-adicup3029:tools:cces_user_guide#how_to_import_existing_projects_into_your_workspace|How to import existing projects into your workspace]] section. 
- 
-==== Debugging ==== 
- 
-For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our [[resources:eval:user-guides:eval-adicup3029:tools:cces_user_guide#how_to_configure_the_debug_session_for_an_aducm3029_application|How to configure the debug session]] section. 
- 
-==== Project Structure ==== 
- 
-The program is composed of two main parts: 
-  - Board setup with initial values. 
-  - Main process. 
- 
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0414_main_flowchart.png?nolink | Main flow chart}} 
- 
-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. 
- 
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0414_board_setup_flow.png?nolink | Board setup flow chart}} 
- 
-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). 
- 
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0414_process_flow.png?nolink | Process flow chart}} 
- 
-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). 
- 
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0414_update_channel_flow.png?nolink | Update channel flow chart}} 
  
 // End of Document // // End of Document //
resources/eval/user-guides/eval-adicup3029/reference_designs/demo_cn0537.1594112407.txt.gz · Last modified: 07 Jul 2020 11:00 by Andrei Drimbarean