This is an old revision of the document!
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.CN0398 is a reference design that enables the demo to measure soil moisture, soil pH, and temperature. CN0397 allows the demo to measure the light intensities at certain visible light wavelengths that plants are sensitive to. 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 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 CN0370, CN0397 and CN0398.
Smart Agriculture Demo Requirements NEED TO ADD THE SOFTWARE REQUIREMENTS TOO
Functional Block Diagram
ADICUP360 Hardware Setup
CN0398 Hardware Setup
CN0397 Hardware Setup
CN0370 Hardware Setup
Chip select Assignment for each CN0370 boards are as follows:
CN0370 Control | ADICUP360 Pin (P4) | ADuCM360 Pin/Port |
---|---|---|
Red LED | 7 | P1.0 |
Green LED | 10 | P2.2 |
Blue LED | 8 | P1.1 |
Complete setup
Hardware Connections as follows
The demo software is an integrated software of all the three reference designs which allows measurements of soil pH and moisture measurements with temperature compensation, as well as light detection and 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.
We recommend not opening the project directly, but rather import it into Eclipse and make a local copy in your Eclipse workspace.
The source code and include files of the CftL_Demo_v0 can be found on Github:
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.
Upon start of the software, it will initialize all of the boards attached to the ADICUP360. CN0398 initialization will write all the settings to the IC's on board, while CN0397 initialization will write the settings to the DAC registers. The CN0370 will be written with code zero to turn off all of the LED's.
Once the initialization is complete, the program will now wait for a user command to execute the corresponding tasks.
Need a quick description of what this software section covers and is all about
The demo should be running automatically displaying all the values and running its control automatically.
Command | Parameter to Pass | Function/Description | Example Command (if needed) |
---|---|---|---|
display | - none | Continuously display all sensor data (Press <ENTER> to stop) | |
acquire | - none | Continuously acquire all sensor data | |
rest | - none | Stop acquiring sensor data | |
cal_pd | - none | Calibrate CN0397 ADC for photodiode zero-scale initialization | |
cal_ph | - none | Calibrate CN0398 ADC for voltage to pH conversion | |
red_test | (0-65535) | Perform functionality test for CN0370 with red LED | “red_test 35412” |
green_test | (0-65535) | Perform functionality test for CN0370 with green LED | “green_test 4096” |
blue_test | (0-65535) | Perform functionality test for CN0370 with blue LED | “blue_test 19754” |
set_red | (0-120000) | Set desired red light intensity value to maintain in lux | “set_red 88000” |
set_green | (0-120000) | Set desired green light intensity value to maintain in lux | “set_green 26500” |
set_blue | (0-120000) | Set desired blue light intensity value to maintain in lux | “set_blue 115000” |
start | - none | Start Proportional Control System for CN0370 | |
stop | - none | Stop Proportional Control System for CN0370 |