# Ultrasonic flow measurement

I want to make a prototype of an ultrasonic flow meter. I rarely found any examples of this case and I it is difficult to make this prototype fairly accurate.

This is the case:

I want to measure airflow (breathing) in a tube (diameter: 21mm)

I have two ultrasonic sensors: SRF05 and SRF08, I disconnected both senders and wired them up again so I can arrange the sender and the receiver of one sensor facing each other.

To start of I made some calculations to find out if this is actually feasible.

Ultrasonic flow measurement is based on the doppler effect:
the downwards signal will be slowed down by the airflow, the upwards signal will be accelerate.
The difference in time between those two signals determine the flow.

Tdown = L / ( c + Vcosq )
Tup = L / ( c - V
cosq )

so if:

r = 21 mm = 0,021 m
d = r / sinq = 29,7mm = 0,0297 m
q = 45°
c = 340,29 m/s

A. In case F = 0 l/min

Tup = Tdown = L/c = 87,2785 μs

--> I probably have to widen the diameter of the tube as the signal is to close to the minimal range of the sensors.

B. In case flow = 5 l/min = 83,33 * 10^-6 m3/s

F = 5 l/min
V = F/A = 60,3840 * 10^-3 m/s
(flow die we minimaal willen kunnen registreren)
Tdown = L / ( c + V*cosq )
= 87,2675 μs
Tup = 87,2894 μs

Δt = Tdown – Tup
= 0,0219 μs
= 21,9 ns

--> The measurement needs a accuracy of minimal 10ns (nanosecons)

So when looking at the arduinoboard I found that most of them have a clock speed of 16 MHz so they can give a accuracy of 62,5 ns, this would not give desired data.

However: the arduino due board has a clock speed of 84MHz witch would give a resolution of 12 nanoseconds, what comes very close to what I would actually need.

Can someone give me advice on this case?
Do you think the arduino due board could do the job?

I'm not even sure what you're trying to do with those devices is feasible.

good idea but:

• there might be interference between the signals so they should be used alternately.

• the lengths of the tubes should match perfectly ==> 1mm == 3.3 uSec.

• the speed of sound is temperature and humidity dependant

• exhaled air = 30C higher hum?

• inhaled air = 20C lower hum ?

• It might be doable with just one sensor. Zero calibration is no flow.

• To maximize the effect use a U-tube and put the sensor in the bottom part, it will remove the sin() / cos() from the math.

``````+------------+                    +-----------+
>>         |                    |          >>
+---------+  |                    |   --------+
|  |                    |   |
|  |                    |   |
|  |                    |   |
|  |                    |   |
|V |                    | ^ |
|  |                    |   |
|  |                    |   |
|  |                    |   |
|  |                    |   |
|  |                    |   |
+----------  ----------------------   ------+
+-------------------------------------------+
``````
• the sender and receiver should measure against the flow as that increases time.

(if things are not clear you can PM me in Dutch)

my thoughts are that you should be 4 times more accurate than what you want to measure..
in this case, 4 times faster.

in this case, it might be better to get away from the canned devices (arduino) for the direct processing.

consider a FPGA

or look at the ARM processors.

the doppler calculations can (should) be on a dedicated processor, in effect, to create a sensor with an output.

then feed that into your arduino for readout and control if you need that for your goal.

the other way is to 'do the math' in discrete chips, again creating a circuit that does the doppler calculations separate from the rest of your protect.

Hi, these units are ping and time type distance measuring units.
I don't know how you are going to get frequency domain info out of them .
I may be wrong.

Tom....

AWOL:
I'm not even sure what you're trying to do with those devices is feasible.

Feasibility with the particular devices is the question, and more critical purpose-built electronics may well be required.

The general principle is of course, the preferred method of airflow determination, particularly in spirometry. I am presently considering the logistics of buying such a unit.

For mechanical simplicity, it uses a single transducer pair whose functions I presume, alternate.

Thanks for the imput!

robtillaart:

• It might be doable with just one sensor. Zero calibration is no flow.
• To maximize the effect use a U-tube and put the sensor in the bottom part, it will remove the sin() / cos() from the math.

Could only be possible when using transducers right? Because of the accelerated and the delayed signal.

TomGeorge:
Hi, these units are ping and time type distance measuring units.

What they measure is time and since ultrasonic waves are influenced by flow...

dave-in-nj:
my thoughts are that you should be 4 times more accurate than what you want to measure..
in this case, 4 times faster.

Is there a reason you say 4? It has crossed my mind a more accurate (more than 10us) reading would be needed.

I think the main problem would be the latency - these devices typically have their own processor to generate the outgoing burst and time the echo.
Used by themselves, latency isn't an issue.
If you're only going to use half the functionality, you have no way of knowing what the latency is.

you might check whta carl47 used for his anemometer - http://forum.arduino.cc/index.php?topic=53569.0 -