arduino lcd displays flow meter gpm and total free sample

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

arduino lcd displays flow meter gpm and total free sample

I had a go at tidying it up so I could follow it. In breaking it down the frequency looks confusing (2 things at 40 hz isn"t really 80hz), but I wanted to see flowrate = freq / 0.2 in the code. Overall I can"t see a mistake except for the divide by 2 giving a bad GPM output. The gallons should be OK.

But, this code is definitely the wrong approach, every second it stops watching what"s going through the pipes so that it can tally up the total so far. The code as shown in the pause isn"t enough to explain the 13% error but maybe there is more stuff in there we haven"t been shown.

You really just need to count the total number of pulses to get the total volume. And sample the frequency if you want a live readout of the flow rate.

Waterproof, heat resistance, pressure resistance, cold resistance. Easy to install. Flow range:10-200L/min Sensor:Hall effect Maximum current:15 mA(DC 5V) Working voltage range:DC 5-18 V Load capacity:≤10 mA(DC 5V) Operating Temp:up to 80C,Operating...

arduino lcd displays flow meter gpm and total free sample

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

arduino lcd displays flow meter gpm and total free sample

If you use interrupts to count the pulses then two pulses arriving at the same time will be handled sequentially. The interrupt flag indicating a pulse has arrived is set in hardware the moment the pulse arrives, and the CPU checks all the interrupt flags between instructions. Each flag is handled sequentially, the order determined by interrupt priority settings and a "natural" order determined by the internal wiring of the CPU.

However there is a better way on the ESP32, and that is the Pulse Counter peripheral. This is designed to count pulses like the signals from Hall Effect sensors.

You can just leave the Pulse Counter counting your pulses, then periodically read and reset the pulse count to see how much water has flowed in that period. It looks from the documentation that you can have two inputs both making the same counter increment, so it will do the aggregating for you.

arduino lcd displays flow meter gpm and total free sample

This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.

arduino lcd displays flow meter gpm and total free sample

I am a 66 year old farmer that believes that if it can be imagined then it can be done. Not letting my complete lack of programming knowledge stand in my way I have proceeded to incorporate/borrow portions of Arduino sketches from all over the internet (Github, Youtube and this forum) in my attempt to write a sketch that takes impulses from two G3/4 hall effects flow meters and adds their outputs together to come up with a gallons per acre value on a sprayer. I am very appreciative of the generosity of others and this whole open source concept.

Version one using both an Arduino Uno and a 2560 Mega with the same results, was with Adafruit 16x2 LCD with USB+Serial backpack (product 782) that worked. I test it by blowing into the two flow meters and the lcd shows GPA and GPM data. The 16x2 display shows the following when at rest: (sorry couldn"t upload picture)

Wanting to have more lines of data to show more variables from more sensors (amount remaining in tank, possibly time and mph) I switched to Adafruit standard 20x4 lcd (product198) with i2c/SPI backpack (product 292). The test sketch for the 20x4 with the i2c backpack (Hello World) works and I can move it around the lcd at will by changing setCursor (X, X) location. I have left it in the void setup but turned off (//) so I can make sure the 20x4 is still working. I also ran the setCursor sketch from the examples in the i2c library and after editing it to 20x4 it works, so I’m pretty sure my wiring is correct.

My problem is when I add to the sketch’s void loop for the flow meters I get a blank LCD. All my setCursor and lcd.print commands are ignored in my void loop. I have gotten a lot of help/advice from a friend who has some computer science background but we may have reached his limits of Arduino experience.

arduino lcd displays flow meter gpm and total free sample

remove the next two lines and just divide flowRate by 1000. You will now have the number of liters. You can then multiply by the price per liter. You may want to adjust the duration the measurement is done.

You most certainly can use an internal pullup on the Arduino to simplify the wiring but we use a physical resistor as it is much easier to explain the basics of how a pull-up resistor works when you have to connect the wires yourself.

– I would like to put a set point to stop water flow at a certain value. For example, valve opens, water flows and passes sensor. After 100ml, valve closes. Is it possible??? Sorry… , Arduino newbie