Measuring a flowrate, provided by 20mV pulses via AnalogIn

Hey Everyone,

as I'm about to measure my fuel-oil consumption, I bout a flowmeter.

This device provides about 10.000 imp./L when a flow rate of 0.025 - 2,5L/min is flowing. (This is the specified working range)

The pump-flowrate will be about 2-4L/h, which equals roughly 0,05L/min. So to measure, this would be 500 imp./min = 8,3 imp./s.

The pulses will be a 20mV signal, so I guess I need to connect it to the analog-in.

I tried it with a simple voltage output-sketch, and when it runs, I can see the reaction. The signal is at 0 when not rotating and goes to approx. 1-10, while the max. in the program I'm using is 1023 (10bit)

Here comes my problem:

How can I count this? I have not found anything for counting analogIn etc. Best regards, Maeffjus

You write code. It may look like

count++

The pulses will be a 20mV signal, so I guess I need to connect it to the analog-in.

You need to connect it to an amplifier, first. That signal will produce noise as far as the analog pins are concerned.

How can I count this?

How can you count what? It seems to me that you want to count peaks. Well, first you need to find them. Google peak detection.

I'm out - the sensor did not even move when connected between the fuel oil tank and my heater. (Too little flow) Now I'm back to measuring with ultrasonic. When these arrive I will have to ask a lot about RS485 ;-) Regards, Maeffjus

Isn’t the burn rate fairly constant? It might be sufficient to time how long the burner is running to get a very close approximation of how much fuel is used. Put a line-voltage relay’s coil across the burner motor wires and use any of the relay contacts as a switch input to the Arduino. The Arduino can then easily sense when the burner is ON and OFF.

After you gather data for a half a tank or so you can compare your Arduino’s total burn time to the amount of fuel used in the tank to get a ml/min burn rate. Then you can convert burn time to liters.

The pulses will be a 20mV signal

That don't sound right, is it an open collector output from the sensor? Can you post a link to the sensor datasheet?