TDC1000: Water level meter on a metal cylinder issues

Part Number: TDC1000

Tool/software:

Hi guys,

I've recently jumped to a project where I'm required to measure the height of a metal tank with a cylinder shape. The project was already on the POC phase so I'm trying to re-use the existing schematics to save months of development. 

The magic is around the TDC1000 AFE that should be able to send a signal for a 1MHZ transducer and measure the TOF. I've been in the past days reading all the information that I could get about the TDC1000 and I found these interesting links: Ultrasonic ToF FAQUltrasonic basicsTDC1000 application 1 and TDC1000 application 2. They were quite useful to get started and I was able to perform some accurate height readings for some certain levels of water inside of the tank. It's not fully functional for low levels and that's why I'm asking for help.

The schematic looks something like this:

It's more or less in accordance with what the datasheet suggests with a minor modification on an extra amplification on the received signal.

My first question is about something mentioned on the datasheet which is: "The duration of the common-mode settling time is defined by the VCOM capacitor. With a 10-nF VCOM capacitor, the common-mode reference requires 16 µs to settle.". Does this means that C6 on the schematic is the capacitor mentioned on the datasheet? So, having a value of 100nF instead would make the settling time 10 times higher? That is not making a lot of sense in my mind, since C6 will charge as soon as BATT_L_SENSE is connected to the battery (4.2V) and continue charged unless a large load is connected. 

My second question is about the observed signal on the oscilloscope:

So, in this experiment I was sending 10 pulses, so 10us of transmitting time and then it seems to me that I have ringing of 30us? Is this right? In that case the transducer needs to be updated to a better one no?

I know that TUSS44x0 would probably be a better fit for this application but we need to operate with batteries, so I will never have voltages above 4.2V.

Thank you for the ongoing support,

Best regards,

Fernando Fontes

  • Hello Fernando,

    Thanks for posting to the sensors forum and all the background on your project. I am glad to hear that the TDC1000 has been working for most instances.

    1. Does this means that C6 on the schematic is the capacitor mentioned on the datasheet? So, having a value of 100nF instead would make the settling time 10 times higher? That is not making a lot of sense in my mind, since C6 will charge as soon as BATT_L_SENSE is connected to the battery (4.2V) and continue charged unless a large load is connected. 
      1. I believe this section is missing some context that might be beneficial in understanding the purpose of the 10nF capacitor, the TDC1000 has an option to provide an external VCOM which can use the external voltage in your case BATT_L_SENSE and the other option is to use the internal VCOM which uses an internal regulator that is activated during the common mode portion of the listening window. The settling time mentioned here is regarding the internal VCOM that switches on during that common mode portion of the measurement. That common mode voltage is then used for the comparator portion of the internal circuitry, so if you are using the internal VCOM option I would leave the 10nF capacitor as is since I believe altering this settling time would not benefit you in your application and would not help you achieve measurements at lower liquid levels. 
    2. So, in this experiment I was sending 10 pulses, so 10us of transmitting time and then it seems to me that I have ringing of 30us? Is this right? In that case the transducer needs to be updated to a better one no?
      1. The ringing time could be improved,  it mainly depends on how you are trying to improve detection at lower liquid levels. If the decay of your ringing period is very long then this could bleed into your minimum desired detection distance. Essentially the transducer might still be saturated enough that a returning RX echo would not be detectable. The other issue is that the long decay time could be triggering false detections. If you wish to reduce the ringing time you also try to use external passive components that would help reduce the ringing time, but worst case scenario you could always try a different transducer, the new transducer may be a better match for your circuitry leading to a reduced ringing time without the need of additional components.

    My assumption is that you are currently not able to detect really small quantities of liquid at the moment, but I am not certain about that so if you don't mind expanding on the issues you are experiencing at the lower end and I would be more than glad to help you out with some recommendations.

    Best,

    Isaac

  • Dear Isaac,

    Thank you for your reply.

    1. You pointed out something I had missed regarding the VCOM pin. As mentioned, this was the schematic used in the PoC, and I wasn’t aware that the VCOM pin could act as both an input and an output. Based on the circuit design, it seems the intention was to use the VCOM pin as an input, as indicated by the voltage divider around BATT_L_SENSE (e.g., the 4M99 resistors). This explains my confusion and why I was asking whether increasing the capacitance of C6 would help. Since VCOM will be externally loaded, I believe using a higher value capacitor, such as 100nF, could improve performance in the presence of leakage currents in the U5 amplification stage. If I set VCOM_SEL to 1, this configuration should work as intended. What do you think? Do you foresee any issues with using VCOM from an external source?

    2. When you mentioned adding passive components, were you referring to placing a pull-down resistor on the transducer pin, for instance? How would this impact receiver performance?

    Your assumption about the short ToF measurement mode is correct. Currently, I consistently get a reading of approximately 13mm, which seems to be caused by ringing. Even with an empty bottle, I still observe this behavior. However, for levels above 25mm, everything works fine. Beyond approximately 160mm, I start encountering difficulties in obtaining responses, which I suspect is due to the gain settings. I have been trying to avoid dynamically adjusting the gain during operation and instead aim to find a fixed combination of gain and detection thresholds that can produce accurate readings across the range of 10mm to 180mm. Do you have any suggestions for achieving this? I’ve read that dynamic gain adjustment may be necessary for optimal performance.

    By the way, regarding the gain: do you think the additional U5 amplification is necessary? The final application will cover a range of 10mm to 600mm, but I’m unsure if U5 is essential or if it may frequently saturate the signal.

    Thank you for your continued support.

    Best regards,
    Fernando Fontes

  • Hello Fernando,

    Of course glad to help out and thank you for all the added detail.

    1. Since VCOM will be externally loaded, I believe using a higher value capacitor, such as 100nF, could improve performance in the presence of leakage currents in the U5 amplification stage. If I set VCOM_SEL to 1, this configuration should work as intended. What do you think? Do you foresee any issues with using VCOM from an external source?
      1. If you are concerned about VCOM being loaded externally my recommendation would be to use the internal VCOM circuitry. The 4.99M ohm resistor divider network may not work appropriately when using the external option because I believe the resistances may be too large. There is a part of the internal circuit for the VCOM that can still be back driven so if the current generated by the resistor divider is too small, so if you used the external option then you would actually see a really slow settling time instead of it being set and settled at the voltage you need.
    2. When you mentioned adding passive components, were you referring to placing a pull-down resistor on the transducer pin, for instance? How would this impact receiver performance?

      1. Correct essentially a resistor in parallel to your transducer, we refer to this as a damping resistor. You would have to find the ideal resistor for your transducer but essentially it works like a bleed-out resistor immediately post excitation. It does have minute loading effect on the transducer during the burst and receive portions of your measurements so you may have a slightly reduced drive and some slight reduction in your return echoes. Typically we recommend using a potentiometer to sweep and fine tune to identify the best value for your system. 

    You can identify if the source of the ringing is caused by transducers decay time, you would need to probe your TX/RX line while also monitoring the STOP pin in the scenarios where the liquid is low to see if there is a crossover between the two signals. I usually recommend doing this in general just to see what your systems low level limitations may be and this will help you make an educated decisions on how your timing registers can be programmed so that you can fully optimize your system. Near 0mm measurements can be fairly difficult with a single transducer because of the blind zone.

    Have you considered perhaps having a system that uses two configurations one optimized for low levels and one optimized for higher levels? This kind of moves away from a dynamic system that is actively trying to adjust a lot of configurations at the same time and you create a method that checks low-mid levels and a method that checks mid-large levels with a healthy amount of overlap to ensure you dont miss anything in between. 10mm to 600mm should be definitely achievable but you may run into some issues due to the metallic surfaces. Metallic surfaces are harder to work with due to their acoustic impedance they tend to reflect a lot of the sound pressure level and not as much signal makes it through. Typically we recommend a booster circuit that will generate a large excitation pulse for these kind of situations. It doesn't sound like this may be an option for you since you are operating off of a battery so this is where I think your U5 amplifier would come in handy, so using a higher gain and more pulses to maximize the SPL generated by your transducer to ensure the signal returns to the system.

    Best,

    Isaac

  • Hello Isaac,
    Thank you once again for the detailed explanations.

    1. If you are concerned about VCOM being loaded externally my recommendation would be to use the internal VCOM circuitry. The 4.99M ohm resistor divider network may not work appropriately when using the external option because I believe the resistances may be too large. There is a part of the internal circuit for the VCOM that can still be back driven so if the current generated by the resistor divider is too small, so if you used the external option then you would actually see a really slow settling time instead of it being set and settled at the voltage you need.

      a. In your opinion, would you rather change the circuit and put lower values on the 4.99M resistors like let's say 100K or keep the existing schematic and use the internal VCOM? Since internal VCOM will have large current when compared to the 4.99M voltage divider, if selected it should be the one with most impact.

    2. Correct essentially a resistor in parallel to your transducer, we refer to this as a damping resistor. You would have to find the ideal resistor for your transducer but essentially it works like a bleed-out resistor immediately post excitation. It does have minute loading effect on the transducer during the burst and receive portions of your measurements so you may have a slightly reduced drive and some slight reduction in your return echoes. Typically we recommend using a potentiometer to sweep and fine tune to identify the best value for your system. 
      a. Ok, I will let this for a final tuning if needed.

    3. Have you considered perhaps having a system that uses two configurations one optimized for low levels and one optimized for higher levels? This kind of moves away from a dynamic system that is actively trying to adjust a lot of configurations at the same time and you create a method that checks low-mid levels and a method that checks mid-large levels with a healthy amount of overlap to ensure you dont miss anything in between. 10mm to 600mm should be definitely achievable but you may run into some issues due to the metallic surfaces. Metallic surfaces are harder to work with due to their acoustic impedance they tend to reflect a lot of the sound pressure level and not as much signal makes it through. Typically we recommend a booster circuit that will generate a large excitation pulse for these kind of situations. It doesn't sound like this may be an option for you since you are operating off of a battery so this is where I think your U5 amplifier would come in handy, so using a higher gain and more pulses to maximize the SPL generated by your transducer to ensure the signal returns to the system.

     a. Yes, you are right. With battery operated it will not be possible to have a booster. Regarding your suggestion you mean, trying to find the best gain and threshold for low-mid and the same for mid-large and then reading always with both settings and try to combine the results?

    Thank you,

    Best regards,

    Fernando Fontes

  • Hello Fernando,

    Of course, always glad to help.

    1. In your opinion, would you rather change the circuit and put lower values on the 4.99M resistors like let's say 100K or keep the existing schematic and use the internal VCOM? Since internal VCOM will have large current when compared to the 4.99M voltage divider, if selected it should be the one with most impact.
      1. I would say its best to just keep it as is and continue using the internal VCOM. It works fine as it is and you have been using that method the entire time so this would remove any debug efforts in case this would change. There wouldn't be much of a performance improvement if you were too move to external VCOM so I don't see a benefit in wasting any time with this especially since you are trying to optimize the development time.
    2.  Yes, you are right. With battery operated it will not be possible to have a booster. Regarding your suggestion you mean, trying to find the best gain and threshold for low-mid and the same for mid-large and then reading always with both settings and try to combine the results?
      1. That is precisely correct, you would run measurements at both settings to combine/compare results. It may not be necessary to run the larger settings every time to try and conserver power but if the shorter range settings are not enough then your system should not get a return at all. In those situations you may be able to use that as a deciding factor to then run the longer range settings. If its in the middle then you should be able to get very similar results from the two measurements if you chose a decent point for the overlap.

    Best,

    Isaac

  • Hi Isaac,

    I will pursue your suggestions. Thank for all the support.

    Best regards,

    Fernando Fontes 

  • That is great to hear Fernando, please let me know if there are any other questions I can help out with.

    Best,

    Isaac

  • Just one more question before closing the issue. I've been having good results with the experiments but there is only one thing that is not making sense. I'm using CLKIN of 4MHz and Clock DIV of 4 to get 1MHz for the transducer. When reading with Standard ToF mode I was expecting to get the time between the trigger and the start pulse around 3us but instead I'm getting 30us. 

    Any possible reason for this? I will try to put the PCB again on the oscilloscope on Thursday to see if it is some code issue, but I guess it's not since the results are in track with the expected height levels.

    Best regards,

    Fernando Fontes

  • Hello Fernando,

    Thats a little odd. I just checked some units that I had here in the office and they all seem to be coming in at about 4.125us. This is running with an 8MHz CLKIN so my expected timing would be 3.375us so not too far off from the expected.

    If you have a chance to check it out in the lab please let me know. My only thought is that you could have been in the wrong mode like the short TOF mode where the timing is a little different.

    Best,

    Isaac

  • Thanks Isacc,

    Indeed on the scope I get 4.4us. It's definitely something on the code that is making this calculation wrong.

    Best regards,

    Fernando Fontes

  • Hello Fernando,

    Thanks for checking this out, good to know the part is doing what its supposed to do.

    I hope the code is not too hard to work through!

    Best,

    Isaac