Add the following snippet to your HTML:. Read up about this project on. This project creates a way to monitor water usage, to reduce water costs. I admit to being a tiny bit obsessed with monitoring utility bills and gathering data on my usage patterns blow-by-blow.
The energy monitoring has reduced my electricity bills, so I wanted to have a go at the water usage. Granted, a lot of the water bill is fixed supply costs and sewerage charges, which I can't do much about. I have finally gotten a chance to put them to good use interfacing with my mechanical water meter.
The water meter has a spinning permanent magnet and in principle this can trigger a reed switch and generate pulses for accumulation by the RTC.
As a processor board I am using the Sparkfun Blynk development board. It not only has an i2c port, but also sports a well placed pad to solder the deepsleep enabling resistor between GPIO16 and Reset pins. You can see this connection illustrated with a Nodemcu below. The deepsleep is super important in this battery operated set-up to conserve power. The duty cycle is pretty low. More details on the code here.
I nypro locations acquired a while ago at the markets in Salmanca and did not quite live up to the task of powering a phone and had horrible soldering on the switches and USB connectors which had all but broken off.
Surprisingly, the lipo still had charge, and the solar cell did an okay job keeping it topped up. It actually has a nice lipo charger circuit which deals with the variable output from the solar cell without too much fuss, and a boost converter to supply 5V for phone charging. I by-passed the boost for added efficiency and soldered directly to the lipo, and the USB connector for the boost port was broken anyway. Since the unit will be operating outside without proximity to power for extended periods of time I wanted to make it solar powered.
Surprisingly the lipo still had charge and the solar cell did an okay job keeping it topped up. I by-passed the boost for added effciency and soldered directly to the lipo, and the USB connector for the boost port was broken anyway. To count pulses I made up a probe with a simple reed switch from Jaycar encapsulated in a bit of heat shrink. Putting some hot-glue on it before heat shrinking makes a nice weather tight sealed probe which slots into the meter. To host the data and visualize the water usage I wanted to try something new.
So I decided to give setting up a custom Blynk server a go. I have plenty of experience with AWS, so I spun it up on a t2.IoT Water Meter with ESP32 - Full Tutorial and Code
The Blynk app on Android can authenticate against this instance of Blynk server and push applications and fetch data. Since I have this tiny server all to myself, I can choose very high frequency updates or very low in this case.
Data shows up on the Blynk app as a time series without any hitch and I can clearly spot the 3 family showers and a dish washing session, with me being guilty of the longest shower. Oh well, at least we have a baseline to improve on. The only remaining concern is that the meter reader considers that I am tampering with the meter like this guy who hid a magnet in a wheelie bin.
Better contact SA Water proactively and plead my innocence. This might also have other uses such as leak detection in farms. In the future, I am looking at using a hall-effect latching sensor to do high flow rate measurements. It will require 3-wires and draw a few more microamps than the Normally-open reed switch, but I think I can live with that.
Log in Sign up. Tisham Dhar. Intermediate Showcase no instructions 2 hours 1, Things used in this project.Motivation : In a house or building it is very important to regularly analyze the consumption of water and thus take action, avoiding unnecessary costs.
In this project, the monitoring can be done locally or remotely, this way you can generate alerts programmatically in order to warn the administrator about an over-consumption in any part of a building. All data generated is sent and registered in both a local "web server" as a remote database Emoncms or Thingspeak.
It is then displayed in a Web page and transmitted to IoT platforms. Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson. I prefer this one. All the code was developed in the Arduino IDE.
And that's it for a start, so the next step is to program the nodemcu control of the litres passing in the flowmeter. I did 3 examples that I will show in the next steps, but I will only show the code for the first one. The access to the webserver can be done inside the network or from outside, requiring the corresponding setup of the Wi-Fi router. The code for this example can be obtained by replacing the URL in example 1, with the one from the input API of emoncms.
On one hand that makes the software more modular, on the other hand we can have the possibility of storing html pages in NodeMcu memory, that can be called anytime on the code. The NodeMcu sent random stack errors, sometimes by failing to connect to the wifi network, or by using the function attachInterrupt. Although I'm a bit better at coding than electronics no knowledge at all :PI kept reading about this issues on the web, but no luck.
I used 3 units of NodeMcu 2 different modelsto check if the errors were coming from a faulty one, but it didn't make any difference. Great content sir. Can you please provide me the modified code for step 4 example 3 thingspeak only? Question 9 months ago. Question 11 months ago on Introduction. Hello, Great project, I am working on an IOT project that would communicate water purity and flow to think speak so we know when our customers need service.
My question is would my mobile phone hot spot cause connectivity issues.Microcontroller Tutorials.
ESP8266 Community Forum
How do you measure the volume of a liquid? There are a couple or so ways to do it. One technique is by determining the level of the liquid in a container with a known cross-sectional area.
For level measurements, an ultrasonic sensor is useful. Another technique is to use a water flow meter. Hall-effect, in general, is the presence of a transverse voltage on a current-carrying conductor with a nearby magnetic field.
A voltage exists because the magnetic field tends to push or pull the charges depending on the polarity of the magnetic field to one side of the conductor.
If one side of the conductor is more negative than the other, then a potential difference exists and thus voltage arises. A hall-effect sensor uses this principle to detect the presence of a magnetic field. Hall-effect sensors produce a voltage that is proportional to the strength of the nearby magnetic field. These sensors look like normal transistors:. What is the role of hall-effect sensors in flow meters? The flow meter featured in this tutorial contains a fixed-position hall-effect sensor and a magnet on one of the teeth of the turbine.
As the turbine rotates with water entering, the magnet comes into close proximity to the hall-effect sensor. A series of pulses is then read from the hall-effect sensor whose frequency is analog to the rotation of the turbine. This water flow sensor needs a 6 mm hose attached to its ends. Other models have larger inlet diameters. Note that water flow sensors work best with the help of gravity. Thus, the sensor must be installed vertically so that water flows from top to bottom.
Notable on the list is the water flow range that this sensor can detect which is from 0. Another important information is that 1 liter of water takes around pulses. This figure will be useful in building our Arduino water flow meter. Since the flow sensor generates a pulse every time the magnet aligns with the hall effect sensor, we can use this pulse as an interrupt trigger. We attach the OUT pin of the water flow sensor to pin 2 of the Arduino which is interrupt pin 0.
Then, on the interrupt service routine, we sum up the pulses and divide that sum to The volume of water is now known.
WATER SUPPLY ALERT & MONITORING SYSTEM #Blynk
However, we also want to know the water flow rate, not just the accumulated volume of water. We know that 1 liter of water is equal to pulses.
All we need to do is determine the time between pulses using the millis function. The water flow rate would then be:. On the same ISR, we attached another interrupt to capture the time when the pulse ends.
The second ISR:.We are a strong Community of developers, hackers, and visionaries. No, seriously, we are! Flow meter. So you're a Noob? Post your questions here until you graduate! Don't be shy. Flow meter I got the code to work with a nano but when I attempt to upload to a nodemcu I am not getting any measurements.
I have the power attached to Vin, ground to ground and the data wire to D2. In the serial monitor it just repeats "Flow rate: 0. Connect Vcc and Gnd of sensor to arduino, and the signal line to arduino digital pin 2. The 10 multiplier gives us 1 decimal place. Last edited by Mwawrzyniec on Fri Mar 02, am, edited 1 time in total. Re: Flow meter Options 6 posts Page 1 of 2 12 Next 6 posts Page 1 of 2.
Return to Newbie Corner. Who is online. No one use those base on esp? They are super c[…]. Hello everyone, It's first time project with ESP8[…]. Exactly the same question has been previously po[…]. I've been reading up on this as well. From what I'[…]. Hello guys! This is a question about the LwIP variants that ar[…]. Thanks for your quick response! Ok I rebuild ever[…]. Hello, I'm having the same problem. I'm using a […]. Since the fans are getting 12 volts all the time, […].It is Very simple to Measure the water or liquid flow by using water flow sensor YF-S with Arduino, this Article describes about the water flow sensor and How the water flow sensor works then how to interface water flow sensor with Arduino.
To take control on volume we need to measure, water is essential to every thing, here this article helps you to built water flow meter to measure the volume of water flow through pipelines. This water flow sensor has only three wires and it can be easily interfaced between any microcontroller and Arduino board. I suggest the following : 1.
Declare two variables: flowRateNew and flowRateOld 2. Measure the flow rate and put the value in flowRateNew 3. If flowRateNew is different from flowRateOld, report result 4. Just calculate average velocity by dividing the flow by the transectional area based on the internal diameter of the tube. Thank you very much. I would like to know when I connect 2 water flow sensors as digital pin 2 and 3, how is code changes?
Thank you in advance. I get an interesting effect when I have two flow sensors configured in software i. I have pin D1 and D5 on my Wemos setup as interrupts. So I have setup my software to read two separate physical flow meters. However when I have only 1 physically connected flow meter say to pin D1 is actually setup the software still processes interrupts i. D5 even though D5 has no physically connected flow sensor…only D1 has.
When I do connected one to D5 so now I have one flow meter on D1 and another on D5 all is normal and it process interrupt pulses correctly. Can you explain why this may be the case?
Can i use it to know is there water in pipeline. I will set time after it pump runs if there is water, pump continue to run otherwise pump stops. Would someone advise how to prevent electromagnetic interference to affect the water sensor with hall effect. I have some DC pump and UV lightsource at some inches away. And the pulse signals when pumping water is not showing repeatability.
Your code compiles OK, but when I run it I just get the following scrolling on the print monitor.
This device can be used as water leakage system by using two water flow sensors. We can also control any external appliances like Pump from anywhere over the internet. In this project we have used Blynk App.
Blynk is application which provides us dashboard as well as connectivity. Did you use this instructable in your classroom? Add a Teacher Note to share how you incorporated it into your lesson. NOTE - For this project energy points are required make sure you have enough energy points.
On new account Blynk gives free energy points. Encore une proposition de projet instructables qui ne se compile pas! Quel plaisir avez vous de partager des projets qui n'aboutissent pas. Question 2 months ago on Step 4. Reply 11 months ago.
Flowmeter NodeMcu Counting Litres
I will suggest if you re-make it without blynk. You can use MIT App inventor for replacing blynk. Reply 2 years ago. You can install local server on raspberry pi to get unlimited free energy. Most useful feature of this project is push notification on water supply. More by the author:. Add Teacher Note. Download And install Blynk app.
Many thanks to Mr. Did you make this project? Share it with us! I Made It!
Embed Tinkercad Designs in Instructables by bekathwia in Websites. Reply Upvote. Answer Upvote. Has your tinyurl link changed? I'm not having any luck getting your code.
WasanS2 somurina Reply 11 months ago. Same me before I can comoly ,but now can"t to comply. I don't know why. Explain to me please. Excellent project bro. I stopped liking blynk after they start this energy point stuff.Internet of Things yang bisa disebut dengan IoT menjadi bagian yang penting dalam kemajuan teknologi. Contohnya adalah dengan mengirimkan data penggunaan air dari sensor ke cloud sehingga bisa dengan mudah melihat hasilnya. Untuk mengirimkan data penggunaan air dari sensor ke cloud maka dibutuhkan internet.
Sehingga jika berbicara tentang IoT maka kira berbicara tidak terlepas dari 2 hal, yaitu: sensor dan internet. Setelah power dinyalakan, sistem akan mendeteksi ketersediaan koneksi WiFi dengan konfigurasi yang sebelumnya sudah dimasukkan ke dalam program. Lampu LED Indicator akan menyala lihat lampiran di bawah jika ada air melewati sensor yang dilanjutkan dengan pengiriman data ke cloud. Air yang melewati sensor akan menggerakan rotor menyebabkan adanya perputaran.
Sensor ini, setiap liter air yang dialirkan per menit mengeluarkan kurang lebih 4. Mengubungkan water flow sensor dengan NodeMCU membutuhan 3 kabel yang berasal dari sensor, yaitu:. Hello, maybe you can help me, please I need to measure the flow with the same sensor and nodeMCU, but I need to receive the data by serial monitor, I have tried several methods but I have not obtained any results, maybe you can help me?
I am getting the flow on the Serial Monitor but i wanted date and time stamp along with the flow inputs. Can i get the sketch to have Date and time included? Also on to which cloud http is the data sending, where do I specify the same?
Kalibrasi didapatkan dari percobaan sebelumnya, jika dirasa sudah pas maka diambil angka tersebut. How can I resolve this error?? Halo, mungkin Anda bisa membantu saya, tolong saya perlu mengukur aliran dengan sensor yang sama dan simpul MCU, tapi saya perlu menerima data dengan monitor serial, saya sudah mencoba beberapa metode tetapi saya belum mendapatkan hasil apa pun, mungkin saya bisa membantu?
Skip to content. Instantly share code, notes, and snippets. MD Last active Feb 24, Code Revisions 4 Stars 7 Forks 3. Embed What would you like to do? Embed Embed this gist in your website. Share Copy sharable link for this gist. Learn more about clone URLs. Download ZIP. The 10 multiplier gives us 1 decimal place. This comment has been minimized.
Sign in to view. Copy link Quote reply. Sign up for free to join this conversation on GitHub.
Building an Arduino Water Flow Meter
Already have an account? Sign in to comment. You signed in with another tab or window.