This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDC1000: water flow metering

Part Number: TDC1000
Other Parts Discussed in Thread: TDC7200, MSP430FR6043, MSP430FR6047, EVM430-FR6047, EVM430-FR6043

Hello,

I'm trying to make a water flow meter using TDC1000 and TDC7200 and I'm using audiowell 1Mhz tranducer with plastic tubing (part number is  HS0014-000 model number is RC15/HS-US0004-000-01)

I successfully get data from ultrasonic transducers but my problem is automatic channel swapping is not working so I'm only be able to get data upstream or downstream what can I do to make the channel swapping work? Thank you.

My TDC1000 register settings as follows;

CONFIG_0        - 0x4A
CONFIG_1        - 0x41
CONFIG_2        - 0x12
CONFIG_3        - 0x08
CONFIG_4        - 0x1F
TOF_1               - 0xE4
TOF_0               - 0x32
TIMEOUT          - 0x03
CLOCK_RATE - 0x01

My zero flow and downstream graphis as follows;

my zero flow and upstream graphic as follows;

My attempt to make automatic channel swapping and result graphis as follows;

  • Hello,

    Can you please clarify by the statement "the channel swapping is not working" ? I notice that from the graph the Ch1 and Ch2 are following each other ?

  • Hello Arjun_Prakash thank you for your reply.

    In mode 2 (flow measurement) of TDC1000 I need to turn on automatic channel swapping through CH_SWP register but whenever I tried I get same results for both downstream and upstream measurements.

    Yes Ch1 and Ch2 are following eachother but I think downstream and upstream measurement need to be symmetrical because downstream measurement is (time-flow_rate) and upstream measurement is (time+flow_rate) isn't it correct?
    But no matter what I do I couldn't make it work? What can I do? Thank you.
  • Hi, 

    The downstream TOF measurement should be shorter than the upstream TOF measurement. Your Config 2 settings (mode 2, CH_SWP, EXT_CHSEL) look fine. Could you please attach the register configuration file (TDC tab ->save CONFIG button) so that I can replicate it?

    I also have some questions about your plots. What is the actual TOF measurement range on your plots? The scale shows 10s of milliseconds. The first plot (downstream and zero flow), does not match what is expected for a downstream plot, since the TOF measurements taken during downstream flow should larger than the zero flow TOF measurements. Can you confirm what the fluid stream is doing in that plot? In the second plot, is there a reason you are seeing that spike over those 8-10 samples?

    If you are able to take measurements on a water stream with a near constant velocity, that would be ideal for testing. You would expect to see two separate flat lines for CH1 and CH2. 

    I'd also like to add that the TDC1000 is no longer our recommended device for flow metering, and it can be insufficient for low flow rate applications. If you are interested in the highest accuracy for your flow metering application, have a look at the MSP430FR6043. DS

    Regards,

    Gabriel

  • I misread the y-axis scale on your plot, those numbers are fine. 

  • Hello Gabriel,

    You can find my explanations below your questions, Thank you.

    The downstream TOF measurement should be shorter than the upstream TOF measurement. Your Config 2 settings (mode 2, CH_SWP, EXT_CHSEL) look fine. Could you please attach the register configuration file (TDC tab ->save CONFIG button) so that I can replicate it?

    I'm using my own board to make measurements it involves TDC1000,TDC7200 and Atmega328p microcontroller so I can't send you the register configuration file but I can provide all the details you need if you tell me what else do you want.

    I also have some questions about your plots. What is the actual TOF measurement range on your plots?

    What do you mean by actual TOF measurement range could you explain little bit more?

    The first plot (downstream and zero flow), does not match what is expected for a downstream plot, since the TOF measurements taken during downstream flow should larger than the zero flow TOF measurements.

    I tought downstream low should smaller then zero flow TOF. Then does it mean it is zero flow and upstream flow?

    Can you confirm what the fluid stream is doing in that plot?

    The fluid stream in that plot is zero flow and approximately 570l/h water flow see plot below has explanation

    In the second plot, is there a reason you are seeing that spike over those 8-10 samples?

    The spikes are happened when I open the valve, same for first plot the rapid changes are happened when I open or close the valve

    If you are able to take measurements on a water stream with a near constant velocity, that would be ideal for testing. You would expect to see two separate flat lines for CH1 and CH2.

    I'm using 3000l/h capacity water pump to test. Mostly I'm testing on a water stream with a near constant velocity. That graphic I took measurements from is changed on purpose to see different velocities If you want I can take measurements on a water stream with a near constant velocity then send you to graphics

    I'd also like to add that the TDC1000 is no longer our recommended device for flow metering, and it can be insufficient for low flow rate applications. If you are interested in the highest accuracy for your flow metering application, have a look at the MSP430FR6043. DS.

    Right now I couldn't change the microprocessor I need to make it work with the parts I have.

    Thank you,

    Regards,

    Murat

  • Murat,

    Thanks for the clarifications. What is the orientation of your transducers on the pipe? Please try taking a series of measurements at a constant and stable flow velocity, upstream and downstream measurements separately, in mode 2, and share the resulting plots. Then, again using a constant and stable flow, try the measurement using channel swapping and compare with the separate measurements. Another thing you could compare this with, is toggling the EXT_CHSEL similarly to how the auto channel swapping would be used to take the flow measurement. 

    Also, I forgot to mention before, if you have not seen this TDC1000 liquid applications FAQ, it  has a lot of good information and links. 

    Regards,

    Gabriel

  • Hello Gabriel,

    The orientation of my transducers on the pipe is like in the picture below,

    How can I change manually upstream and downstream flow measurements do I need to use EX_CHSEL could you explain little bit more?

    I will share plots when I take measurements like you said.

    Also, I'm unable to reach this TDC1000 liquid applications FAQ,

    Regards,

    Murat

  • Murat, 

    Sorry about the bad link, this should work: TDC1000 Liquid Application FAQ

    To manually swap channels for taking up/downstream measurements:

    TDC1000

    - setup CONFIG2 (0x0A) enable EXT_CHSEL, disable CH_SWP, mode 2, TOF, etc. 

    - use the CHSEL pin to manually select the TX channel: 0 for CH1 1 for CH2

    - Use the TRIGGER pin to initiate a new measurement START pulse, choose an interval to execute the measurement (maybe ~100-500ms, or same as you used before).

    E.g. 

    1. Select the channel with an edge on the CHSEL pin

    2. Initiate the measurement with the TRIGGER pin

    3. Read data from the TDC7200, process data, store the upstream/downstream TOF, etc. 

    4. Repeat the measurement at your desired interval. 

    Based on the test results you first showed, probably the setup and CHSEL signal are the only changes you would need to run the test. If you have any trouble, just let me know.

    Regards,

    Gabriel

  • Hello Gabriel,

    I hope everything is fine. I tried your suggestion to manually swap channels and it worked like a charm. I have another problem when there is no flow my measurements increasing you can see plots below. What could be the cause of that increase when there is no flow? Thank you.

    In this plot I took zero flow first than constant flow and than again zero flow, as you can see zero flow measurements increases

    In below plot I changed the water flow revers thats why channel 1 and channel2 swapped places. This time I tried first constant flow than zero flow, as you can see zero flow measurements increasing zero flow measurement results not changed.

  • Murat,

    I'd glad it's working better now. The constant flow TOF measurements look good.  Although the TDC1000 is known to have low accuracy in low and zero flow measurements, this behavior looks unusual, and I am not sure off hand what the cause would be. Comparing your first and second plots, it looks as if the TOF measurement continues to increase as more samples are collected (~700 in the first plot and ~130 samples in the second). What happens if you measure zero flow for a long duration?

    I will let you know if I can identify any likely causes. 

    Regards,

    Gabriel

  • Hello Gabriel,

    I will take measurements of zero flow and share the results with you. In the mean time I'm waiting for your answer. Thank you.

  • Hi Murat,

    A few likely causes for the zero flow drift that we have seen are device inaccuracy, transducer mismatch, or physical variations such as temperature of the transducer or water temperature. For example, a temperature change as small as 0.4 degrees C could be responsible for the 50-70 ns drift. However, this inaccuracy at zero flow is a known weak point of the TDC1000. Here is an app note on hardware changes to mitigate the zero flow drift: SNIA020

    Additional data processing is also a good option in this case. Your data shows that although there is drift upwards during no flow, the difference in the upstream and downstream measurements is very small as expected, and the initial zero flow measurement before it starts to drift also looks good. I think you could use those two facts from the data to be able to always accurately detect when there is zero or very low flow. 

    Regards,

    Gabriel

  • Hello Gabriel,

    I took zero flow measurements for a long time this is the plot I is continuously increasing. What can I do? Thank you.

  • Hi Murat,

    Please see my previous post for my suggestions on mitigating the effects from this. Could you specify the specific issue that this zero flow drift poses for your application? 

    Regards,

    Gabriel

  • Hello Gabriel,

    Thank you for your suggestions, we still have drift on zero flow but it isn't effecting our application right now, Maybe we can switch mcu to take measurements at low flow rate. Which one shoul I use for my application MSP430FR6043 or MSP430FR6047 what is the difference between them. Thank you.

  • Hi Murat,

    You're welcome. Either one would be suitable. They both have the same integrated AFE and use the same measurement algorithm; the main differences are in MCU peripherals, memory, footprint and price. Please see the MSP430FR6047 and MSP430FR6043 page (features and parameters tab) for full details. See E2E post 896003 as well. 

    Each board has an EVM: EVM430-FR6047 and EVM430-FR6043, and here is a reference design utilizing the 6043: TIDM-02005.

    Here is further information on getting started and how these devices perform flow measurements. (apply to both msp430 devices)

    Water Flow Meter Guide

    MSP430FR604x Waveform Capture TOF

    Regards,

    Gabriel