Kanpur - A city of many resources but politically neglected

Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts

Tuesday, February 28, 2017

Home Automation using Raspberrypi - One of the most interesting application of IOT.

Home Automation using IOT 

Hello friends. Starting a new technical blog series on home automation using IOT (Internet of Things). And this time not something like which i had done a long time back i.e. control a AC appliance(refrigerator) using a SIM900 GPRS module, Arduino UNO and text SMS and later tested the same with HC-05 bluetooth module and an android application. This story started a long time back (almost 3.5 years back), when i started working with Rajeev on a remote basis and we were developing "some" home automation device - something like Wemo Switch from Belkin.  And no wonder, we were able to control the device. I lost the video though or other wise i would have uploaded it here. 

Wemo switch from Belkin
Side View of proposed device

front view of proposed device
How it look in actual
At that point of time, building such thing was more of your passion rather than building a startup out of it. You do a lot of research for sales, hardware and even take stupid decisions (like buy a electric imp device and then loose it somewhere, Rajeev was so angry!!!!). 

But now when you had some hold-on on the hardware, you understand things a bit more, you understand what a product which can be used by general public and users is, you can clearly differentiate the DIY and a "product". So what i am trying to write about here is a DIY project which probably only i will use but yes, i can feel that this will be useful for me. Now question is why am writing a blog on home-automation and why even i am doing this when a lot of people have done this earlier and my answer is "out of curiosity and to apply IOT in day-to-day life and make things easy " I am designing it for myself as i am planning to do some Agriculture / Hydroponics related stuff at my home and in that, i would require some thing like continuous monitoring and remote control and secondly sometime i become too much lazy that after reading a book, i don't want to get-up from the bed and turn the light "OFF".

Company where i presently work do continuous monitoring but that is what i call as "Product" because 100's of people use it on a daily basis and what i am trying to create here is more of my personal usage i.e. it will not be required to handle "x" amount of traffic, i will not write workers queues to manage different jobs, i will not optimise my Mysql performance, i will not use a time series DB, i will not use any kind of load balancing stuff here and not even two layer authentication for API's (yes when you work in a startup with guys like Rajeev - you know some stuff about web-designing also). 

So this time, i would create a small home automation using a combination of 
  1. RPI
  2. WiFi / Ethernet 
  3. Bluetooth
  4. A 5V 230 V relay, some other hardware 
  5. And an simple web / android application
I will try to go as much as detail in possible (there are many existing home automation projects in net and here is one of the link) and will push code to a  git repository . I will start first with controlling a AC appliance with RPI GPIO and later on i will try to make RPI as a hub and communicate to the other switched via Bluetooth or other communication options. I will try to do this systematically and will keep on adding the information here also.  In-fact i already started coding a bit for web-application and made a small web-page using MDL (Material Design Lite). Although the UI don't seems to be good, but i am working on it and will try to make it more aesthetically pleasing. 


A sample UI for the home automation project using MDL

I will divide this blog into some parts

1. Web-application
2. Hardware
3. Android Application - Will take help of my brother Ravi who is a Android Developer 
4. Complete set-up
5. Introducing bluetooth in the scene for making RPI as hub. 

Friday, November 27, 2015

Indoor Irrigation Project - Technical Blog

Indoor Irrigation Project - Use case of IOT(Internet of Things)


What when you are out of home on a long holiday or if you forgot to plant you trees from a long time and you love doing indoor and outdoor gardening but don’t have time to water  your plants due to busy schedule.At present IOT (Internet of things ) is one of the most interesting topics.Many companies are working on IOT to provide smart gardening solutions and  i can name some of them here. 
  1. Greenopia - They are developing smart pots for planting your trees as well as they provide online advice  for planting different trees. Based out of Bangalore, they raised money via crowd-funding and people all across country supported them. 
  2. Clickandgrow - Another smart gardening kit like greenopia. 
  3. Edyn - Earlier know as SoilIq, i saw their website almost 2.5 years back when their founders were explaining there product in some event and from then they had grown a lot. They provide solar powered solution for smart gardening coupled with their app.  
  4. Daisy  - A project hosted on Indiegogo for smart watering of plants. 
  5. Plantlink - A wireless soil moisture sensor coupled with a central coordinator for smart watering of plants. 
  6. Biptonics -   provide their smart router and cloud to which you can plug you own sensor or provide your own readings and manage your garden from a web-browser. 
  7. Botanicals - Smart gardening kit by sparkfun - https://www.sparkfun.com/products/10334
  8. Koubachi - A wifi based plant sensor which measure T, RH and Lux , determine the need of the plant and send notification based on them. 
  9. Cooking hacks open garden project - They had provided a excellent document on how to use their hardware along with software to make a smart indoor garden using Arduino. 
  10. Instructables for Indoor Gardening - A open source platform where people share their ideas and work . This section is devoted to Indoor gardening. 
  11. Click and Grow - A project based on Spark wifi module for smart gardening inside your house in a mobile garden. Interesting project. 
  12. Groove Ecosystem - A complete grow bed which provide you a indoor garden coupled with LED grow lights and a aquarium, connected via Wifi to a cloud server which provide you, your garden data in real time on a app. App has many features like you can get to know the health of your plants by taking a pic. 
  13. Niwaone - A similar kind of project like Groove.
What i am sharing here is a project which i did almost 2 years back on Indoor Gardening based on IOT - Internet of things. Internet of things let you access real time data from anywhere using internet. Data from the environment is sensed by the sensor , provided to the controller. Controller then transfer the same data to the cloud using any communication option like GPRS, Wifi, Bluetooth etc to the cloud server. From cloud server the same data can be published using Android application. 

I did this project  using bluetooth communication. I used open source hardware Arduino,  HC-05 bluetooth module, relay , soil moisture sensor, 16x2 LCD and a dc water pump to water the plant. Below are some of the components which i used. 


And below is the whole set-up which i did.



You can clearly see the LCD displaying the values of moisture of the soil. The readings of the Soil moisture sensor are send to the android application using bluetooth and depending on user , a DC motor can be turned ON or OFF. But this lead to a limitation of user interaction and that is why 2 modes were provided, fully autonomous mode, in which you can set up range, so that is moisture goes below the  range, DC pump will be turned ON automatically. 

Generally when dealing with the smart gardening or IOT based indoor gardening, there are basically 3 parameters which need to be monitored and measured. 
  1. Soil Moisture - This need to be calibrated by planting the sensor in dry soil and then measuring the sensor readings and then planting the sensor in wet-soil  .Depending on the readings we can provide water to the plant using a small water pump controlled by the Arduino via relay. 
         Soil moisture sensor à Arduino à Relay à Water Pump.
  1. Surrounding Temperature and Humidity - Surrounding T and RH play a major role. These parameters also need to be maintained. For  a DIY purpose DHT22 or DHT11 will work perfectly fine.   
  2. Lux  or light intensity  - This can be measure using ISL29023 sensor.
          ISL29023 flux sensor à Arduino à Relay à Florescent lamp.

 Here is a screenshot of the app which was developed by Ravi Kumar who is a friend of mine and a professional Android app developer. I am sharing git repo link for the code used in this project . 
https://github.com/shailendra0408/Indoor-Irrigation-Project-




 Below are 2 videos which demonstrate the working IIP project.