I'm going to showcase our upcoming product NeerAssure which helps in Water Statistics Management & Control with help of Intel Edison. For this instructable, I'd like to thank Digit Makers Lab & Intel for giving me an Intel IoT DevKit and the wonderful opportunity to present a prototype on the IoT Solution NeerAssure: Water Usage Statistics & Control. I'd like to discuss the Objective of this Project:
To Analyze Water usage of individual on a hourly/daily basis and predict the time for the tank refill and compute the true demand and consumption of water for an individual to an entire city. And from the collected data, What needs to be done is to run analytics on the data and look for usage patterns and predictive analytics for water consumption for next week.
This solves Water Scarcity problems and helps build a Smart City.
Step 1: Configuring Edison & Sensor for Arduino IDE
We need to configure the Edison before we can continue with the project. We can choose Yocto over Ubilinux because it supports Arduino IDE. For that we can refer various instructables or Intel Communities which guide how to connect with the board.
After setting up Edison, Test the Arduino IDE connection running the example sketches for LED blink & WiFi Connectivity.
Since this is a prototype, We'll be using HC-SR04 Ultrasonic Sensor for Water Level Detection and logging the data on the Cloud. Ultrasonic Sensor works well with the Arduino IDE and Edison does not has supporting libraries for NodeJS & Python etc. Hence Yocto is the Suitable choice for the OS.
Step 2: Configure Xively Account
Sign Up as a Developer for Personal Account and create a Device For Device Connectivity.
Create a channel Named WaterLevel as shown in the Picture. We can create several channel as temperature, humidity etc and log various sensor data. Give a proper Description with units of Measurement.
Generate API Keys for READ,UPDATE,CREATE permissions. After we have API KEYS, FEED ID, We're all set to GO!!!
Step 3: System Connections & Set Up
Connect the Wires of the Sensor as Specified in the Sketch. Then Connect Edison with the PC using Power cable for Virtual COM Port to work with Arduino IDE. Update/Install Intel Boards Support in the IDE using the Boards Manager.
Working: The Ultrasonic Sensor gets the distance between the sensor & level
of water. As we already know the water tank specifications we can calculate the volume of water remaining in it.The Sensor is accurate for 2~4 meters of distance.
We can change the API KEY & Feed Id to suite our requirements.
Upload the Sketch & see the logging of sensor data on your Xively Dashboard.
You've Successfully Set up the Xively Cloud Connection with the Intel Edison Board for Sensor Data Collection.
Step 4: IoT: 'i' Is for Intelligence
Now Wait..! You thought the project is Over! Well there's more...
This was just Sensor Integration with the Cloud.. Thats Not what IoT is all About...
This becomes an IoT Prototype when we build Intelligence on Top of the System otherwise this is just another one of the embedded systems projects.
Before building Intelligent IoT solutions over the existing system we test how its behaving.
Lets check that first. We use either use browser or Postman App.
For Browser: Hit https://api.xively.com/v2/feeds/1979039415
For Postman App:use API KEY as shown in the Picture.
For more help, Check Out: http://xively.github.io/xively-js/tutorial/
Step 5: Solution As an Application: Twitter Bot
To build this Project an IoT solution, We can come up with different ideas like:
- Twitter Bot
- Mobile or Web App
- Automatic Motor-Pump Starter, & many more
We can choose Twitter Bot as it is easier & Faster to build.
Get the CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN_KEY, ACCESS_TOKEN_SECRET for the Twitter App and choose one Development Environment like Python or Node JS.
Deploy the Python or NodeJS app to Heroku Cloud Sever or Openshift Cloud which tweets whenever there is a depletion in the water level of the Water Tank (For Now! Until we integrate the Predictive Analytics after enough data aggregation).
Check the Attached File.
This was just an example prototype for Building an IoT solution. I'll keep you all posted on further enhancements like sensor addition and different Solutions as IFTTT etc. Please share your thoughts on how to simplify or enhance the Solution or if you have any queries regarding this prototype please comment!
For more Details, Check Out: www.NeerAssure.com