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: Trying to measure TOF but I can't get success with my circuit.

Part Number: TDC1000
Other Parts Discussed in Thread: TUSS4470
Hi,

I would like to implement a system to measure the distance between the sensor and the water level in a tank using TDC1000 and a 10mm ultrasonic sensor with Fc = 300Khz. As in the following sketch:

I have this circuit on my PCB:

 And I wrote some code and configured the registry parameters as follows:

CONFIG_0
        RAW:                    0x86        
        TX_FREQ_DIV:            32
        NUM_TX:                 6
CONFIG_1
        RAW:                    0x40
        NUM_AVG:                1
        NUM_RX:                 0
CONFIG_2
        RAW:                    0x0
        VCOM_SEL:               INT
        MEAS_MODE:              TOF
        DAMPING:                OFF
        CH_SWP:                 OFF
        EXT_CHSEL:              OFF
        CH_SEL:                 1
        TOF_MEAS_MODE:          0
CONFIG_3
        RAW:                    0x4
        TEMP_MODE:              REF, RTD1, RTD2
        TEMP_RTD_SEL:           PT1000
        TEMP_CLK_DIV:           8
        BLANKING:               OFF
        ECHO_QUAL_THLD:         -220 mV
CONFIG_4
        RAW:                    0x1F
        RECEIVE_MODE:           SINGLE ECHO
        TRIG_EDGE_POLARITY:     RISING
        TX_PH_SHIFT_POS:        31
TOF_1
        RAW:                    0x24
        PGA_GAIN:               3 dB
        PGA_CTRL:               ON
        LNA_CTRL:               ON
        LNA_FB:                 RESISTIVE
        TIMING_REG[9:8]:        0
TOF_0
        RAW:                    0x0
        TIMING_REG[9:0]:        0
ERROR_FLAGS
        RAW:                    0x0
        ERR_SIG_WEAK:           0
        ERR_NO_SIG:             0
        ERR_SIG_HIGH:           0
TIMEOUT
        RAW:                    0x4C
        FORCE_SHORT_TOF:        ON
        SHORT_TOF_BLANK_PERIOD: 16 x T0 -> 2.00 us
        ECHO_TIMEOUT:           OFF
        TOF_TIMEOUT_CTRL:       128 x T0 -> 16.00 us
CLOCK_RATE
        RAW:                    0x0
        CLOCKIN_DIV:            1
        AUTOZERO_PERIOD:        64 x T0 -> 8.00 us
TOF Control:                    Short TOF
Common-mode:                    16.00 us
Autozero:                       8.00 us
Transmit:                       24.00 us
Mask/Blank:                     2.00 us
Echo listen:                    16.00 us
End:                            4.00 us
But I can't get a pulse on TX pin or RX_pin
I configure the TDC1000 with the indicated parameters, I change the EN_pin to high, I make high and low on the trigger pin. But the only thing I have is the infinitely high TX_pin. (I don't have a pulse similar to the datasheet example).
I don't understand what I could be doing wrong.

best regards
Daniel Pozzatti


  • Hello Daniel,

    Thanks for posting to the sensing forum! 

    Just as a quick preface, we typically dont recommend the usage of TDC1000 for applications that use frequency under 1MHz. The device can produce the signals without any issues but the issue typically arise when configuring your filter stage for the RX and the measurement range. You must configure the passive filters in the RX path appropriately to let the signal of interest through and the range must remain relatively small because the TDC1000 does not have much dynamic range to handle larger distances. If 10mm is the max then I dont think this should be much of an issue.

    Have you ensured that the EN pin is high when you provide the trigger signal? If the EN is low then the device will not generate the pulse on the TX pin since it will remain in a SLEEP state.

    Just taking a quick  look at your hardware there are some components that are missing and some recommendations that I would make:

    • VDD we typically recommend some capacitors to ground to ensure a clean supply
    • VIO I am not sure what the purpose of the resistor is here, the EVM uses a ferrite bead to make sure noise does not couple into the supply
    • Lots of components and connections missing on the RX path (LNAOUT, PGAIN,PGAOUT, and COMPIN) but this shouldn't affect signal generation on the TX pin
    • RREF wont be needed if RTD pins wont be used
    • Clock is 8MHz divided by 32 which yields 250kHz, there is too much of a difference here for a 300kHz transducer here signal might not generate appropriately depending on the transducers limitations.

    Best,

    Isaac

  • Hi Isaac,

    Thanks for your response.

    What do you recommend for a lower frequency? Are there any other drivers or should I replace my sensor with a 1MHz one?

    I'll try to answer your suggestions.

    VDD we typically recommend some capacitors to ground to ensure a clean supply

    I have 0.01uF and 0.1uF decoupling in VDD, but I forgot to show it in the circuit I posted.

    Will it be enough or do you recommend more capacitors?

    VIO I am not sure what the purpose of the resistor is here, the EVM uses a ferrite bead to make sure noise does not couple into the supply.

    I have a ferrite bead, this is not a resistor. It's a Sunlord GZ1608U600CTF ferrite.

    Lots of components and connections missing on the RX path (LNAOUT, PGAIN,PGAOUT, and COMPIN) but this shouldn't affect signal generation on the TX pin.

    I understand, I'll try to improve that part. At this moment I have mounted a 1nf capacitor between LNAOUT and PGAOUT. But I will better the filter in COMPIN.

    Clock is 8MHz divided by 32 which yields 250kHz, there is too much of a difference here for a 300kHz transducer here signal might not generate appropriately depending on the transducers limitations.

    I understand, but since I didn't have another Oscilator at that time and 250khz is still within the wide band of the sensor.

    What I really don't understand for now is why I have no signal on the start pin. I have the EN high and I see my trigger signal. Pic of the oscilloscope follows. But it seems that nothing happens on the start pin.

    Yellon - Enable pin

    Blue - Trigger pin

    Pink - Start pin

  • Hello Daniel,

    The frequency you are using is fine for air operation. The issue I am mainly concerned about is the max and minimum distance you are measuring between the transducer and the top of the liquid. Since TDC1000 does not have a large amounts of gain in the AFE I dont want you to accidentally miss the echoes if the signal is too weak. But my other recommendation for drivers would TUSS4470. This has a larger dynamic range and is capable of handling your 300kHz transducer. The interface is a little bit different but the device has an internal comparator that you can set to generate an interrupt when the threshold is crossed. It does not generate a START signal but you could always time from the beginning of the transmission.

    Responses on the hardware:

    1. The 0.01uF and 0.1uF decoupling in VDD should more than enough.
    2. Sorry made a mistake on the ferrite, not sure why I thought it was a resistor initially.
    3. For the interstage passive filters you can try these values, these were for a discontinued version of the EVM that is tuned for frequencies 58kHz to 300kHz.    
    4. If the transducer can operate within the 250kHz range then you should be fine.

    The pulse generation and START pulse generation both happen in the same state, hence why I am led to believe that the device is not entering the correct state. I have included an image of the state machine the device follows bellow. The two states that I would imagine are the bottlenecks to generate a the pulses would be the EN = high and trigger pulse state.

     

    Best,

    Isaac

  • Hi Isaac.
    Thanks a lot for all the information shared.
    I have a problem with the Osc 8MHZ. I am using 3.3V to power the circuit.

    The signal generated by the 8mhz crystal have an amplitude of 3v. It doesn't seem to excite the TDC1000.

    With a function generator I used a frequency of 1.5MHz and 5v of amplitude. I changed my divisor to 4. That way I can get the 300khz correctly and everything seems to work better.


    Now I have Start signal, the COMPIN pin has signal, but i don't understand if signal is normally.
    I analyzed together the TX/RX signal at this point.

    These are the signals I currently have on my oscilloscope.

    .

    I still have a few doubts:

    1 - If I use the VCOM_SEL internal selected in the config 2. I must connect the VCOM pin to the GND with 1nF capacitor only. Correct? I must not use any external power on the pin.

    2 - Can I use the VCOM_SEL internal mode and configure the filter as Isaac indicated in point 3? It would have some outline of the filter for a slightly higher bandwidth. I would like to use Fc at 300khz.

    3 - Do you think 3.3 volts is enough to operate the TDC1000?

    4 - Do you have any other tips for me to get an echo pulse?

    Note: I tried to change the blocking distance of the ultrasound sensor. Test with a barrier next to the sensor even without a barrier. But the TX/RX signal was always the same.

    At the moment I am using the following configuration:

    CONFIG_0 - 0x3F

    CONFIG_2 - 0x0

    CONFIG_3 - 0x4

    CONFIG_4 - 0x4

    TOF_1 - 0xE4

    TOF_0 - 0x0


    T0:                             0.83 us
    T1:                             3.33 us
    TX_CLOCK:                       300000.00 Hz
    CONFIG_0
            RAW:                    0x3F
            TX_FREQ_DIV:            4
            NUM_TX:                 31
    CONFIG_1
            RAW:                    0x40
            NUM_AVG:                1
            NUM_RX:                 0
    CONFIG_2
            RAW:                    0x0
            VCOM_SEL:               INT
            MEAS_MODE:              TOF
            DAMPING:                OFF
            CH_SWP:                 OFF
            EXT_CHSEL:              OFF
            CH_SEL:                 1
            TOF_MEAS_MODE:          0
    CONFIG_3
            RAW:                    0x4
            TEMP_MODE:              REF, RTD1, RTD2
            TEMP_RTD_SEL:           PT1000
            TEMP_CLK_DIV:           8
            BLANKING:               OFF
            ECHO_QUAL_THLD:         -220 mV
    CONFIG_4
            RAW:                    0x4
            RECEIVE_MODE:           SINGLE ECHO
            TRIG_EDGE_POLARITY:     RISING
            TX_PH_SHIFT_POS:        4
    TOF_1
            RAW:                    0xE4
            PGA_GAIN:               21 dB
            PGA_CTRL:               ON
            LNA_CTRL:               ON
            LNA_FB:                 RESISTIVE
            TIMING_REG[9:8]:        0
    TOF_0
            RAW:                    0x0
            TIMING_REG[9:0]:        0
    ERROR_FLAGS
            RAW:                    0x0
            ERR_SIG_WEAK:           0
            ERR_NO_SIG:             0
            ERR_SIG_HIGH:           0
    TIMEOUT
            RAW:                    0x48
            FORCE_SHORT_TOF:        ON
            SHORT_TOF_BLANK_PERIOD: 16 x T0 -> 13.33 us
            ECHO_TIMEOUT:           ON
            TOF_TIMEOUT_CTRL:       128 x T0 -> 106.67 us
    CLOCK_RATE
            RAW:                    0x0
            CLOCKIN_DIV:            1
            AUTOZERO_PERIOD:        64 x T0 -> 53.33 us
    TOF Control:                    Short TOF

    Best Regards

    Daniel Pozzatti

  • Hey Daniel,

    I am glad you were able to figure out the oscillator was part of the issue here and got the device to generate some signals.

    Regarding your questions:

    1. If I use the VCOM_SEL internal selected in the config 2. I must connect the VCOM pin to the GND with 1nF capacitor only. Correct? I must not use any external power on the pin.

    That is correct, if you are using the internal VCOM then an external supply is not required and the pin is only fitted with the capacitor.

    2. Can I use the VCOM_SEL internal mode and configure the filter as Isaac indicated in point 3? It would have some outline of the filter for a slightly higher bandwidth. I would like to use Fc at 300khz.

    Yes even when using the internal mode the VCOM on the filter stage is still configured following the same method. The filters do not have much of a loading effect on the common mode output voltage. Just dont use the VCOM to supply anything else as this is not to exceed 20uA. The info on the VCOM pin from the datasheet is below.

    3. Do you think 3.3 volts is enough to operate the TDC1000?

    It mainly depends on the distances you need to measure, but my recommendation would be to increase the VDD voltage to at least 5V or 5.5V this will increase the voltage of the generated pulse on the transducer. A larger voltage means it will generate a bigger ultrasonic burst, which means you can increase the max measurable distance. Ultrasonic signals become attenuated during their ToF and the higher the frequency the more prone they are to attenuation.

    4. Do you have any other tips for me to get an echo pulse?

    Note: I tried to change the blocking distance of the ultrasound sensor. Test with a barrier next to the sensor even without a barrier. But the TX/RX signal was always the same.

    This could be due to the way you are configuring the listening window. The receiver path on the TDC1000 only becomes during the echo listening period that is configured on the device. This is changed by using the SHORT_TOF_BLANK_PERIOD, TIMING_REG, AUTOZERO_PERIOD, and the TOF_TIMEOUT_CTRL registers. The ones you use depend on the TOF Measurement mode you are using and the mode you use depend  on the distance you are measuring along with the expected speed of sound in the medium you are transmitting.

     

    Best,

    Isaac