NoScript). To do this we will use esptool. Press J to jump to the feed. :$. Have you noticed any missed steps or are the numbers sane? To do this you need TTL converter + few additional components. This will be worth its weight in gold on my co2 laser cutter, If i wuld like to connect 4 flow sensor to raspberry pi what changes can be made to program. You can use instructions here or here :). Does It have I2C address. Im using your script for my flow meter, but I cant find the pulse frequence.> flow = (count / 7.5) # Pulse frequency (Hz) = 7.5Q, Q is flow rate in L/min. Working voltage range:DC 5-24 V https://github.com/Liamhanninen/WaterFlowMeter. Can u suggest some hints to me. Fill in name of the device, and click "add". In the end I really just need to port over what is happening in the Arduino code over to MicroPython to run on the Gpy. It works on Raspbian. This is the unique reference to this device and we need it later in our Python script to address notification. #publish.single("/Garden.Pi/WaterFlow", flow, hostname=MQTT_SERVER), Raspberry Pi per Solarzelle und Akku mit Strom versorgen, Lecture des tiquettes RFID RC522 de Raspberry Pi (NFC), How to build a ESP8266 Scale (with Weight Sensor HX711), How-To: Bluetooth Connection between ESP32s and Raspberry Pis, How to create a Solar Powered Raspberry Pi Bitcoin Miner, How to build a Smart Agriculture System using IoT. It means that file have been uploaded. I see that you are polling the GPIO for a state transition. Here you can connect your ESP to local WiFi network. Thumbs Up! And I as a true engineer undertook such a sensor to do. Will you be plugged into city utilities or have your own tank? It is powerful enough for running Domoticz server. You can test notification by clicking "Test". Do you know if this would be the same for all flow meter? As per the device's datasheet, the minimum working voltage for your sensor is 4.5 VDC, so I don't think it would work with it connected to 3.3 VDC. Your ESP now is connected to your WiFi network and ready. TL;DR: Looking for help getting a water flow rate sensor working on my Gpy/Expansion Board 3.1, new to MicroPython and struggling. First of all that is awesome! The advantage of using 1st way, is that it is more flexible. Seems like a good option since the flow processor will keep totalizing if your LoPy restarts. Thanks for doing all the difficult work for! Domoticz setup, Now that our server is ready, we can access it from any web browser, including from a tablet by entering the following URL: http://IP_domoticz:8080, Now that our server is ready, we can access it from any web browser, including from a tablet by entering the following URL: http://IP_domoticz:8080. Simplest - Python IDLE which is normally being installed with Python. When hardware is added the overview of all defined hardware will be shown. In our case to read our flood sensor we need to add so called "Dummy" hardware from the list of hardware. Notify me of follow-up comments by email. Go to this folder, launch command prompt there.Type: python esptool.exe --port COM5 erase_flash. These are: In order to be able to connect a hose, we need a so-called tap connector. If you water your beds, you definitely want to know how much water has flowed over time. I am guessing the solution has to do with RMT or something but I'm out of ideas. For example did they start providing inaccurate readings or just stop working/not return any value? Or is there a way I can test this? Ok, now we are ready for uploading the micropython scripts to ESP8266. 2.Use "Send notification with subject" message. If anyone is able to give me guidance in the right direction I would be greatly appreciated! Of course choose correct port. 2. We need this module to reduce voltage from the battery to the acceptable level for ESP8266. Ampy installed, for flashing your program, 4. Using the example of OpenHAB, this is particularly easy, since a lot is already included. Tried it with the pump on, but it starts building pressure, max, later on less flow, so not sure how I can fine tune this. There is no that much to say about this diagram. If everything is correct, you will see message " ESP successfully connected to XXXX network". https://bitbucket.org/pilotlt/floodsensor/src/mas Arduino Robotic Arm Controlled by Touch Interface, wifimgr.py - wifi manager for connecting to wifi network. Either way good luck with the build. Notifications can be send for example when a switch is pushed, electricity usage is too high,temperature to high and for many more options. Share it with us! This power module based on HT7333 chip, converts voltage to stable 3.3V for ESP8266. But there is an easier way :). After few seconds you should see empty command line. We need the tap connector for the flow meter, which we can best print ourselves: If you are using a different Raspberry Pi Water Flow Sensor, then pay attention to the description. This works for me on Windows machine perfectly. I wasn't able to find code for this that worked for me. This is a really useful way to monitor water usage in the RV I'm building. All that is needed for this is a persistence layer (database in which the values are stored). Polling a GPIO with Python seems pretty cumbersome but if it works then Whoohoo! So maybe that's rated for a much slower/less pressure water flow. Choose WiFi network you are going to use, type in password, hit "Submit". Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. Now we can proceed to assembling all parts together, according to the block diagram below. The ultrasound transmitter (trig pin) emits a high-frequency sound (40 kHz). By-the-way, before I retired, I reversed engineered many old circuits and modernize them with new circuit designs including micro-controllers and programming as well. We can query the Raspberry Pi Water Flow Sensor at any frequency (e.g. In our case notifications has to be send as soon as water was detected by the sensor. This is awesome and it's something I've been thinking about building for my aquaponic system. This module gives us 3.3V. Hardware can be disabled or deleted. This on below isn't mine, but it's ok to illustrate. This option supports sending notifications to Pushsafe and Pushover. Let's start from flashing our ESP8266 module. From my 15 years of experience as an medical engineer, I know that easiest way of detecting water is metal pins shorted by water. HT7333 3.3V MS Low Dropout Linear Regulator Power Supply modu. Probably why you're getting zeroes, because there's nothing on the output of the sensor. Select Setup|Hardware to add hardware. Only users with topic management privileges can see it. And what is a potentiometer? Than if conditions for triggering an event ( sending notification to you cell phone) is satisfied, Domoticz sends the notification. Dear @JSGora, did you find some solution for the flow water sensor? Love data! Actually you can use any other suitable power source. When you are choosing a battery keep in mind that ESP "eats" about 200mA whike connecting to WiFi network, and about 60mA is used when the board is uploading data to server. Also you will need an app on your cell phone or PC. it is possible to communicate with modules by using so called AT commands. Normally those modules comes with factory firmware. The GPy's pins can only receive an input of up to 3.3 VDC, so you will need a voltage divider prior to your input pin to bring the voltage down. Reply Very simple. Looks like your connection to Forum was lost, please wait while we try to reconnect. Vua lia! Had to add a potentiometer just so I could continuously calibrate these things. Next - this device is a part of "Smart home" system I am going to built :). Subscribe to Raspberry Pi Tutorials and don't miss any new Tutorial! That means 7.5Hz = 1L/min. I think I will try to use ESP-Now technology, which lets me connect several ESPs directly. As soon as it connected to WiFi it will connect to Domoticz server. I have a Gpy with expansion board V3.1. Depending on the project, you will be using a few other hardware parts. One line serves to switch the device on. I was able to modify this tutorial: https://core-electronics.com.au/tutorials/pycom/hc-sr04-ultrasonic-sensor-with-pycom-tutorial.html to receive back some data but it only reads values at a very low speed and then stops reporting at higher 'speed'. Before you can use the Domoticz application to control devices or read sensors you must setup the communication to hardware device(s). Domoticz server installed on Raspberry Pi (or common PC under Windows or Linux). Last but not least, it would be advisable to set the Python script to autostart so that it sends data regularly. Switch the power with S1 switch. I am using Pycharm / Atom or Anaconda Spyder On raspberry Pi, 5. Also note that in the Arduino example, the sensor is connected to 5V, which the Arduino can produce - GPy can't. What is mqtt? If it finds an object, it bounces back to the module. I have programmed the sensor to send alarms every 30s, if water was detected. You can choose icon to be shown on your display, sounds and so on. My desired output would be in L/min. MQTT is very suitable for this, as we can communicate via an interface. After clicking "Events" you can create your own event. I've also used these in my Raspi Smart Kegerator. I'm not sure if this is a limitation of the 3.3V or that I am headed down the wrong path with the code: I tried several versions of code reading DHT sensors with Time / Interrupts, but I had no success getting anything to report back from the flow sensor. But it doesn't mean that everything is lost :), just try second time, and you will succeed (again, from my experience). Obviously you need to run in your terminal : And that is it :) more or less. 2. The new hardware should be in the list and there should be a button "Create Virtual Sensors". I've only had one leak in my entire life time, and I didn't need any phone to tell me about it. I think in the next generation of this sensor there will a special button for testing battery charge. Love it! Exactly the kind of project I am able to try out as a new python learner. If you have the same converter as me, then by itself you need to change the switch to the "Prog" position. The sound travels through the air. USB to ESP8266 ESP-01 Wi-Fi Adapter Module w/ CH340G Driver. I have a novice understanding of Arduino but MicroPython is new to me. While I am sure your project accomplishes what you designed it to do, and it works like you planned using a micro-controller approach, a very simple two transistor circuit can work just as well and without any programming or daisy chaining of little PC assemblies. User will have to push a button, and the battery level will be shown. Corresponding lines are commented out in the code example above. every second) to determine how many litres flow through it per second or minute. The one used here had the following information: Accordingly, a part can be easily edited using tools such as Tinkercad. The principle of operation of the simplest sensors is that water has to short two (or more) metal pins, and as soon as it happens, alarm triggers. Press Esc to cancel. Load capacity:10 mA(DC 5V) This is really cool! Pololu mini pushbutton Power Switch Very interesting tiny board. Now we need to program "event" for our sensor. Implement battery level alarm. These flow meters are so cool. She was afraid that the hose in the boiler room can be leaky, and the water would flood the newly laid wooden floor. It let us switch the ESP module only when water is detected. Did you make this project? BorisV2, please don't take my common the wrong way. Do not forget - it's open source software.Ok, after several hours I found the solution. Press question mark to learn the rest of the keyboard shortcuts, https://github.com/Liamhanninen/WaterFlowMeter. If I read it using pulses_get I cam able to get occasional sets of data, but not consistently. So the idea is to use one ESP like a hub for connecting other ESPs. If you believe that you will check some check boxes and it will work, you are wrong :) It doesn't work in this way. EDIT: I added ingredients list to 'Stuff' section in the README.