Inspiration

Water will be running out by 2050. The time has come when one has to do something to save the elixir of life - water. I hope I can somehow contribute to saving water.

Tough times create strong men, strong men create easy times, easy times create weak men, weak men create tough times.

Our ancestors went through the tough phase and discovered how important water is for survival, but we are now not looking to conserve this precious resource. We are depleting this non-renewable resource at such a fast pace that future generations will be again doing the hard work to conserve water. So, through this project, we tried to do our best to conserve 2,000,000,000 liters of water annually which was wasted by the overflowing water tanks, so that mankind can cherish this beautiful resource for eternity.

Mankind has to understand that every person on this planet needs water to survive. As of now, there is no meaning of creating a crypto-app, another amazon, Microsoft or Flipkart because if there will be no water left on the planet all these things will be of no use. And I have managed to make a project which does the same most efficiently and elegantly possible.

Post-2000, there has been a couple of decades of magnificent technological advancements, developments & progress. From sending an SMS to Metaverse we have evolved a lot. Undoubtedly, all this has been for the benefit of mankind but everything comes with a cost. So, this development did cost us the immense exploitation of natural resources. This is the correct time that a proper project for water management should come.

But I got to know that there were a few projects which were using some sensors. So, I thought of making a project which should not only be 100% unique but will also be using concepts like Machine Learning, Iterative Dichotomizer 3 Internet of Thing & Cloud Computing. And that project will be accompanying modern elegant website, robot & few other utilities. This is how I got inspired to make this project.

What it does

It is the possibly best solution for water management. It can be installed either in water storage facilities, water tanks at our homes, and anywhere where there is a problem of overflowing water facilities. This is a project which will be equipped with modern technologies and can be used by even poor people. It can be installed either in a commercial setting or individually.

For this project, I will be demonstrating for the whole water supply chain ie from the water source (eg dam, water facility) to water tanks in our home. 3 water tanks will be there in the project and the following will be the project flow:

  1. The initial water tank will be representing Dams (water storages), the second represents the nearest water storage from our homes while the last one represents the water tanks at our home.

  2. The first two tanks will be connected with a 12V solenoid valve. Whenever the project setup will be turned on the solenoid valve will be turned on. So, the water content will be transferred to the second tank.

  3. Whenever the water content in the second tank will reach the brim then the SOLENOID valve will be turned off. Now water will reach our home tank through a DC-powered motor.

  4. Now comes the most interesting part of the project. As the water in the third tank starts getting filled then the ML model will gather dynamic data points through PYTHON & will make a decision tree model. So, that ID3 model output will drive the NODEMCU-based robot and thus the robot will make a decision on its own that where it has to go in the end user's house.

  5. The robot will itself deploy in such a fashion that it will reach the user when the water tank will be about to fill. So, the user can switch off the water tank by clicking on a button placed on the robot. Also, in the entire project cycle, the end-user will be receiving Whatsapp updates regarding every major step in the process (due to the Twilio service)

So, in this fashion by the use of ML, IoT, serial communication between Nodemcu based robots, integration of 30+ electrical sensors I will make a project which will not only be the coolest but also will be the most helpful for our generation.

Don't forget a beautiful website will be also provided to every user. A dynamic cloud dashboard for controlling the IoT device will also be provided. Last but not the least, voice controlling commands can also be provided. All of this will be achieved by not using any 03rd party integrations/services.

How I built it

Sensors Used With Arduino 5V Relay, I2C LCD, Arduino Uno R3, 9V Battery, Bolt Wi-fi Module(in our case), IRF540 MOSFET, Water Flow Sensor, Ultrasonic Sensor X 2, 1N4007, Rectifier Diode, 12V DC Solenoid Valve, Water Lifting Submersible Pump, 4-way Capacitive Touch Switch Module, 3-6 V Mini Micro Submersible Water Pump

Sensors Used With ESP8266 (Nodemcu v1.0) Nodemcu, Piezo Buzzer, IR Sensor X 2, DC Motors X 2, 12V DC Adapter, TCS3200 Color Sensor, Capacitive Touch Sensor, ESP8266 Motor, Driver Shield, Analog Multiplexer IC – CD4051

One can break down my project into two major parts. One is the immobile Arduino and the mobile NodeMCU based robot. I will discuss the functioning of each of both sections:

Arduino One major aspect of the Arduino setup is that I have to make the Arduino and the python program communicate with each other. I have to do this as WiFi Module (Bolt's wi-fi module in our case) can understand Python language, not Arduino’s language. So I have to make the Arduino pass some certain keywords to the Python program and then the Python program will act accordingly. For this, I used serial communication through the COM port. This was a tricky part as the Arduino has to pass about 6 parameters to the python program and then the python program has to proceed accordingly.

To make the passed variable understandable to the python code, I used the decode and strip methods. In this case, the decode() method converts the string from UTF-8 encoding to binary encoding. Another problem after using this decoding method was that say for example the passed variable was “stop” then the decode method will append some escape sequences to the variable and now the variable will look like “stop/n/r”. To remove the extra escape sequences and also not affect the binary encoding, I used the strip method as it removes any spaces or specified characters at the start and end of a string. This solved the problem of inter-communication between Arduino and python code.

Nodemcu Based Robot The first work for the robot is to fetch the place attribute so that it can find the place where it has to go. Once the robot fetches that value then the TCS3200 color sensor comes into the picture. Basically in the dataset, there are 03 values for place attributes which are balcony, bedroom, and hall. From the starting point of the robot to the final destination, I had laid down 03 different colored lines so that the color sensor will follow a particular colored line after getting the predicted value.

I am laying out a table that tells the working of each file:

  1. robot.no: Catch the users’ input & reach the predicted place
  2. Arduino.no: Serial comm with python & data collection

The above-listed Arduino files are for Arduino and NodeMCU respectively. The below-listed files are python files that do the manipulation with the dataset and then upload/fetch the same via Integromat.

  1. attribute.py: Gathers values for the data points to be pushed in the ID3 algorithm
  2. credentials.py: Stores API keys, SSIDs, authentication variables 3.integromat.py: Retrieval of information from Integromat’s scenarios
  3. prediction.py: Collect the attributes and uses the ML algorithm to predict the place
  4. project.py: Main file which ensures smooth functioning of the project

Challenges I ran into

  1. Using the multiplexer IC with the motor driver shield was also quite a bit of a challenge as the CD4051 multiplexer IC is a 03 select line-based (S0, S1, and S2) multiplexer. This means that I can insert 2^3 = 8 analog sensors with this IC and use the single port i.e. A0 of the NodeMCU to read all 8 values. But in my case, I used only 2 IR sensors which means I don’t know what I have to do with the third select pins? In many attempts, the third select line was giving random values which I did not even need. After some trials, I got to know that the third select line must be provided a voltage of 0 so that the pin should not float.

  2. While using the Integromat scenarios, I was not sure how to create a scenario and how to integrate it into our programming? I have used 6 scenarios for the project which includes various CRUD operations. It was challenging to get the response in the Nodemcu because the response there comes in a format that needs to be separate as per our needs. So, it was good to deliver the working scenarios.

Accomplishments that I am proud of

  1. As already mentioned in the starting that I will be creating 4 custom options for the project and I did that. I have created the website, incorporated the capacitive touch sensor, automated the voice control thing, and created the cloud dashboard.

  2. This is a project which can be deployed in the market as it is almost optimized. It is also cost-efficient as the whole hardware setup costs around $130. As in the real world, the magnitude of the sensors will be increased, so that the cost will only reach up to $300 (which is a quite remarkable feat).

  3. I have magnificently solved an old-age problem of water management by incorporating about 30 electrical components together and making a project which can be either used by a single person or by the entire community.

  4. I have made all the videos and the images for the project on our own. This one is also special because this was an area out of our expertise and I am sure that the videos and the images bring the best out of the project. The hard work of our team rightly reflects in each of the project's components i.e. website, software, and hardware configurations, and the actual working of the project.

NOTE

For each major step in the processing, the user must be intimated regarding the same. The user will receive notifications when the motor will be turned ON, how much time to fill it will take, what are the 04 options through which the user can turn it OFF and when the motor will be turned OFF (either automatically or through the user's input). A total of 04 WhatsApp updates will be posted on the user’s registered number. But what if there is no Internet connectivity with the user? Then, in this case, 04 normal text SMS will be also sent which makes the project more relatable to the real world. All these notifications-related work is done through TWILIO'S API.

What I learned

In a given frame of time, how the problem should be broken down? In the last 1 and a half days, I coded the website, rectified the major portion of CPP (Arduino coding) and thus I rightly managed our time. I shaped my thoughts into reality and am sure that this project can be launched into the market to cater to the needs of many people.

Talking about the technical part, I learned how to make a beautiful fully functional website and also got to know about the hosting services. Starting from the cloud I got to know about CRON jobs and many other things which helped us make an automated project.

What's next for Water Rangers

As this project will be directly accessible to the users, I am trying to add a feature in the website through which the user can contact us and therefore I can make the proper arrangements for setting up the hardware as per the user's needs.

Share this project:

Updates