The Smart Greenhouse is a WI-FI cloud enabled or local serial terminal application for the EVAL-ADICUP3029 base board with additional Soil shield EVAL-CN0398-ARDZ, Light shield EVAL-CN0397-ARDZ, LED shield EVAL-CN0410-ARDZ created with Analog Devices Cross Core Embedded Studio.
The Smart Greenhouse project uses the soil shield EVAL-CN0398-ARDZ to collect data about temperature, moisture and pH, the EVAL-CN0397-ARDZ to get information about light intensity and concentration for red, blue and green light and the EVAL-CN0410-ARDZ to control a led array to get the desired light intensity.
The EVAL-ADICUP3029 is designed for IOT (Internet of Things) applications in mind, and therefore comes with on board Wi-Fi ESP8266 module.
In order to fully make use of IOT cloud connectivity, the Arrow SDK or IBM Watson is used to connect to cloud services and have and interface to receive data and send commands.
There are a few demo versions supported using the same algorithm and application level code. The only difference for each of these options is how you would view the data and interact with the design.
The following is a list of items needed in order to replicate this demo.
There are two basic ways to program the ADICUP3029 with the software for the IBM Watson Smart Greenhouse.
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
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 software for the ADuCM3029_IBMWatson_Greenhouse can be found here:
Prebuilt IBM Watson Greenhouse Hex File
Complete IBM Watson Greenhouse Source Files
This section will describe the steps needed to get the IBM Watson Greenhouse up and running.
The first step is to get an IBM account for IoT projects. Acces this link https://www.ibm.com/cloud/#/ibmssolanding and click Sign Up.
After login you will arrive at the dashboard page.
Choose to create a resource and select the Internet of Things platform.
Give the resource a Service name and create it. After this the last step is to launch the resource.
The next now is to create a device inside IBM Watson in order to recognize our physical device. Click on the Devices option from the side tab.
To add the device please follow this tutorial https://developer.ibm.com/recipes/tutorials/how-to-register-devices-in-ibm-iot-foundation/
In order to establish the connection to the WIFI we have to set the aWifiSSID and aWifiPassword to connect to the access point (wifi router). This is done modifying ADuCM3029_IBMWatson.h.
The last step is to connect our device to the IBM platform. There still are few fields in ADuCM3029_IBMWatson.h that need to be completed.
First let's set the MQTT username and password. The username is always use-token-auth. For the password use the Authentication token when you created the device in the tutorial above.
The last step is to set the MQTT configuration. The broker ip is the same as you IBM Watson IoT platform link. it should be something similar to this 0qqrd7.internetofthings.ibmcloud.com where 0qqrd7 is the Organization ID. Replace the address from ADuCM3029_IBMWatson.h, aMQTTBrokerIp with your own. The port is always 1883.
The publisher name is composed of d:OrganizationID:ClientName:DeviceName in the end you end up with something like d:0qqrd7:C_Client:ADI_GreenHouse.
The final thing to do is set the Topic name and the Subscribe Topic. We will need the subscribe topic to send commands to the device from an application. An example is to create a NodeRed application and connect it to the cloud. This will enable us to send commands to the device. But first lets set those two things we mentioned earlier.
For an application creation you will need to create a Node Red starter pack inside IBM following this link https://console.bluemix.net/catalog/starters/node-red-starter
Click on visit App URL then just go to Node Red Editor. This is an application example using Node Red dashboard pack.
For more documentation on NodeRed just visit https://nodered.org/ and follow the documentation.
The greenhouse application involves 4 layers:
The hardware part is composed of the shields stacked on top of each other, which provide data from the sensors and also control the leds. For more details about these CNs you can consult the individual page for each one:
The communication layer configures the shields and is responsible for transferring information from and to the desired device. Data is then available for processing and transmitting to the cloud.
ADICUP3029 ensures the logic for the localized operations while the ESP8266 establishes the connection to the cloud and send the data over WIFI.
Data from the device can be visualized inside the IBM Watson IoT platform. Just navigate to devices and click on the one you created.
Also can be visualized in nodeRed with the dashboard pack. This will create a more visual way is displaying data.
For nodered documentation follow https://nodered.org/.
The following is a list of items needed in order to replicate this demo.
There are two basic ways to program the ADICUP3029 with the software for the Serial Terminal Smart Greenhouse.
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
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 software for the ADuCM3029_Local_Greenhouse can be found here:
Prebuilt Local Greenhouse Hex File
Complete Local Greenhouse Source Files
The serial greenhouse project is a local deployed solution. It does not use WIFI connection and all communication is done over UART.
The greenhouse application involves 3 layers:
The hardware part is composed of the shields stacked on top of each other, which provide data from the sensors and also control the leds. For more details about these CNs you can consult the individual page for each one:
The communication layer configures the shields and is responsible for transferring information from and to the desired device. Data is then available for processing and transmitting to the cloud.
ADICUP3029 ensures the logic for all the operations and once the data is available, it is being sent over UART and made available for the user. The user can also send commands to the device to control the leds intensity.
Data is represented in json format and sent over UART. Use a Putty service set to 9600 baud rate.
After sending a command we can read again the values of the sensors to see the intensity change.
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 Tools Overview page.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to import existing projects into your workspace section.
For more detailed instructions on importing this application/demo example into the CrossCore Embedded Studios tools, please view our How to configure the debug session section.
End of Document