Click here to Skip to main content
15,946,342 members
Articles / Internet of Things

An Industrial IoT framework with Samsung Artik 10 and Temboo: Water Resource Management Case Study

Rate me:
Please Sign up or sign in to vote.
5.00/5 (8 votes)
4 Aug 2016CPOL10 min read 16.9K   86   3   1
Introducing powerful industrial Temboo Choreos to scale industrial IoT framework and ecosystem

Overview

IoT is one of the most talked about domains and probably the biggest techno-buzz of the year. As the core of IoT is essentially an embedded system, it is being perceived as a maker's domain and has been drawing the attention of the makers and DiY community. Many a people has a misconception that IoT is all about some hardware hooking up to some internet services and therefore a complex hardware (or even a hack) is the heart of IoT system. However, IoT is a framework that provides a suite for connecting physical devices with computational entities (both at the edge as well as at the core). Industrial IoT is little undertalked because historically makers have never been interested in industrial automation as much as say something like robotics and home automation.

An industrial automation or monitoring system goes much beyond the hobby projects. The entire principle depends upon a robust and fundamentally scalable architecture of monitoring devices. The heart of any industria. system is the ability to overcome data leakage, providing a high accuracy connection and more importantly a robust framework of APIs and analytical engine. Data analysis in real time is of as much importance as data collection.

So how is an industrial IoT (sometime referred as IIoT) different from home IoT? As an example, if we consider the water management system, a home water tank probably will have a single unit and the tank capacity will vary say between 1000 liters to 3000 liters with water filling at most 2-3 times a day. Now consider a stell plant with units like foundry, molding, rolling, milling, churning, flattening, plating. Each of these units needs their own water management. Millions of gallons of water is supplied across to these units several times in a minute. The flow of the water is directly interlinked with the production objective. So an industrial IoT architecture must be able to handle such a large volume of data exchange over such large number of devices spread across a large geography (water supplying uinit, pump house and distribution centers are often located at different geographic locations). Therefore industrial IoT needs to be perceived with the aim of scalability, maintainability and of course, analytical possibility.

You can imagine the effort needed when a firmware needs to be updated across different machines, manufactured by different vendors, located at different places without breaking the current monitoring process. That is significantly different from a consumer IoT device (say a smart relay).

In this article, I would introduce you to one of the most trusted and promising IIoT boards called Samsung Artik and explain to you the process of working with Artik with Tembo. We shall take a case study of water resource management. As deploying the solution in an industry is out of the scope of this article, I would take you through the working process of the system and elaborate how the current simulation level prototype can be used in industrial context.

Introduction

This has been a high level of experiment that I was doing with Samsung Artik 10. We got this device for Samsung Makers against drought challenge. We got the Samsung Artik 10 so this is a tribute to what I had done with the board. We will work on building a simple IoT app and get started with it.

You can take a look at the video of the solution.

Background

The starting point arises as a surprise as we had real trouble going through the board as this was completely so this is my experience which we had going through the IoT app.

The way we started...

First of all, it was just unboxing my Artik 10 and figuring out what it had to offer. Hence, we opened the box.The Artik 10 board was robust.

The box:

Image 1

The Board:

Image 2

First Things First

We didn't update the image because one of the libraries that we were hoping to use was best possibly working with the older image and we kept it as it is till now after the project after the project was completed.

Accessing Wifi

We were using a Windows system so the first thing was how to get the device talking to wifi or the internet. First of all, the OS installed in Artik was Linus, hence one solution had to interact with putty only installed putty.Connected the Artik 10 board with USB powered on with the power supply provided and went inside the Artik 10 device using putty.

Configuration of Wifi in Artik 10

We need to follow the setup guide as mentioned by Samsung.

Now after we login to the Artik 10 board, we will use dir command to check the listing in the Artik 10 board.

We will have three files:

  • llvm-arm.conf
  • mariadb-ar.conf
  • temboo.conf

Checking the wifi status:

ifconfig

It will give all the details:

Image 3

Now we are good to go with the WiFi.

Temboo: The Word for Magic

As we had a plan for using a cloud platform that was easy and robust for Artik 10, we found that Temboo was the obvious answer as it is a cloud platform which can make production ready IoT code in minutes. There are lot of APIs that we can use for our purposes.

API's ==Choreos

Every API you access in Temboo is named as Choreos. There are different Choreos that you can take advantage of. The usage is easy as the learning curve for mastering is just few steps to follow.

Platforms for Temboo

Image 4

If we want to work on Temboo hardware capability, we found that we have had three options:

  1. Texas Instruments Board
  2. Arduino board
  3. Samsung Artik 10 (Arduino certified)

We can choose any one of the platforms to work with. As we had a Artik 10 board handy, we choose Samsung.

SDKs for Temboo

Image 5

We have variety of options to start with using the SDK. We will show it on Processing.

Firstly, we need to download the processing library for Temboo.

Image 6

Just click on run your first Choreo for processing. In the next page, it will show the SDKs and the download option.

Image 7

When we click on processing, we have the steps mentioned in the next step on getting started with it.

Image 8

Let's download the Processing library for Temboo first.

Unzip the library, copy it to the processing library folder.

Image 9

Copy the code generated to the processing IDE

Processing
import com.temboo.core.*;
import com.temboo.Library.Google.Geocoding.*;

// Create a session using your Temboo account application details
TembooSession session = new TembooSession
              ("abhigeek81", "myFirstApp", "XvaH06Qhpq9zAqDedc9UqsjMljvvu47b");

void setup() {
  // Run the GeocodeByAddress Choreo function
  runGeocodeByAddressChoreo();
}

void runGeocodeByAddressChoreo() {
  // Create the Choreo object using your Temboo session
  GeocodeByAddress geocodeByAddressChoreo = new GeocodeByAddress(session);

  // Set inputs
  geocodeByAddressChoreo.setAddress("1600 Amphitheatre Parkway, Mountain View, CA");

  // Run the Choreo and store the results
  GeocodeByAddressResultSet geocodeByAddressResults = geocodeByAddressChoreo.run();
  
  // Print results
  println(geocodeByAddressResults.getLatitude());
  println(geocodeByAddressResults.getLongitude());
  println(geocodeByAddressResults.getResponse());
}

Now the output:

Image 10

So we have seen how easy it is to use a Choreo and run it on Processing.

Prebuilt IoT Apps that You Can Deploy Readily

Image 11

We have a large chunk of pre-bulit IoT apps that are production ready and easy to use.We can use any of those to deploy in our Samsung Artik.

Image 12

These are the options for pre-built IoT app available in Temboo.

The options are:

  1. Building Management
  2. Energy
  3. Environment
  4. Farming
  5. Logistics
  6. Manufacturing
  7. Smart Cities
  8. Water Management

The Workflow for Artik 10

Image 13

Let's break the flow:

  1. We need to power up the board attach the USB Cable and follow the steps mentioned in the Samsung Artik 10 to configure the board.
  2. As we are working on Windows machine and Artik 10 is running in Fedora Core, we have to communicate using putty.
  3. Create a Temboo account. Follow the prebuilt IoT apps to run the code.
    A catch: There is a great option in Temboo as after visual informations and following the steps, the entire code is converted to C language so we can add a combination of Choreos for our liking.
  4. Now there will be a zip file that we need to push to the Artik 10 board using putty.
  5. You are ready to go with your IoT app.

Let's Create a Choreo for Artik 10

When we go to dashboard, we will have to choose Samsung.

Image 14

When we click on Get started, it will take us to the page where we copy the library config file for our usage.

Image 15

In the next step, we put in our address so that Yahoo weather gives the weather condition and we will be ready with the code that we can deploy on Artik 10.

Image 16

The code as generated it's a C language code.

The header file and the c file:

C
/*
* IMPORTANT NOTE about TembooAccount.h
*
* TembooAccount.h contains your Temboo account information and must be included
* alongside main.c.
*/

#ifndef TEMBOOACCOUNT_H_
#define TEMBOOACCOUNT_H_

#define TEMBOO_ACCOUNT "abhigeek81"  // Your Temboo account name
#define TEMBOO_APP_KEY_NAME "myFirstApp"  // Your Temboo app name
#define TEMBOO_APP_KEY "XvaH06Qhpq9zAqDedc9UqsjMljvvu47b"  // Your Temboo app key

#endif /* TEMBOOACCOUNT_H_ */

/*
* The same TembooAccount.h file settings can be used for all of your Temboo programs.
* Keeping your account information in a separate file means you can share the
* main.c file without worrying that you forgot to delete your credentials.
*/
C
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>

#include <temboo.h>
#include <temboosession.h>
#include <temboonetworkclient.h>
#include "TembooAccount.h"

// SocketConnection is a struct containing data needed
// for communicating with the network interface
SocketConnection theSocket;

// There should only be one TembooSession per device. It represents
// the connection to Temboo
TembooSession theSession;

// Limit the number of times the Choreo is to be run. This avoids
// inadvertently using up your monthly Choreo limit
int currentRun = 0;
const int MAX_RUNS = 10;

// Defines a time in seconds for how long the Choreo
// has to complete before timing
const int CHOREO_TIMEOUT = 300;

// How long to wait between Choreo execution requests in seconds.
// Note that some services will block access if you
// hit them too frequently
const uint32_t choreoInterval = 30;
uint32_t lastChoreoRunTime = 0;

TembooError setup() {
  // We have to initialize the TembooSession struct exactly once.
  TembooError returnCode = TEMBOO_SUCCESS;

#ifndef USE_SSL
  returnCode = initTembooSession(
            &theSession, 
            TEMBOO_ACCOUNT, 
            TEMBOO_APP_KEY_NAME, 
            TEMBOO_APP_KEY, 
            &theSocket);
#else    
  printf("Enabling TLS...\n");
  returnCode = initTembooSessionSSL(
            &theSession, 
            TEMBOO_ACCOUNT, 
            TEMBOO_APP_KEY_NAME, 
            TEMBOO_APP_KEY, 
            &theSocket,
            "/opt/iothub/artik/temboo/temboo_artik_library/lib/temboo.pem",
            NULL);
#endif

  return returnCode;
}

// Call a Temboo Choreo
void runGetWeatherByAddress(TembooSession* session) {

  printf("\nRunning GetWeatherByAddress\n");

  // Initialize Choreo data structure
  TembooChoreo choreo;
  const char choreoName[] = "/Library/Yahoo/Weather/GetWeatherByAddress";
  initChoreo(&choreo, choreoName);

  // Set Choreo inputs
  ChoreoInput AddressIn;
  AddressIn.name = "Address";
  AddressIn.value = "kolkata";
  addChoreoInput(&choreo, &AddressIn);

  int returnCode = runChoreo(&choreo, session, CHOREO_TIMEOUT);
  if (returnCode != 0) {
    printf("runChoreo failed.  Error: %d\n", returnCode);
  }

  // Print the response received from Temboo
  while (tembooClientAvailable(session->connectionData)) {
    printf("%c", readChoreoResult(&choreo, session));
  }

  // When we're done, close the connection
  tembooClientStop(session->connectionData);
}

int main(void) {
  if (setup() != TEMBOO_SUCCESS) {
    return EXIT_FAILURE;
  }

  uint32_t now = time(NULL);
  lastChoreoRunTime = now - choreoInterval;

  while(currentRun < MAX_RUNS){
    now = time(NULL);
    if ((now - lastChoreoRunTime >= choreoInterval)){
      lastChoreoRunTime = now;
      currentRun++;
      runGetWeatherByAddress(&theSession);
    }

    usleep(1000);
  }

#ifdef USE_SSL
  // Free the SSL context and and set Temboo connections to no TLS
  endTembooSessionSSL(&theSession);
#endif

  return EXIT_SUCCESS;
}

Pushing the Code to Artik 10

Here, I prefered a VM/I created a Ubuntu VM 14.10 and downloaded the code on that os. We open a terminal to see where the download is as we have downloaded the code in the downloads folder.

Image 17

Now we have to do a secure copy of the file we have downloaded in Ubuntu os to the Artik 10 board. We get the IP of the Artik 10 board using ifconfig now we need to use scp command.

scp getweatheraddress.zip root@192.168.0.3:/hostname

Image 18

Put in the password root one and start copying the file. After success, you will see the file gets copied.

Image 19

We unzip the file:

[root@localhost ~]$ unzip getweatherbyaddress.zip

We compile the code at first.

[root@localhost ~]$ gcc -L/opt/iothub/artik/temboo/temboo_artik_library/lib 
-ltemboo -I/opt/iothub/artik/temboo/temboo_artik_library/include getweatherbyaddress.c 
-o getweatherbyaddress

Now we run it.

[root@localhost ~]$ ./getweatherbyaddress

The output from the board.

Image 20

Image 21

We will now recreate the water management system for industrial IoT.

Water Management System for Industrial IoT

Water management in big production houses or industry as it helps in saving lots and lot of water with proper usage. Water is very precious as it is very difficult to use and we need to do proper channelizing of water. At places, we see water is wasted and in some places, it is less. The basic problem is how we properly utilize the water resources. Proper planning of how to use water is essential. Using water as when it is required and don't waste it. IoT plays an important role in managing water resources and this Industrial IoT project is the replica of water management system as mentioned in Temboo.

Image 22

The header file is as follows:

C
/*
* IMPORTANT NOTE about TembooAccount.h
*
* TembooAccount.h contains your Temboo account information and must be included
* alongside main.c.
*/

#ifndef TEMBOOACCOUNT_H_
#define TEMBOOACCOUNT_H_

#define TEMBOO_ACCOUNT "abhigeek81"  // Your Temboo account name
#define TEMBOO_APP_KEY_NAME "WaterManagementApp"  // Your Temboo app name
#define TEMBOO_APP_KEY "9Vj52NWvhrMPWFsOA2UYUlpamVyPyqKf"  // Your Temboo app key

#endif /* TEMBOOACCOUNT_H_ */

/*
* The same TembooAccount.h file settings can be used for all of your Temboo programs.
* Keeping your account information in a separate file means you can share the
* main.c file without worrying that you forgot to delete your credentials.
*/

The main C file is as given below:

C
#define _BSD_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <temboo.h>
#include <temboosession.h>
#include <temboonetworkclient.h>
#include "TembooAccount.h"

#define HIGH 1
#define LOW 0
#define INPUT 1
#define OUTPUT 0

// SocketConnection is a user defined struct containing whatever
// data is needed for communicating with the network interface.
// In this demo, it is defind in demo.h and contains a socket handle.
SocketConnection theSocket;

// There should only be one TembooSession per device. It represents
// the connection to the Temboo system.
TembooSession theSession;

// Defines a time in seconds for how long the Choreo
// has to complete before timing
const int CHOREO_TIMEOUT = 300;

// Initialize a boolean to track the state of the pump
bool pumpStatus = false;

// Initialize a minimum water level threshold 
// (NOTE: our sensor values go up when the water goes down.
// This should be adjusted based on your sensor calibration)
const int triggerAlertThreshold = 2100;

// Initialize a water level threshold for the water pump to stop filling
const int pumpOffThreshold = 2030;

// Initialize Pins
const int waterLevelSensor = 2;
const int motorPin = 22;

// Initialize a variable to hold the sensorValue
int waterLevel = 0;

bool digitalPinMode(int pin, int dir) {
    FILE * fd;
    char fName[32];
    // Exporting the pin to be used
    if(( fd = fopen("/sys/class/gpio/export", "w")) == NULL) {
        printf("Error: unable to export pin\n");
        return false;
    }
    fprintf(fd, "%d\n", pin);
    fclose(fd);
    
    // Setting direction of the pin
    sprintf(fName, "/sys/class/gpio/gpio%d/direction", pin);
    if((fd = fopen(fName, "w")) == NULL) {
        printf("Error: can't open pin direction\n");
        return false;
    }
    if(dir == OUTPUT) {
        fprintf(fd, "out\n");
    } else {
        fprintf(fd, "in\n");
    }
    fclose(fd);
    return true;
}

int digitalRead(int pin) {
    FILE * fd;
    char fName[32];
    char val[2];
    
    // Open pin value file
    sprintf(fName, "/sys/class/gpio/gpio%d/value", pin);
    if((fd = fopen(fName, "r")) == NULL) {
        printf("Error: can't open pin value\n");
        return false;
    }
    fgets(val, 2, fd);
    fclose(fd);
    return atoi(val);
}

bool digitalWrite(int pin, int val) {
    FILE * fd;
    char fName[32];
    
    // Open value file
    sprintf(fName, "/sys/class/gpio/gpio%d/value", pin);
    if((fd = fopen(fName, "w")) == NULL) {
        printf("Error: can't open pin value\n");
        return false;
    }
    if(val == HIGH) {
        fprintf(fd, "1\n");
    } else {
        fprintf(fd, "0\n");
    }
    fclose(fd);
    return true;
}

int analogRead(int pin) {
    FILE * fd;
    char fName[64];
    char val[8];
    
    // Open value file
    sprintf(fName, "/sys/devices/12d10000.adc/iio:device0/in_voltage%d_raw", pin);
    if((fd = fopen(fName, "r")) == NULL) {
        printf("Error: can't open analog voltage value\n");
        return 0;
    }
    fgets(val, 8, fd);
    fclose(fd);
    return atoi(val);
}

TembooError setup() {
    
    // We have to initialize the TembooSession struct exactly once
    // The TEMBOO_ACCOUNT, TEMBOO_APP_KEY_NAME, and TEMBOO_APP_KEY
    // values are your Temboo account credentials.
    
    // We have to initialize the TembooSession struct exactly once.
    TembooError returnCode = TEMBOO_SUCCESS;
    
#ifndef USE_SSL
    returnCode = initTembooSession(
                                   &theSession,
                                   TEMBOO_ACCOUNT,
                                   TEMBOO_APP_KEY_NAME,
                                   TEMBOO_APP_KEY,
                                   &theSocket);
#else
    printf("Enabling TLS...\n");
    returnCode = initTembooSessionSSL(
                                      &theSession,
                                      TEMBOO_ACCOUNT,
                                      TEMBOO_APP_KEY_NAME,
                                      TEMBOO_APP_KEY,
                                      &theSocket,
                                      "/opt/iothub/artik/temboo/temboo_artik_library/
                                        lib/temboo.pem",
                                      NULL);
#endif
    
    digitalPinMode(motorPin, OUTPUT);
    
    return returnCode;
}

void runGetWeatherByAddress(TembooSession* session, char* msg) {
    // Initialize Choreo data structure
    TembooChoreo choreo;
    const char choreoName[] = "/Library/Yahoo/Weather/GetWeatherByAddress";
    initChoreo(&choreo, choreoName);
    
    // Set profile to use for execution
    // This profile contains input data for Address
    const char profileName[] = "ser";
    setChoreoProfile(&choreo, profileName);

    ChoreoInput TmbAppSrcIn;
    TmbAppSrcIn.name = "TmbAppSrc";
    TmbAppSrcIn.value = "WaterManagementApp";
    addChoreoInput(&choreo, &TmbAppSrcIn);
    
    // Output filter to get the forecast for tomorrow
    ChoreoOutput filterTomorrow;
    filterTomorrow.name = "tomorrow";
    filterTomorrow.xpath = "/rss/channel/item/yweather:forecast[2]/@text";
    filterTomorrow.variable = "Response";
    
    // Output filter to get the forecast for today
    ChoreoOutput filterToday;
    filterToday.name = "today";
    filterToday.xpath = "/rss/channel/item/yweather:forecast[1]/@text";
    filterToday.variable = "Response";
    
    addChoreoOutput(&choreo, &filterTomorrow);
    addChoreoOutput(&choreo, &filterToday);
    
    int returnCode = runChoreo(&choreo, session, CHOREO_TIMEOUT);
    if (returnCode == 0) {
        while (tembooClientAvailable(session->connectionData)) {
            char name[64];
            char value[64];
            memset(name, 0, sizeof(name));
            memset(value, 0, sizeof(value));
            
            choreoResultReadStringUntil(session->connectionData, name, sizeof(name), '\x1F');
            // Parsing the result and adding the forecast to the message being sent to the phone call
            if (0 == strcmp(name, "tomorrow")) {
                if (choreoResultReadStringUntil(session->connectionData, value, sizeof(value), '\x1E') == -1) {
                    printf("Error: char array is not large enough to store the string\n");
                } else {
                    strcat(msg, "Tomorrow's forecast is ");
                    strcat(msg, value);
                    strcat(msg,". ");
                }
            } else if (0 == strcmp(name, "today")) {
                if (choreoResultReadStringUntil(session->connectionData, 
                    value, sizeof(value), '\x1E') == -1) {
                    printf("Error: char array is not large enough to store the string\n");
                } else {
                    strcat(msg, "Today's forecast is ");
                    strcat(msg, value);
                    strcat(msg, ". ");
                }
            }
            else {
                choreoResultFind(session->connectionData, "\x1E");
            }
        }
    }
    
    // When we're done, close the connection
    tembooClientStop(session->connectionData);
}

void runCaptureTextToSpeechPromptChoreo(TembooSession* session) {
    // Create our message buffer. Make sure it is big enough to fit the full message
    char msg[256] = "Alert, your tank is running low.";
    
    runGetWeatherByAddress(session, msg);
    // Append the text for which button to press to turn on the pump
    strcat(msg, "Press 1 to turn on the pump.");
    
    // Initialize Choreo data structure
    TembooChoreo choreo;
    const char choreoName[] = "/Library/Nexmo/Voice/CaptureTextToSpeechPrompt";
    initChoreo(&choreo, choreoName);
    
    ChoreoInput TextIn;
    TextIn.name = "Text";
    TextIn.value = msg;
    addChoreoInput(&choreo, &TextIn);

    ChoreoInput TmbAppSrcIn;
    TmbAppSrcIn.name = "TmbAppSrc";
    TmbAppSrcIn.value = "WaterManagementApp";
    addChoreoInput(&choreo, &TmbAppSrcIn);
    
    // Set profile to use for execution
    // This profile contains input data for:
    // APIKey, APISecret, ByeText, MaxDigits, and To
    const char profileName[] = "abhishek22";
    setChoreoProfile(&choreo, profileName);

    int returnCode = runChoreo(&choreo, session, CHOREO_TIMEOUT);
    if (returnCode == 0) {
        while(tembooClientAvailable(session->connectionData)) {
            char nameString[64];
            char dataString[32];
            
            memset(nameString,0,sizeof(nameString));
            memset(dataString,0,sizeof(dataString));
            
            choreoResultReadStringUntil(session->connectionData, 
                                        nameString, sizeof(nameString), '\x1F');
            
            if(!strcmp(nameString, "Digits")) {
                if(choreoResultReadStringUntil(session->connectionData, 
                   dataString, sizeof(dataString), '\x1E') == -1) {
                    printf("Error: char array is not large enough to store the string\n");
                } else {
                    // If the number 1 is pressed on the phone keypad, turn on the pump
                    if(!strcmp(dataString, "1")){
                        digitalWrite(motorPin, HIGH);
                        // Set the motor state boolean to ON
                        pumpStatus = true;
                    }
                }
            } else {
                choreoResultFind(session->connectionData, "\x1E");
            }
        }
    }
    
    // When we're done, close the connection
    tembooClientStop(session->connectionData);
}

int main(void) {
    if (setup() != TEMBOO_SUCCESS) {
        return EXIT_FAILURE;
    }
    
    while(1){
        int i = 0;
        // Averaging the last 10 values to smooth the water level
        waterLevel = 0;
        for(i = 0; i <10; i++) {
             waterLevel = waterLevel + analogRead(waterLevelSensor);
        }
        waterLevel *= .1;
        
        printf("The water level is %i\n", waterLevel);
        
        // If water is above this value, make a call to see if the pump should be turned on
        if (waterLevel > triggerAlertThreshold && !pumpStatus){
            runCaptureTextToSpeechPromptChoreo(&theSession);
        }
        
        // If water level is below this value, turn the pump off
        if(waterLevel < pumpOffThreshold && pumpStatus) {
            digitalWrite(motorPin, LOW);
            pumpStatus = false;
        }
        
        usleep(5000);
    }
    
#ifdef USE_SSL
    // Free the SSL context and and set Temboo connections to no TLS
    endTembooSessionSSL(&theSession);
#endif
    
    return EXIT_SUCCESS;
}

The Water Resource Management Case Study

Let's start the process.

We did the experiment based on most water deficit places in California. Our Use case was for Bakersfield, California.

Now we had a scenario that we had to figure out when the water level is low and when the water pump will start.

The IoT system works this way it uses Yahoo weather Choreo and when the threshold value is less triggers an alert for checking the water level (which is done by water level indicator).

We have used Nexmo Chroreo to automatically generate the toggle switch from phone where 1 triggers the water pump one and 0 triggers it off.

Hardware required:

  1. Water level Sensor
  2. Water pump
  3. TP120 transistor
  4. Breadboard
  5. Samsung ARtik 10 Device
  6. Water Reservoir
  7. Water Tank

The setup:

Image 23

The water reservoir with water level sensor.

Image 24

After running the code in Artik 10 as the water level is empty reflects the values.

Image 25

Now with the help of Nexmo service will generate a phone call which triggers the option to switch on the water pump.

Image 26

As the water level changes, the level indicator also changes.

The pump starts working.

Image 27

The complete solution in action.

Image 28

Conclusion

We have seen how Artik 10 can be used as a solution for industrial IoT solution (though the simulation was basic). We have used the power of Temboo to full effect. The powerful capabilities of the Temboo Choreos and automatic generation of code in it helps us to do the solution very fast. We have also used Yahoo weather Choreo to full effect. Nexmo is used to make a phone call. You can play around with other choreos and select the ones ideal for your plant.

Points of Interest

Getting hold of Artik 10 board and using it was so fun and a good learning experience.

History

  • 4th August, 2016: Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
India India
I am into software Development for less than a year and i have participated in 2 contests here at Codeproject:-Intel App Innovation Contest 2012 and Windows Azure Developer Challenge and been finalist at App Innovation contest App Submission award winner as well won two spot prizes for Azure Developer Challenge.I am also a finalist at Intel Perceptual Challenge Stage 2 with 6 entries nominated.I also won 2nd prize for Ultrabook article contest from CodeProject
Link:-
http://www.codeproject.com/Articles/523105/Ultrabook-Development-My-Way

Microsoft MVA Fast Track Challenge Global Winner.
Ocutag App Challenge 2013 Finalist.

My work at Intel AppUp Store:-

UltraSensors:-
http://www.appup.com/app-details/ultrasensors
UltraKnowHow:-
http://www.appup.com/app-details/ultraknowhow

Comments and Discussions

 
PraiseNice article Pin
Suvendu Shekhar Giri8-Sep-16 20:54
professionalSuvendu Shekhar Giri8-Sep-16 20:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.