My purpose to measure a water flow rate.
I have my own board with TDC1000 and TDC7200. Scope indicates nice clean signals – I send a predefined number of TX pulses and get an echo. The problem that I have a big deviation in Tu and Td times.
For example Tu and Td in microseconds
->
63.7429
63.6263
->
63.6458
63.6254
->
63.6427
63.6282
->
63.6364
63.6190
->
63.6406
63.6210
And then I calculate a flow rate:
double sos = 1496.7; //im m/s @25*C double length = 0.0907; //in m double diameter = 0.0375; //in m double tof1, tof2, delta_tof; if (tof1 > tof2) //in us delta_tof = (tof1 - tof2) / 1000000; //in sec else delta_tof = (tof2 - tof1) / 1000000; //in sec double pipe_section = ((double)3.14 * diameter * diameter) / 4; //im m^2 double velosity = (delta_tof * sos * sos) / (2 * length); //im m/s double flow = pipe_section * velosity * k; //m3/s flow *= 3600; //m3/h textBoxVelocity.Text = velosity.ToString(); textBoxFlow.Text = flow.ToString();
Although a reference water meter installed on the pipe indicates a stable flow I get unstable results.
Also results differ from the meter reading.