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_cn0397 [30 May 2017 14:59] – [General Description/Overview] Pranit Jadhav | resources: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/ | ===== General Description/ | ||
- | The **ADICUP3029_CN0397** project uses the [[http:// | + | The **ADICUP3029_CN0397** project uses the [[adi>en/ |
\\ | \\ | ||
- | The **EVAL-CN0397-ARDZ** board uses [[http:// | + | The **EVAL-CN0397-ARDZ** board uses [[adi>ad8500|AD8500]], |
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. | ||
- | {{: | + | {{: |
- | The 16-bits ADC data are received using **SPI interface** of the EVAL-ADICUP360 | + | The 16-bits ADC data are received using **SPI interface** of the EVAL-ADICUP3029 |
**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: | ||
{{ : | {{ : | ||
\\ | \\ | ||
- | ====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 | + | The following |
- | + | * Hardware | |
- | {{ : | + | * 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. | + | |
- | + | | |
- | The **ADICUP3029_CN0397** use **UART** connection via **P0.10/ | + | - 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. |
- | {{ : | + | |
===== 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, | ||
+ | |||
+ | 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. | ||
+ | |||
+ | {{ : | ||
+ | \\ | ||
+ | |||
===== Outputting Data ===== | ===== Outputting Data ===== | ||
- | Once the hardware | + | Once the hardware |
+ | 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, | ||
+ | {{ : | ||
+ | \\ | ||
+ | \\ | ||
+ | |||
+ | ^ 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. | ||
+ | \\ | ||
+ | {{ : | ||
+ | |||
+ | 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. | ||
+ | - " | ||
+ | - Once you find your demo, click on it to open it up. | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | {{: | ||
+ | {{: | ||
+ | \\ | ||
+ | |||
+ | |||
+ | Figure shows when ADI_APP_USE_BLUETOOTH is set to 0. | ||
+ | \\ | ||
+ | {{ : | ||
+ | |||
+ | ==== 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 // |
- | When in debug mode, the application | + | 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** demo. Tap 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. | ||
+ | - " | ||
+ | - Once you find your demo, click on it to open it up. | ||
+ | </ | ||
\\ | \\ | ||
- | Figure shows when ADI_APP_USE_BLUETOOTH is set to 1. | + | {{ : |
+ | \\ | ||
+ | {{: | ||
+ | {{: | ||
+ | \\ | ||
- | \\ | + | <note important> |
- | {{ : | + | |
- | \\ | + | |
- | 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 |
- | {{ : | + | - Dragging |
- | ==== Release Mode ==== | + | - Building, Compiling, and Debugging using CCES |
- | In Release mode, the application will print message on UART terminal. | + | |
- | If // | + | |
- | 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** demo. Tap 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 |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | {{ : | + | |
- | \\ | + | |
- | <note important> | + | Importing |
- | ===== Obtaining | + | |
- | 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:// | ||
+ | Complete CN0414 Source Files | ||
+ | * [[https:// | ||
- | <fc # | ||
</ | </ | ||
- | |||
===== How to use the Tools ===== | ===== How to use the Tools ===== |