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-adicup360:application_demos:smart_greenhouse [22 May 2017 19:08] – [Setup Requirements] Ramon Glenn Amparoresources:eval:user-guides:eval-adicup360:application_demos:smart_greenhouse [14 Mar 2021 10:15] (current) – [Obtaining the Source Code] adding in .Bin file Zuedmar Arceo
Line 3: Line 3:
 {{:resources:eval:user-guides:eval-adicup360:application_demos:greenhouse.jpg?600|}}\\ \\ {{:resources:eval:user-guides:eval-adicup360:application_demos:greenhouse.jpg?600|}}\\ \\
  
-The demo concentrates on several important agriculture characteristics including soil moisture, soil pH with temperature compensation, as well as visible light recognition and control.  These are three of the main sources of plant growth, and monitoring these are critical to the efficiency and optimization of the crop you are growing.[[http://www.analog.com/CN0398|CN0398]] is a reference design that enables the demo to measure soil moisture, soil pH, and temperature. [[http://www.analog.com/CN0397|CN0397]] allows the demo to measure the light intensities at certain visible light wavelengths that plants are sensitive to. [[http://www.analog.com/CN0370|CN0370]] is a 16-bit LED current driver that controls the light intensity for a particular color LED, providing optimal lighting levels for the plants.+The demo concentrates on several important agriculture characteristics including soil moisture, soil pH with temperature compensation, as well as visible light recognition and control.  These are three of the main sources of plant growth, and monitoring these are critical to the efficiency and optimization of the crop you are growing.[[adi>CN0398|CN0398]] is a reference design that enables the demo to measure soil moisture, soil pH, and temperature. [[adi>CN0397|CN0397]] allows the demo to measure the light intensities at certain visible light wavelengths that plants are sensitive to. [[adi>CN0370|CN0370]] is a 16-bit LED current driver that controls the light intensity for a particular color LED, providing optimal lighting levels for the plants.
  
-Smart Greenhouse demo showcases the capability of [[http://www.analog.com/ADICUP360|ADICUP360]] in a fast prototyping environment in combination of 3 reference designs in two different form factors, Arduino form factor and PMOD form factor, to cater an applications in Smart Agriculture.+Smart Greenhouse demo showcases the capability of [[adi>ADICUP360|ADICUP360]] in a fast prototyping environment in combination of 3 reference designs in two different form factors, Arduino form factor and PMOD form factor, to cater an applications in Smart Agriculture.
  
-To learn more about the reference designs, please refer their individual circuit notes [[http://www.analog.com/CN0370|CN0370]], [[http://www.analog.com/CN0397|CN0397]] and [[http://www.analog.com/CN0398|CN0398]].+To learn more about the reference designs, please refer their individual circuit notes [[adi>CN0370|CN0370]], [[adi>CN0397|CN0397]] and [[adi>CN0398|CN0398]].
 ====== Setup Requirements ====== ====== Setup Requirements ======
  
 **Smart Greenhouse Demo Requirements ** **Smart Greenhouse Demo Requirements **
   * Boards/Hardware   * Boards/Hardware
-    * [[http://www.analog.com/en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-ADICUP360.html|ADICUP360]] +    * [[adi>en/design-center/evaluation-hardware-and-software/evaluation-boards-kits/EVAL-ADICUP360.html|ADICUP360]] 
-    * [[http://www.analog.com/en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/CN0370.html|CN0370]] +    * [[adi>en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/CN0370.html|CN0370]] 
-    * [[http://www.analog.com/en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/CN0397.html|CN0397]] +    * [[adi>en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/CN0397.html|CN0397]] 
-    * [[http://www.analog.com/en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/cn0398.html#rd-overview|CN0398]]+    * [[adi>en/design-center/reference-designs/hardware-reference-design/circuits-from-the-lab/cn0398.html#rd-overview|CN0398]]
   * Sensors   * Sensors
     * pH Probe with BNC termination type ([[https://www.atlas-scientific.com/product_pages/probes/ph_probe.html|Atlas Scientific pH probe]])     * pH Probe with BNC termination type ([[https://www.atlas-scientific.com/product_pages/probes/ph_probe.html|Atlas Scientific pH probe]])
     * 3 Wire Moisture Sensor ([[http://www.vegetronix.com/Products/VH400/|VH400]])     * 3 Wire Moisture Sensor ([[http://www.vegetronix.com/Products/VH400/|VH400]])
     * 3 Wire PT100     * 3 Wire PT100
-    * 627nm LED's ([[https://www.digikey.com/product-detail/en/lumileds/LXM2-PD01-0050/1416-1024-1-ND/3961129 | LXM2-PD01-0050]] used in demo) +    * 627nm LED's ([[digikey>LXM2-PD01-0050| LXM2-PD01-0050]] used in demo) 
-    * 540nm LED's ([[https://www.digikey.com/product-detail/en/lumileds/LXML-PM01-0100/1416-1036-1-ND/3961141 | LXML-PM01-0100]] used in demo) +    * 540nm LED's ([[digikey>LXML-PM01-0100| LXML-PM01-0100]] used in demo) 
-    * 470nm LED's ([[https://www.digikey.com/product-detail/en/lumileds/LXML-PB01-0040/1416-1029-1-ND/3961134 | LXML-PB01-0040]] used in demo)+    * 470nm LED's ([[digikey>LXML-PB01-0040| LXML-PB01-0040]] used in demo)
   * Cables/Power   * Cables/Power
     * 5V, 2A wall power supply(3 Pcs)     * 5V, 2A wall power supply(3 Pcs)
Line 28: Line 28:
     * USB to micro USB cable     * USB to micro USB cable
   * Software/Tools   * Software/Tools
-    * [[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_Smart_Greenhouse | Smart Greenhouse Demo (c code)]] +    * [[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_Smart_Greenhouse | Smart Greenhouse Demo Source Code]] 
-    * [[https://wiki.analog.com/resources/eval/user-guides/eval-adicup360/quickstart/eclipse_setup_guide#windows_tool_chain_installer_instructions ADuCM360-IDE ]]+    * [[/resources/eval/user-guides/eval-adicup360/tools/cces_setup_guide#crosscore_embedded_studio_download_packages CrossCore Embedded Studio ]]
     * [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html | Putty ]]     * [[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html | Putty ]]
 +
 ====== How to setup Hardware ====== ====== How to setup Hardware ======
 +
 Functional Block Diagram Functional Block Diagram
 {{:resources:eval:user-guides:eval-adicup360:reference_designs:cn0398:blobk_diagram.png|}}\\ {{:resources:eval:user-guides:eval-adicup360:reference_designs:cn0398:blobk_diagram.png|}}\\
Line 47: Line 49:
 {{:resources:eval:user-guides:eval-adicup360:hardware:cn0398:capture.png|}}\\  {{:resources:eval:user-guides:eval-adicup360:hardware:cn0398:capture.png|}}\\ 
 Chip select Assignment for each CN0370 boards are as follows:\\  Chip select Assignment for each CN0370 boards are as follows:\\ 
-{{ :resources:eval:user-guides:eval-adicup360:application_demos:cn0370_connect.png |}}+{{ :resources:eval:user-guides:eval-adicup360:application_demos:connect2.png |{{ :resources:eval:user-guides:eval-adicup360:application_demos:cn0370_connect.png |}}
 ^ CN0370 Control ^ ADICUP360 Pin (P4) ^ ADuCM360 Pin/Port ^ ^ CN0370 Control ^ ADICUP360 Pin (P4) ^ ADuCM360 Pin/Port ^
 | Red LED   | 7  | P1.0 | | Red LED   | 7  | P1.0 |
Line 58: Line 60:
 | VDD       | 7  | DVDD | | VDD       | 7  | DVDD |
  
-<note>The demo used three CN0370 hardware routed on the same SPI bus with different chip selects and each hardware controls specific external LEDs which includes [[http://www.digikey.com/product-detail/en/lumileds/LXML-PB01-0040/1416-1029-2-ND/3961252|BLUE LED]], [[http://www.digikey.com/product-detail/en/lumileds/LXML-PM01-0100/1416-1036-6-ND/3961200|GREEN LED]] and [[http://www.digikey.com/product-detail/en/lumileds/LXM2-PD01-0050/1416-1024-1-ND/3961129|RED LED]]+<note>The demo used three CN0370 hardware routed on the same SPI bus with different chip selects and each hardware controls specific external LEDs which includes [[digikey>LXML-PB01-0040|BLUE LED]], [[digikey>LXML-PM01-0100|GREEN LED]] and [[digikey>LXM2-PD01-0050|RED LED]]
 </note> </note>
 \\  \\ 
Line 80: Line 82:
 The software allows calibration of the pH sensors and the photodiodes on the board for more accurate measurements. The LED's can be controlled manually using the software and automatically by setting the desired intensity of each wavelength and using proportional control. The software allows calibration of the pH sensors and the photodiodes on the board for more accurate measurements. The LED's can be controlled manually using the software and automatically by setting the desired intensity of each wavelength and using proportional control.
  
-===== Obtaining the source code ===== +===== Obtaining the Source Code ===== 
-\\+ 
 +There are two basic ways to program the ADICUP360 with the software for the Smart Greenhouse Demo. 
 +  - Dragging and Dropping the .Bin to the MBED drive 
 +  - Building, Compiling, and Debugging using CCES 
 + 
 +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.
  
-We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace+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.
  
-The source code and include files of the **ADuCM360_demo_Smart_Greenhouse** can be found on Github:+The software for the **ADuCM360_demo_Smart_Greenhouse** demo can be found here:
  
-<WRAP round 60% download>+<WRAP round 80% download> 
 +Prebuilt Smart Greenhouse Demo Bin File 
 +  * [[https://github.com/analogdevicesinc/EVAL-ADICUP360/releases/download/Release-1.0/ADuCM360_demo_Smart_Greenhouse.bin| ADuCM360_demo_Smart_Greenhouse.Bin]] 
 +Complete Smart Greenhouse Demo Source Files 
 +  * [[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_Smart_Greenhouse| ADuCM360_demo_Smart_Greenhouse Source Code]]
  
-[[https://github.com/analogdevicesinc/EVAL-ADICUP360/tree/master/projects/ADuCM360_demo_Smart_Greenhouse| ADuCM360_demo_Smart_Greenhouse]] 
-  
 </WRAP> </WRAP>
  
-===== Debugging the ADuCM360_demo_Smart_Greenhouse Project ===== +<WRAP center round info 80%> 
-\\ +For more information on importing, debuggingor other tools related questions, please see the [[/resources/eval/user-guides/eval-adicup360/tools/cces_user_guide |tools user guide.]]  
- * A debug configuration must be set up for this project in order to have the possibility to program and to debug the **ADuCM360_demo_Smart_Greenhouse** project. To do thisfollow the instructions from [[resources:eval:user-guides:eval-adicup360:quickstart:eclipse_user_guide#setting_up_a_debug_configuration_for_the_project|Setting up a Debug Configuration Page.]]+</WRAP>
  
-        * Make sure the target board is connected to the computer (via **DEBUG USB**) and using the tool bar, navigate to the small Debug icon{{:resources:eval:user-guides:eval-aducm360-ardz:quickstart:bug.png?30|}} and select the debugging session you created. The application will programmed and the program execution will stop at the beginning of the main() function. +===== How to use the Tools =====
-  +
-{{ :resources:eval:user-guides:eval-adicup360:application_demos:smartagdebug.jpg |}}+
  
-\\ +The official tool we promote for use with the EVAL-ADICUP360 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-adicup360:tools|Tools Overview page.]] 
- * Use step-by-step execution or directly run the program+ 
-  +==== Importing ==== 
-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.+ 
 +For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our [[resources:eval:user-guides:eval-adicup360: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-adicup360:tools:cces_user_guide#how_to_configure_the_debug_session_for_an_aducm360_application|How to configure the debug session]] section.
  
-\\ 
 ===== Software Flow Diagram ===== ===== Software Flow Diagram =====
  
Line 127: Line 138:
  
 ==== Initialization ==== ==== Initialization ====
 +
   * Upon opening the serial terminal, you must press **<Enter>** to initialize program   * Upon opening the serial terminal, you must press **<Enter>** to initialize program
     * This resets all peripherals and returns then to their default value     * This resets all peripherals and returns then to their default value
   * Typing “help” will show the list of commands   * Typing “help” will show the list of commands
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:initialization.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:initialization.jpg |}}
 +
 ==== Calibration ==== ==== Calibration ====
 +
   * Calibrate the light sensors of the CN0397 by typing in "cal_pd"   * Calibrate the light sensors of the CN0397 by typing in "cal_pd"
     * This will prompt you to calibrate each of the sensors by covering the 3 photodiodes ensuring no light will pass through     * This will prompt you to calibrate each of the sensors by covering the 3 photodiodes ensuring no light will pass through
Line 138: Line 152:
   * Calibrate the pH Sensor by typing in "cal_ph"   * Calibrate the pH Sensor by typing in "cal_ph"
     * A question will pop up prompting to calibrate the pH sensor, press “n”.     * A question will pop up prompting to calibrate the pH sensor, press “n”.
-    * A prompt will pop up to load default calibration. Press “n” to load the Nernst Equation. More information about direct measurement using Nernst equation where no calibration is performed can be found in [[http://www.analog.com/media/en/reference-design-documentation/reference-designs/CN0398.pdf|CN0398 Circuit Note]]. +    * A prompt will pop up to load default calibration. Press “n” to load the Nernst Equation. More information about direct measurement using Nernst equation where no calibration is performed can be found in [[adi>media/en/reference-design-documentation/reference-designs/CN0398.pdf|CN0398 Circuit Note]]. 
-    * Pressing "y" on the calibration prompt will perform two point calibration by measuring the voltage of two buffer solutions, each with a known pH. The software includes NIST lookup tables for different pH buffer solutions and includes the pH temperature corrected pH values from 0°C to 95°C.For more information about pH two point calibration, visit [[http://www.analog.com/media/en/reference-design-documentation/reference-designs/CN0398.pdf|CN0398 Circuit Note]].+    * Pressing "y" on the calibration prompt will perform two point calibration by measuring the voltage of two buffer solutions, each with a known pH. The software includes NIST lookup tables for different pH buffer solutions and includes the pH temperature corrected pH values from 0°C to 95°C.For more information about pH two point calibration, visit [[adi>media/en/reference-design-documentation/reference-designs/CN0398.pdf|CN0398 Circuit Note]].
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:cal_ph.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:cal_ph.jpg |}}
- 
  
 ==== Light Control Settings ==== ==== Light Control Settings ====
 +
   * Type the command "set_red value" and press enter   * Type the command "set_red value" and press enter
     * Replace value with whole number from 0 to 120000     * Replace value with whole number from 0 to 120000
Line 154: Line 168:
     * This will set  the desired intensity     * This will set  the desired intensity
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:intensity_settings.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:intensity_settings.jpg |}}
 +
 ==== Loop Setup ==== ==== Loop Setup ====
 +
   - Type the command “acquire”   - Type the command “acquire”
     * This will get all the boards to read data from its converters     * This will get all the boards to read data from its converters
Line 172: Line 188:
     * Stop acquisition by typing the command "rest"     * Stop acquisition by typing the command "rest"
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:exit_loop.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:exit_loop.jpg |}}
 +
 ==== Software Commands ==== ==== Software Commands ====
  
Line 188: Line 205:
 | start | - none | Start Proportional Control System for CN0370 | | | start | - none | Start Proportional Control System for CN0370 | |
 | stop | - none | Stop Proportional Control System for CN0370 | | | stop | - none | Stop Proportional Control System for CN0370 | |
 +
 ===== Serial Terminal/Output ===== ===== Serial Terminal/Output =====
 +
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:putty_settings.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:putty_settings.jpg |}}
 In puTTy cofiguration, select serial as the connection type with a baud rate of 115200. Select the correct COM port by checking it in your device manager. In puTTy cofiguration, select serial as the connection type with a baud rate of 115200. Select the correct COM port by checking it in your device manager.
 {{ :resources:eval:user-guides:eval-adicup360:application_demos:devicemanager.jpg |}} {{ :resources:eval:user-guides:eval-adicup360:application_demos:devicemanager.jpg |}}
 +
 +// End of Document //
resources/eval/user-guides/eval-adicup360/application_demos/smart_greenhouse.1495472897.txt.gz · Last modified: 22 May 2017 19:08 by Ramon Glenn Amparo