Im trying to find a project that meters a specific water volume. Ive found a few projects similar but nothing specifically for what i need. Im using a uno (prefer to use uno but any arduino board is acceptable.) A Hadronix 1/4 Quick-Connect Food-Grade Water Flow Meter Hall Sensor HDRX-YF-S402B and a Water Pump Mini 12V DC 6W brushless 2L/Min pump. I have to dispense a specific volume of water into growlers so im unable to use a water level sensor due to the small mouth of the bottle. Id like to be able to just push a button and dispense approx 50oz into the jar then automatically shut off. It seems like a simple project but im having a hard time finding one. There has to be one but ive had no luck so far. Any help directing me to a project that would work would be greatly appreciated!
Welcome to the Arduino forum. That sounds like a fun project that should be right in line with what an Arduino can do.
But,will your pump not allow any liquid to pass unless it is active? What have you tried and what are the results? Have you calibrated the pump to the volume you desire? Do you have a data sheet for the pump that details the electrical connections and other parameters? What are you using to power the project?
Paul
Thank you! i appreciate the warm welcome. I'm not that knowledgeable when it comes to transistors, which is what most schematics call for. I scrap electronics and have a whole bag of transistors but cross referencing which ones they call for in the wiring diagram, against the ones i have, can get confusing due to all the varying manufacturer labeling and lack of sufficient cross reference/substitution guides. So instead I've just been connecting the pump to a 12v wall adapter with a 12v toggle switch and then using the uno wired only to the flow meter, which rests right on top of the mouth of the jar so none of the measured water gets trapped in the tubing. I just wait until the desired reading prints out in the serial monitor, then shut off the pump manually. This makes it difficult to consistently dispense the same volume of 50 fluid ounces in each bottle. I need the water volume to be a constant so it doesn't throw off the ratio of water to the other ingredients I add to each bottle. Normally that little inconstancy wouldn't be an issue, but im experimenting to perfect my recipe, so i need to control my variables as much as possible especially because each test batch is so small, even a small variance of water quantity results in a significant percentage of the total volume of the 64oz bottle. As far as the calibration of the flow meter, i was having a rough time getting the code conversion right to read out 50oz on the monitor so i just measured 50 fluid ounces, pumped it all through the flow meter, then used that read out as the equivalency. Yes, no water flows through while the pump is off because i have my water reservoir in a bucket on the ground and my bottles are on my countertop. when i get the reading i want from the flow sensor and shut off the pump, gravity keeps any more water from flowing through the flow meter. I wasn't provided or able to find any data sheet for the pump. Its just a generic pump, so the only parameters i have to work with, are what vendor had listed. Its P/N is listed as Walfront uohcsbz379 and specifications listed are
Specifications:
Max. Input Voltage: 12V DC
Max. Input Current: 500mA
Max. Power: 6W
Fluid Temperature: 32~149℉(0~65℃)
Flow: 2L/min
Wire Length: About 50cm/19.7in
Wiring: Red(+); Black(-)
Noise: ≤35dba
Fluid: Water
Inlet Diameter: About 9.8mm/0.4in
Outlet Diameter: About 6.8mm/0.3in
Weight: 64g(approx.)
There is a swag of flowmeter examples around. Since you just want quantity, there is no need to worry about rates, and you are just counting pulses. Your problem is you omit the only bit of information that really counts - pulses per litre. This is usually marked on the side of the body, and is rather more noteworthy than the colour of the wire. For all that, I'm not so sure this a good way to get the accuracy you appear to need. Having a pump fill a fixed volume for subsequent discharge, or some optical device would likely be more in order.
https://www.rkebera.com/index.php?main_page=product_info&products_id=177862
the info does not state pulses per volume.
I've not used these but I would not expect a very accurate result for small quantities.
Yea the lack of pulse rate is where i got stuck and had to resort to using a flow meter. I kinda worded it wrong in the last post. Its not so much accuracy to a predetermined volume as it is having equal water volume dispensed in each growler. As long as i can get my equivalency serial value, i can input that reading into the code instead of trying to program and calibrate. I would even be able to use the 2 liter per minute to calculate a timed dispense. like if i wanted to dispense 2 liters of water i could set the pump to turn on for exactly one minute. So converting that parameter to oz, you get 67.628 Fl Oz per minute or 1.1271 oz per second. so if i wanted to measure 50oz, it would take 44.36 seconds. Either way i haven't had any luck finding a project that matches what i need, so Ive just been frankencoding using snippets from other sketches that have specific element i need. So basically i have code for an LCD monitor, code to read and display flow meter data, and code for a timer relay but have yet to combine them into a single sketch successfully. and the other kink is, that i don't have or haven't been able to identify the proper transistor from my stash to bypass the need for an external power supply. At least 90% of sketches ive been dissecting use a transistor, so finding a code snippet that uses a 12V block instead of a mosfet is difficult. Since im not great with proper transistor types and and their application i haven't been able to bypass the coding in any other similar project sketch that uses the transistor and then sub in the external power supply
johnerrington:
the info does not state pulses per volume.
In that case, either ditch it and get one that does, or make up an Arduino test rig that can count the pulses from a measured litre, and then come to your own conclusion about whether you really needed this information before you bought it. You have no grounds for your expectation until you know what you are holding in your hand.
What you need to know is the K Factor - pulses/litre. Your problem is consistency over small measures. Those cheap paddle-wheel types are remarkably accurate over large measures - like 1% over 300l/day - but I'm not sure how good they would be for consistently delivering a litre. If you want an accuracy of 5cc and the meter gives 100 pulses/litre, you have no chance, and I would be suss about it if it delivered 500 pulses/litre.
FWIW the Swissflow SF800 has a K factor of 6100 and a claimed accuracy of 1%. It is about the size you require. It is an axial flow turbine and uses infra red interruption, not hall effect, but I still don't know how consistent it is with small measures.
Can you describe how your code to count the pulses from the flow meter works? I hope you are using interrupts to count the transitions from high to low.
Paul
I found this datasheet for HDRX-YF-S402B, but its inconsistent - it claims
a range of 1 l/min to 5 l/min, output frequency of 73 Hz/(l/min), which means
73 to 365 Hz, yet earlier it says the output is 0Hz--100Hz.
So who knows - you'll have to measure its response curve I guess.
Note the accuracy at low flow rates will be poor, true of most flow sensors, so
make sure your pump rate and flow sensor are well matched.
Yes, well, at least there is some data there that is merely dumb rather than absurd. I think their "flow pulse characteristic" works out at 4380 pulses per litre, which implies the sensor is a pretty good choice, IF it can do it consistently, about which I have strong doubts, and I still think OP is on the wrong tram.
i was able to find some data i didnt last year. Supposedly the pump works out to be 5880 pulse per liter so im gonna mess around with the coding and see what happens. So if i can ditch the flow meter and use the pump to measure i might have better success. Ill share the results if i get something viable or need some more advice. Thanks all!
BlueBucketMaple:
Supposedly the pump works out to be 5880 pulse per liter ............. So if i can ditch the flow meter and use the pump to measure i might have better success.
That sounds like a pretty schmick positive displacement pump, and ditching the flow meter would be a really good idea. I'm sure they are simply not made for the sort of job you have in mind.
5880 is a pretty weird number, though. Maybe it translates into something for Americans.
The pump you have MAY give consistent results provided the head (pressure differential) and viscosity of the liquid remain constant. Centrifugal pumps are not intended for delivering predictable amounts of fluid, thats what positive displacement pumps are for - but at a price.
Hello,
I just published a full featured demo about how to dose with 2 peristaltic pumps into a vessel that is mounted on a HX711 scale. It is a very detailed demo with more that 30 minutes of Youtube movies, first the application, then the hardware and then the software. It uses pulse width modulation to change the speed of the DC motor driving the pumps. It also uses a finite state machine based program to dose first fast and then slow. You might want to consider a scale HX711 instead of your pulse flow meter or use an interrupt input of your Arduino to make a pulse counter and represent this value as the actual value of the scale. The way to build is, is described in a PDF of more than 40 pages, with source code and explanations in detail. The accuracy is reach is better than 1 gram on a range 0-5000. So if you take this, you are practically at the finish. And if things get really bad: PM is an option.
Dosing peristaltic pump (PWM SSR), HX711 scale and an FSM - Arduino Project Hub
Best regards,
Johi
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.