Flow Sensor does not work properly when flow rate is low / high

22 posts / 0 new
Author
Message

[Moved to the General Electronics forum]

I have been using flow sensor to calculate the amount of water dispensed . But when water level is less in water tank i.e. flow rate is low the sensor does not works properly. It cannot measure the dispensed amount  of water. Is it a known issue with flow sensor is there any overcome of this issue?

Further more its just the reverse when water comes out with good pressure. I was expecting a liter of water to be dispensed - but it dispensed 600 ml of water only. The manual stated 450 pulses for 1 liter of water which actually dispensed qty did not match? I am sure that I am counting each pulse in my code and close valve when I get 450-470 pulses

This topic has a solution.
Last Edited: Wed. Dec 10, 2014 - 04:28 AM

Look at the datasheet for your flow sensor. What is the minimum amount of flow it can measure.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

I understand your point - so is there a way we can find out flow rate is in permissible limits before going to flow sensor or opening the valve. The issue my side is that I keep dispensing water - a narrow but not much thick streak of water.

I guess you need to have a sufficient "head of water" to get a suitable flow rate. You could do that with the design of your tank I suppose.

Ross McKenzie ValuSoft Melbourne Australia

Are you wanting to measure a continuous flow of water or measure an amount into a container?

Looking online I can find sensors that will measure down to 0l/min but they don't use any moving parts. If measuring into a container could you do it by weight? Can you use a pump? Continuously pump from the bottom of the tank to the top. Take your feed to your flow sensor from the output (higher pressure) of the pump. Your flow rate to the sensor will go up. You will probably need to restrict the discharge into the tank to raise the pressure.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

Brian Fairchild wrote:
Look at the datasheet for your flow sensor. What is the minimum amount of flow it can measure.

I understand your point - so is there a way we can find out flow rate is in permissible limits before going to flow sensor or opening the valve.

That should be part of your design!

You can calculate what the minimum & maximum flow rates are - your design should ensure that those are (well) within the specified limits of your chosen sensor!

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

You already seem to have at least two threads running on this:

https://www.avrfreaks.net/forum/m...

https://www.avrfreaks.net/forum/e...

It would have been helpful to at least reference them - you are already getting some of the same answers again that were previously given in those threads!

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

I have been using flow sensor ... Is it a known issue with float (sic?) sensor ...

Just checking - that should be "flow" both times - yes?

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

And why is this in the Evaluation and Development Kits forum? Is this in any way AVR related or do we move the thread to Off topic?

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Yes, just correct the post ... sorry for wrongly posting it here

Last Edited: Wed. Dec 10, 2014 - 04:32 AM

awneil wrote:

You already seem to have at least two threads running on this:

https://www.avrfreaks.net/forum/measure-water-flow-literes-using-arduino-mega-2560-board-and-water-flow-sensor

https://www.avrfreaks.net/forum/electronic-water-dispenser

It would have been helpful to at least reference them - you are already getting some of the same answers again that were previously given in those threads!

And now there's yet another one: https://www.avrfreaks.net/forum/e...

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

I understand your point. Sorry I though people would not read threads which a solution or a suggestion is provided - I am not sure of how new notifications of new post are alerted. To be on safe side I switched over to a new thread.

Well, it could be the characteristics of the sensor -- or it could be your code/approach.

Generally, pulses per liter (or pulses per gallon) are nominal and calibrated at a certain flow rate.  And generally for water at a certain temperature.

With any given flow rate and given fluid, the PPL needs to be recalibrated.

It could be as simple as your orientation of the flow meter.  Some are designed to be horizontal -- e.g. inlet on the left and outlet on the right.  Some are designed to be vertical.  You could get your symptoms with the wrong orientation.

A high-flow sensor with heavy "paddles" indeed may not turn at low flow rate but allow leakage past the paddles.

In any case, use a frequency generator (or create one from an AVR, timer, and CTC mode) and test your code at various constant flow rates to ensure proper processing.

I forget whether you are using the "pulse" type or "square wave" type of flowmeter.  The pulse types are tricky.  IIRC I commented on that in one of your other threads.

Here is the link that you gave for the "datasheet":

http://www.seeedstudio.com/wiki/...

But now you say:

The manual stated 450 pulses for 1 liter of water

???  I don't see 450 in there anywhere.  One can infer, I guess, that it is about that value.  A note says about 50Hz at 6lpm.  3000 pulses in one minute for 6 liters.  About 500 pulses per liter?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

If you look *really* carefully at that datasheet, and in particular the graph that shows L/h vs Freq, you'll see that it doesn't go all the way down to 0.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

awneil wrote:

You already seem to have at least two threads running on this:

LOL--OP appears to have abandoned the flowmeter approach to dispensing exactly one liter of water, to ways to fill a container with volume of exactly one liter.

I'll throw another approach into the mix:  For industrial chemical dispense, we've gone away from flowmeters in many cases, and tend to get better results with a vessel and fill it by weight to the desired amount (specific gravity and all that).  These chemical are very hard on flowmeters.  Next thread will be on load cells...  (but OP mentioned water)

Back to the highlighted "exactly" -- tell what that means in this app.  What accuracy and repeatability is needed?  Is it really volume-only, regardless of the density of the fluid?  I.e., does temperature matter?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

theusch wrote:
Back to the highlighted "exactly" -- tell what that means in this app.  What accuracy and repeatability is needed?

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

I have a customer who uses flowmeters to monitor cooling oil flow.  They are the paddle variety and their range is 5 - 50gpm and as noted lower than minimum flow rates, the paddles stop turning but the oil keeps moving.

Lee, I like the idea of fill by weight, great idea.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

"The critical shortage here is not stuff, but time." - Johan Ekdahl

"Step N is required before you can do step N+1!" - ka7ehk

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

awneil wrote:

theusch wrote:

Back to the highlighted "exactly" -- tell what that means in this app.  What accuracy and repeatability is needed?

I see neither the question, nor needed accuracy stated, in that entire thread.

IME the short answer, with reasonable accuracy, depends on the water source.  Gravity flow will indeed change flow rate based on head pressure.  One would want to use a low-flow flowmeter such that it runs at a constant rate for nearly all of the dispense cycle.

But that would be a long fill time for the e.g. 10l max.  With our weight-based system we go "coarse" until we get close, and then "fine" to get very near the setpoint.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

theusch wrote:
I see neither the question, nor needed accuracy stated, in that entire thread.

OK - not directly as a question, but:

I wrote:

exactly 5 lts

There is no such thing as "exactly" - you need to specify your tolerance on that!

No, I can't see that he ever has stated that tolerance.

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
This reply has been marked as the solution.

I don't think that a flow meter approach is ever going to work - for the reasons already stated.

I think a measured-volume approach is probably easiest - see: https://www.avrfreaks.net/comment...

If you had a constant (within the required tolerance) head of water, you could just use a timed delivery.

This is how many drinks vending machines work.

Top Tips:

1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...

Thanks to all for their valid suggestion. My implementation mechanism required is as below:

The flow sensor device has issues and one cannot have guaranteed calibrations for various fluctuating flow rates in pipelines. Either we have to make use of flow control valves http://en.wikipedia.org/wiki/Flo... or the mechanism as provided https://www.avrfreaks.net/comment/1393716#comment-1393716

Thanks to all