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_cn0397 [30 May 2017 14:59] – [General Description/Overview] Pranit Jadhavresources:eval:user-guides:eval-adicup3029:reference_designs:demo_cn0397 [04 Mar 2021 06:17] (current) – [Obtaining the Source Code] adding in .Hex files Zuedmar Arceo
Line 5: Line 5:
 ===== General Description/Overview ===== ===== General Description/Overview =====
  
-The **ADICUP3029_CN0397** project uses the [[http://www.analog.com/en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/cn0397|EVAL-CN0397-ARDZ shield]] which is a single-supply, low power, low noise, 16-bit light detector utilizing wavelength specific photodiodes. The photodiodes used in this circuit are sensitive at different wavelengths, to read light intensity levels over the visible light spectrum where the plants are photosynthetically active. +The **ADICUP3029_CN0397** project uses the [[adi>en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/cn0397|EVAL-CN0397-ARDZ shield]] which is a single-supply, low power, low noise, 16-bit light detector utilizing wavelength specific photodiodes. The photodiodes used in this circuit are sensitive at different wavelengths, to read light intensity levels over the visible light spectrum where the plants are photosynthetically active. 
  
 \\ \\
-The **EVAL-CN0397-ARDZ** board uses [[http://www.analog.com/ad8500|AD8500]], a low power, precision CMOS op amp with a low input bias current of a typical 1pA which is used in a transipedance amplifier configuration to convert the current output of the photodiodes into voltage. It also features [[http://www.analog.com/ad7798|AD7798]] a 3-channel, low noise, low power 16-bit ADC that converts the analog voltage into digital data in for the processing of data into light intensity. The circuit utilizes RGB photodiodes from Everlight with their peak sensitivities 620nm (**R**), 550nm (**G**) and 470nm (**B**).+The **EVAL-CN0397-ARDZ** board uses [[adi>ad8500|AD8500]], a low power, precision CMOS op amp with a low input bias current of a typical 1pA which is used in a transipedance amplifier configuration to convert the current output of the photodiodes into voltage. It also features [[adi>ad7798|AD7798]] a 3-channel, low noise, low power 16-bit ADC that converts the analog voltage into digital data in for the processing of data into light intensity. The circuit utilizes RGB photodiodes from Everlight with their peak sensitivities 620nm (**R**), 550nm (**G**) and 470nm (**B**).
  
 The **ADICUP3029_CN0397** application perform ADC readings for all 3 channels, processes them and make all necessary calculations in order to provide light intensity and light concentration for each color. The **ADICUP3029_CN0397** application perform ADC readings for all 3 channels, processes them and make all necessary calculations in order to provide light intensity and light concentration for each color.
  
  
-{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:board.png?nolink&500 |}}+{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:board.png?nolink&440 |}}
  
  
- The 16-bits ADC data are received using **SPI interface** of the EVAL-ADICUP360 board. The **UART interface** (**38400** baud rate and **8-bits** data length) is used to send(and to receive) data to (from) a terminal window.+ The 16-bits ADC data are received using **SPI interface** of the EVAL-ADICUP3029 board. The **UART interface** (**9600** baud rate and **8-bits** data length) is used to send(and to receive) data to (from) a terminal window.
  
 **Light intensity** [Lux] is calculated using ADC output value for selected channel and a constant value for each color: **Light intensity** [Lux] is calculated using ADC output value for selected channel and a constant value for each color:
Line 33: Line 33:
 {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:table.png?600 |}} {{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:table.png?600 |}}
 \\ \\
-====Calibration procedure ==== 
  
-The **CN0397** needs to be calibrated first before using it in order to achieve best performance. A system zero offset calibration needs to be run to cancel the offset for all of the channels. Calibration routine, which is enabled by default, can be done by covering and not allowing any light to reach the photodiodes within the first 5second of the run. +===== Demo Requirements  =====
  
-Once all the channels have been calibrated, the circuit is now ready for use. The output data will be available for each LED o android device if enabled+The following is a list of items needed in order to replicate this demo
- +  * Hardware 
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:calibration_1.png?nolink |}} +    * EVAL-ADICUP3029 
-\\+    * EVAL-CN0397-ARDZ 
 +    * Mirco USB to USB cable 
 +    * PC or Laptop with a USB port 
 +  * Software 
 +    * ADICUP3029_CN0397 software 
 +      * Inside Sensor_Sw Pack (1.0.0 or higher) 
 +    * CrossCore Embedded Studio (2.6.0 or higher) 
 +    * ADuCM302x DFP (2.0.0 or higher) 
 +    * ADICUP3029 BSP (1.0.0 or higher) 
 +    * Android IoTNode App (optional) 
 +    * Serial Terminal Program (Required for running in release mode only) 
 +      * Such as Putty or Tera Term
  
 ===== Setting up the Hardware ===== ===== Setting up the Hardware =====
  
-Plug the **EVAL-CN0397-ARDZ** shield into the **EVAL-ADICUP3029** board. In order to program the base board you need to use the **USB** located at P10 on the edge of the board next to power jack +  Place the **(S5)** switch position to read "Wall/USB", and the **(S2)** switch position to read "USB".{{ :resources:eval:user-guides:eval-adicup3029:hardware:adicup3029_uart_switch_usb_revc.png?200 |}} 
- +  Connect a jumper on **P1** between position **1-2** on EVAL-CN0397-ARDZ. 
-The **ADICUP3029_CN0397** use **UART** connection via **P0.10/P0.11** of **[[http://www.analog.com/en/products/processors-dsp/microcontrollers/precision-microcontrollers/aducm3029.html ADuCM3029]]** to communicate with PC terminal. Make sure S2 switch is towards **USB**. **SPI** communication via SPI0 between ADICUP3029 and EVAL-CN0397-ARDZ. Also connect a jumper on **P1** between position **1-2** on EVAL-CN0397-ARDZ. +  - Plug the **EVAL-CN0397-ARDZ** shield into the **EVAL-ADICUP3029** board, using (P3), (P4), (P5), (P6), and (P7). 
-\\ +   Plug in the micro USB cable into the **(P10)** USB port on the EVAL-ADICUP3029, and the other end into the PC or laptop.
-{{ :resources:eval:user-guides:eval-adicup3029:hardware:adicup3029_uart_switch_usb.png?nolink |}}+
  
 ===== Configuring the Software ===== ===== Configuring the Software =====
-In the //cn0398_app.h// header files you can configure the following parameters:+ 
 +In the //cn0397_app.h// header files you can configure the following parameters:
 \\ \\
     * **ADI_APP_DISPATCH_TIMEOUT** - //DISPATCH TIMEOUT// will define how often the data is sent over Bluetooth.     * **ADI_APP_DISPATCH_TIMEOUT** - //DISPATCH TIMEOUT// will define how often the data is sent over Bluetooth.
     * **ADI_APP_USE_BLUETOOTH ** - //ENABLE BLUETOOTH// parameter - will either use Bluetooth or will have the option to print to console window in debug mode or terminal in release mode.     * **ADI_APP_USE_BLUETOOTH ** - //ENABLE BLUETOOTH// parameter - will either use Bluetooth or will have the option to print to console window in debug mode or terminal in release mode.
 +
 +===== Calibration procedure =====
 +
 +The **CN0397** needs to be calibrated first before using it in order to achieve best performance. A system zero offset calibration needs to be run to cancel the offset for all of the channels. 
 +
 +Calibration, which is enabled by default, can be done by covering and not allowing any light to reach the photodiodes within the first 5 second of the program start. 
 +
 +Once all the channels have been calibrated, the circuit is now ready for use. The output data will be available for each LED on android device if enabled.
 +
 +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:calibration_1.png?nolink |}}
 +\\
 +
 ===== Outputting Data ===== ===== Outputting Data =====
  
-Once the hardware and software is configured, user needs to follow on screen instructions to run Visible Light Detection\Measurement demo.+Once the hardware setupand software is configured, user needs to select how they want to view the data coming from Visible Light Detection\Measurement demo.(CN0397)
  
 +There are **three** different ways to visualize the data:
 +  * CrossCore Embedded Studio Console Window (through semihosting)
 +  * Serial Terminal Program (such as Putty or Tera Term)
 +  * IoTNode Smart Device App
 +
 +Depending on how you want to operate the board and visualize the data, there are two different options that must be selected from.  Below is a table outlining the general operation, and you need to click on which **launch** file you need to program onto the EVAL-ADICUP3029, and hit the **<F5>** key on your keyboard.
 +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:adt7420_demo_launch_configurations.png?200|}}
 +\\ 
 +\\ 
 +
 +^ Data Output Destination ^ Connected to Debugger ^ Configuration File ^
 +^ CCES Console Window | Yes | ADICUP3029_Debug.launch |
 +^ PC/Laptop Serial Terminal | No | ADICUP3029_Release.launch |
 +^ IoTNode Smart App | Yes | ADICUP3029_Debug.launch |
 +^ IoTNode Smart App | No | ADICUP3029_Release.launch |
 +\\ 
 +\\ 
 +\\ 
 +
 +==== Debug Launch Mode ====
 +
 +**Debug launch mode** is used when connected to the debugger.  In debug mode, all the outputs are directed to the console window of the CrossCore tools via semihosting.  The data is also sent by default to the IoTNode smart app (ADI_APP_USE_BLUETOOTH =1), but can be turned of if desired by setting ADI_APP_USE_BLUETOOTH = 0. 
 +\\
 +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:debug_mode_ble.png?nolink |}}
 +
 +Figure shows when ADI_APP_USE_BLUETOOTH is set to 1, sensor data is sent to the smart app.
 +If you have the app installed on your phone, these figure shows the output on android device.
 +<WRAP center round important 80%>
 +Do not try to connect directly (or pair) to the EVAL-ADICUP3029 from your phone.  
 +  - Simply open up the IoTNode application on your phone.
 +  - "Scan" for nearby demos.  
 +  - Once you find your demo, click on it to open it up.
 +</WRAP>
 +
 +\\ 
 +{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-134458.png?450 |}}
 +{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-140134.png?400|}}
 +\\ 
 +
 +
 +Figure shows when ADI_APP_USE_BLUETOOTH is set to 0.
 +\\ 
 +{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:debug_noble.png?nolink |}}
 +
 +==== Release Launch Mode ====
 +
 +**Release launch mode** is used for running without the debugger connected. When in release mode, console output is redirected to UART.  Bluetooth is enabled, and sensor data is sent to android application. If disabled, sensor data is directed only to the UART. If you are using the UART to make print to the PC/laptop, here are the settings your TCP client must be set too.
 Following is the UART configuration. Following is the UART configuration.
     Select COM Port     Select COM Port
Line 68: Line 137:
 \\ \\
  
-==== Debug Mode ==== +If //ADI_APP_USE_BLUETOOTH// is set to 1BLE will advertise and UART terminal will wait for an connection. 
-When in debug mode, the application will print messages in the console window.+Now start the Android App and tap scan. Once device is found, App will show **CN0397 Light Demo** which is the Bluetooth device name for **ADICUP3029_CN0397** demoTap on it to connect. Sensor data can now be seen on Android App as well as terminal. 
 +If you have the app installed on your phone, these figure shows the output on android device. 
 +<WRAP center round important 80%> 
 +Do not try to connect directly (or pair) to the EVAL-ADICUP3029 from your phone.   
 +  - Simply open up the IoTNode application on your phone. 
 +  - "Scan" for nearby demos.   
 +  - Once you find your demo, click on it to open it up. 
 +</WRAP>
 \\ \\
-Figure shows when ADI_APP_USE_BLUETOOTH is set to 1.+{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:release_mode_ble.png?nolink |}} 
 +\\  
 +{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-134458.png?450 |}} 
 +{{:resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-140134.png?400|}} 
 +\\ 
  
-\\ +<note important>Visible Light Detection Demo (**ADICUP3029_CN0397**) only works with Android App.</note>
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:debug_mode_ble.png?nolink |}} +
-\\+
  
-Figure shows when ADI_APP_USE_BLUETOOTH is set to 0.+===== Obtaining the Sotware =====
  
-\\ +There are two basic ways to program the ADICUP3029 with the software for the CN0397
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:debug_noble.png?nolink |}} +  - Dragging and Dropping the .Hex to the Daplink drive 
-==== Release Mode ==== +  - Building, Compiling, and Debugging using CCES
-In Release mode, the application will print message on UART terminal. +
-If //ADI_APP_USE_BLUETOOTH// is set to 1, BLE will advertise and UAR terminal will wait for an connection+
-Now start the Android App and tap scan. Once device is found, App will show **CN0357 Light Demo** which is the Bluetooth device name for **ADICUP3029_CN0397** demoTap on it to connect. Sensor data can now be seen on Android App as well as terminal.+
  
-\\ +Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes This is the EASIEST way to get started with the reference design
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:release_mode_ble.png?nolink |}} +
-\\ +
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-134458.png?nolink&575 |}} +
-\\ +
-{{ :resources:eval:user-guides:eval-adicup3029:reference_designs:cn0397:screenshot_20170526-140134.png?nolink&575 |}} +
-\\+
  
-<note important>Visible Light Detection Demo (**ADICUP3029_CN0397**) only works with Android App.</note> +Importing the project into CrossCore is going to allow you to change parameters and customize the software to fit your needs, but will be a bit more advanced and will require you to download the CrossCore toolchain.  
-===== 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 software for the **ADuCM3029_demo_cn0397** can be found here:
- +
-The source code and include files of the **ADICUP3029_CN0397** can be found below:+
  
 <WRAP round 80% download> <WRAP round 80% download>
 +Prebuilt CN0414 Hex File
 +  * [[https://github.com/analogdevicesinc/EVAL-ADICUP3029/releases/download/Latest/ADuCM3029_demo_cn0397.hex| AduCM3029_demo_cn0397.Hex]]
 +Complete CN0414 Source Files
 +  * [[https://github.com/analogdevicesinc/EVAL-ADICUP3029/tree/master/projects/ADuCM3029_demo_cn0397| AduCM3029_demo_cn0397 Source Code]]
  
-<fc #ff0000>**ADD GITHUB LINK HERE!**</fc>  
 </WRAP> </WRAP>
- 
  
 ===== How to use the Tools ===== ===== How to use the Tools =====
resources/eval/user-guides/eval-adicup3029/reference_designs/demo_cn0397.1496149197.txt.gz · Last modified: 30 May 2017 14:59 by Pranit Jadhav