Go Down

### Topic: Calibration Factor in Hall Effect Water Flow Sensor (Read 8062 times)previous topic - next topic

#### RushanArshad

##### Mar 23, 2017, 02:55 pm
Hello everyone,

I am using hall effect sensor to measure water flow. I am using this hall effect sensor: https://www.amazon.co.uk/gp/product/B01FFHTE0E/ref=oh_aui_detailpage_o04_s00?ie=UTF8&psc=1

and this code: https://diyhacking.com/projects/FlowMeterDIY.ino.
The problem is that my error is too high (more than 20%). I think this might be the problem of calibration factor which is 4.5 in the code. I have also attached the datasheet for this sensor.
Can anyone tell me what might be the problem why my error is so high?

I look forward to hearing from this great community.

#### ardy_guy

#1
##### Mar 23, 2017, 03:07 pm
Here's OP's pic:

Surely the whole point of a calibration factor is to fudge the result to suit the facts. You obviously have some way of measuring the actual flow, presumably timed into a bucket or something, so what's wrong with just changing the factor?

#### RushanArshad

#2
##### Mar 23, 2017, 03:16 pm
hello ardy_guy,

The main purpose of calibration factor is to for calculating the flow rate and quantity of water. Calibration factor in the code is 4.5 which means 4.5 pulses are generated per second for each litre of water passed through the sensor per minute. However, in the datasheet, it is not specifically mentioned. It may vary for different models of this sensor type.

#### surbyte

#3
##### Mar 23, 2017, 03:19 pmLast Edit: Mar 23, 2017, 03:21 pm by surbyte
Take some measurements using : Water tank, bypass valve, known volume container and stopwatch.
Adjust the bypass valve to an almost closed position that allows slow flow.
Measure the time it takes to fill the known volume container.
Calculate the flow rate and take note what the sensor recorded.
Repeat with different valve positions. You will have different flows.
At all times record the flow and value indicated by the sensor.
At last, you will have a straight line that will allow you to establish what your factor.

Sorry: don't use the 4.5 factor with this method, use 1.

#### ardy_guy

#4
##### Mar 23, 2017, 03:32 pm
hello ardy_guy,

The main purpose of calibration factor is to for calculating the flow rate and quantity of water.
That's what I said in different words: it allows you to calculate the flow, but it's crucial to remember that the purpose is so that they match what it really is. Maybe your meter is a subtly different version.

You presumably know what it really is, or else you wouldn't know it's wrong. If you trust your bucket and stop watch (or whatever way you established the real flow rate) then just change the calibration factor so the result is right.

I don't see this as a problem: I see it as time to set the value so the readings match the known flow.

#### surbyte

#5
##### Mar 23, 2017, 03:37 pm
If the sensor is linear, you only needs one point. Measure only one flow and correct your factor to read these value on arduino.

#### GypsumFantastic

#6
##### Mar 23, 2017, 04:15 pm
I agree with previous posters that you need to do a calibration exercise and work out your own constants,

but doesn't the datasheet there say there in section III that the calibration constant should be about 24?

There's a small intercept on the calibration curve too - it's up to you to decide how to handle that.

#### Pakshet

#7
##### Oct 12, 2018, 01:18 pm
Are there any scientific reason why you choose that specific calibration factor?

#### dave-in-nj

#8
##### Oct 12, 2018, 01:49 pmLast Edit: Oct 12, 2018, 01:57 pm by dave-in-nj
The device accuracy is probably 50%
Get a 5 gallon bucket
Take a hose and let water trickle through. The sensor
Record. The volume
Then repeat at maximum wTer pressure
Compare readings.
The best you can hope for is to have a calibration point or curve at on flow rate and another for each flow rate.
Go look at pump data  sheets they have  multiple curves based on rate of flow
In addition the geometry of the pipe entering and exiting will affect the readings you would want to have a straight pipe in and a straight pipe out for at least 20 diameters look at gun caliber to get the idea whatever the pipe size 20 * that so if its 20 mm diameter you'd want it 400 mm long on the exit it should be half that distance or longer you can prove that by using a hose and bending the hose to a curve or holding the host straight and see how the readings change
You can develop curves for the sensor but there is no single value

#### JohnLincoln

#9
##### Oct 12, 2018, 08:32 pm
Are there any scientific reason why you choose that specific calibration factor?
I would imagine that the writer of the original sketch used a completely different sensor and that the calibration factor was correct for that (unknown) sensor.

#### Nick_Pyner

#10
##### Oct 13, 2018, 01:44 amLast Edit: Oct 13, 2018, 01:45 am by Nick_Pyner
The device accuracy is probably 50%...........The best you can hope for.........
This is arrant nonsense. These things are remarkably accurate and, within the range they are made for, remarkably linear - as the graph attests. You have the frequency chart and the number of pulses per litre as starting points, so how hard is it to check it out?

You don't let the water trickle through the sensor, you have it flow through it in the range specified and which you are likely to use it, which is this instance is the bleeding obvious - 6 litres/min. I did mine initially using 20L from a 25L bottle with 2m head and straight pipe. I don't think the head was needed but it gave me the straight pipe. The real test is done in the installation in which it will be used, and fill the bottle rather than empty it.

As far as I can see, the only difference between these and a commercial unit costing twenty times as much is the materials it is made from and the absence of official compliance marks that enable them to be used to charge the public money based on their readings.  I rather feel that any deviation from the stated flow will be more down to your pipework than the sensor.

#### dave-in-nj

#11
##### Oct 13, 2018, 02:24 am
<snip>
You don't let the water trickle through the sensor, you have it flow through it in the range specified and which you are likely to use it, which is this instance is the bleeding obvious - 6 litres/min. <snip>
this is exactly what I was saying.
that there are flow curves and characteristics for every flow rate.
you change the rate, you change the calibration factors.
if you set it so that it will always be a constant flow rate, and not deviate from that, then your calibration factor is going to be close.
change the pressure, you change the characteristics, and the accuracy will change.
if you are feeding it from your rain barrel, the flow rate changed when you have 1 meter of head pressure than when you have 5cm of head pressure.

#### dave-in-nj

#12
##### Oct 13, 2018, 03:23 am
Take the next step, if you have a constant pressure and you are not throttling the flow, then you have a fixed volume based on the pipe geometry and the flow sensor becomes irreverent.  your pipe is an orifice that can be calibrated for flow.
your constant flow rate , 6/liters/min is unchanging so the pipe sets the flow, and all you need to do is to know when the pump is running or the solenoid is open.

as soon as you start throttling the flow, you are in a different part of the curve.

When you get into the commercial meters costing 20 times as much, the tolerance on parts and fit, bearings, etc is 20 times closer.  but look at the data sheets of those commercial products costing hundreds of dollars.  Below 30% of the listed flow rate,  the accuracy starts to depart drastically to completely useless values without using drastically different curves for the calibration.

Warning a user of known problems is what we do.  Working around them is also what we do.
Now the potential problems are on the table.  if the OP does the testing I listed, he will find out if the meter he has departs from one fixed curve in his, and here is the key, application.      If he have a constant pressure, and a constant flow, then the single point calibration will suffice.

If he assumes that a contant point calibration is all that is needed, but in the end, finds his appliction has problems, then he knows where to start looking.

Custody transfer, batch processing, assembly line work spend the thousands of dollars for those flow meters for a reason.
1% error can cost hundreds of thousands of dollars in the lift of a process.

#### bluejets

#13
##### Oct 13, 2018, 04:25 am
hello ardy_guy,

The main purpose of calibration factor is to for calculating the flow rate and quantity of water. Calibration factor in the code is 4.5 which means 4.5 pulses are generated per second for each litre of water passed through the sensor per minute. However, in the datasheet, it is not specifically mentioned. It may vary for different models of this sensor type.
Might be missing something here but in note 2 of the spec sheet it says 1 litre = 1319 +_ 10% pulses so as I see it at a rate of 1 litre per minute that would be 22 pulses or near-about in 1 second.

Go Up