Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ......

13
1 SNAA292 – June 2016 Submit Documentation Feedback Copyright © 2016, Texas Instruments Incorporated Short Time Measurement Using TDC7201 All trademarks are the property of their respective owners. Application Report SNAA292 – June 2016 Short Time Measurement Using TDC7201 Vishy Viswanathan ABSTRACT Time-to-digital converters are used in measuring time-of-flight in multiple end applications such as drones, range finders, machine vision, robots, etc. These end applications can either use light waves, ultrasonic waves or other technologies such as RADAR. However, in each of these cases, time-of-flight between the transmitted wave and the reflected wave provides us with the distance traveled. Speed of light in air is multitudes of orders higher than the speed of sound waves in air and hence the total distance traveled by light waves is much higher during the time frame. For very short distance measurements (less than 2 meters), time-of-flight (TOF) is in the range of 0ns to 12ns and a centimeter accuracy corresponds to 67ps. The objective of this application note is to describe a method for measuring time periods down to 0.25ns using the TDC7201 with millimeter accuracy. Contents 1 Background ................................................................................................................... 2 2 TDC7201 Short Time Measurements ..................................................................................... 5 3 Test Setup .................................................................................................................... 7 4 Test Results ................................................................................................................. 11 5 References .................................................................................................................. 12 List of Figures 1 TDCx Measurement Summary............................................................................................. 2 2 TDC7201 Block Diagram ................................................................................................... 3 3 TDCx Measurement Mode 1 ............................................................................................... 4 4 TDCx Measurement Mode 2 ............................................................................................... 5 5 TDC7201 Short Time Measurements Block Diagram................................................................... 6 6 TDC7201 Short Time Measurements Timing Diagram ................................................................. 7 7 DTG5078 Based Test Setup ............................................................................................... 8 8 DTG5078 Generated Test Signals For Interleaved Short Time Measurements .................................... 9 9 TDC1 Register Setup ....................................................................................................... 9 10 TDC2 Register Setup ...................................................................................................... 10 11 TDC7201 Short Time Measurement Graph Data ...................................................................... 10 12 TDC7201 Combined Measurement Data for TOF=0.25ns: Raw and 128x Running Average ................... 11 13 TDC7201 Combined Measurement Data for TOF=0.25ns: Equivalent Distance Raw and 128x Running Average ...................................................................................................................... 11 14 TDC7201 Combined Measurement Data for TOF=0.5ns: Raw and 128x Running Average .................... 11 15 TDC7201 Combined Measurement Data for TOF=0.5ns: Equivalent Distance Raw and 128x Running Average ...................................................................................................................... 12 16 TDC7201 Combined Measurement Data for TOF=1.0ns: Raw and 128x Running Average .................... 12 17 TDC7201 Combined Measurement Data for TOF=1.0ns: Equivalent Distance Raw and 128x Running Average ...................................................................................................................... 12

Transcript of Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ......

Page 1: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

1SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

All trademarks are the property of their respective owners.

Application ReportSNAA292–June 2016

Short Time Measurement Using TDC7201

VishyViswanathan

ABSTRACTTime-to-digital converters are used in measuring time-of-flight in multiple end applications such as drones,range finders, machine vision, robots, etc. These end applications can either use light waves, ultrasonicwaves or other technologies such as RADAR. However, in each of these cases, time-of-flight between thetransmitted wave and the reflected wave provides us with the distance traveled. Speed of light in air ismultitudes of orders higher than the speed of sound waves in air and hence the total distance traveled bylight waves is much higher during the time frame. For very short distance measurements (less than 2meters), time-of-flight (TOF) is in the range of 0ns to 12ns and a centimeter accuracy corresponds to67ps. The objective of this application note is to describe a method for measuring time periods down to0.25ns using the TDC7201 with millimeter accuracy.

Contents1 Background ................................................................................................................... 22 TDC7201 Short Time Measurements ..................................................................................... 53 Test Setup .................................................................................................................... 74 Test Results................................................................................................................. 115 References .................................................................................................................. 12

List of Figures

1 TDCx Measurement Summary............................................................................................. 22 TDC7201 Block Diagram ................................................................................................... 33 TDCx Measurement Mode 1 ............................................................................................... 44 TDCx Measurement Mode 2 ............................................................................................... 55 TDC7201 Short Time Measurements Block Diagram................................................................... 66 TDC7201 Short Time Measurements Timing Diagram ................................................................. 77 DTG5078 Based Test Setup ............................................................................................... 88 DTG5078 Generated Test Signals For Interleaved Short Time Measurements .................................... 99 TDC1 Register Setup ....................................................................................................... 910 TDC2 Register Setup ...................................................................................................... 1011 TDC7201 Short Time Measurement Graph Data ...................................................................... 1012 TDC7201 Combined Measurement Data for TOF=0.25ns: Raw and 128x Running Average................... 1113 TDC7201 Combined Measurement Data for TOF=0.25ns: Equivalent Distance Raw and 128x Running

Average...................................................................................................................... 1114 TDC7201 Combined Measurement Data for TOF=0.5ns: Raw and 128x Running Average .................... 1115 TDC7201 Combined Measurement Data for TOF=0.5ns: Equivalent Distance Raw and 128x Running

Average...................................................................................................................... 1216 TDC7201 Combined Measurement Data for TOF=1.0ns: Raw and 128x Running Average .................... 1217 TDC7201 Combined Measurement Data for TOF=1.0ns: Equivalent Distance Raw and 128x Running

Average...................................................................................................................... 12

Page 2: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

STARTx

TOF1

1st STOP 2nd STOP

TOF2

STOPx

3rd STOP

TOF3

TOF4

TOF5

4th STOP 5th STOP

Background www.ti.com

2 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

1 BackgroundThe TDC7201 is targeted for use with ultrasonic, LIDAR, and SONAR equipment for time of flightapplications. It has two built-in Time-to-Digital Converters (TDCx, x = 1, 2) that perform independently thefunction of a stopwatch to measure time between a single event (edge on START pin) and multiplesubsequent events (edges on STOP pin). Each TDCx has an internal self-calibrated time base that isused to measure time with resolution in the order of 55ps. Self-calibration compensates for drift over timeand temperature and enables time-to-digital conversion accuracy in the order of picoseconds. A summaryof the TDCx functionality is shown in the Figure 1 and a block diagram of the TDC7201 is shown inFigure 2.

Figure 1. TDCx Measurement Summary

Page 3: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

VREG1

TRIGG1

START2

STOP2

CLOCK

INTB1

DOUT2

CSB1

DIN

SCLK

ENABLE

VDD2

TDC1 Core

Digital Core

SPI SLAVE

Configuration Registers

Clock Counter & Decode

Measurement Sequencer

GND1

Schmitt Triggered

Comparators

LDO & Reference Subsystem

Coarse Counter

Ring Osc

TDC7201

TRIGG2

START1

VREG2

STOP1

INTB2

DOUT1

VDD1

GND2

CSB2

TDC2 Core

Coarse Counter

Ring Osc Clock Counter & Decode

Copyright © 2016, Texas Instruments Incorporated

www.ti.com Background

3SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 2. TDC7201 Block Diagram

Each TDCx of the TDC7201 has two measurement modes: Measurement Mode 1 and MeasurementMode 2. The choice of mode is to be based on the duration of time to be measured by the device.

1.1 Measurement Mode 1In measurement mode 1, as shown in Figure 3, each TDCx of the TDC7201 performs the entire countingfrom STARTx to the last STOPx using its internal ring oscillator plus coarse counter. This method isrecommended for measuring shorter time durations of <500ns. Using measurement mode 1 for measuring>500ns decreases accuracy of the measurement. The minimum time measurable in measurement mode 1is 12ns.

Page 4: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

STARTx

TOF1

1st STOP

Input Clock1-16 Mhz

2nd STOP

TOF2

STOPx

3rd STOP

TOF3

Ring oscillator running

IQD IQDIQA

Background www.ti.com

4 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 3. TDCx Measurement Mode 1

1.2 Measurement Mode 2In measurement mode 2, the internal ring oscillator of each TDC of the TDC7201 is used only to countfractional parts of the total measured time. As shown in Figure 4, the internal ring oscillator starts countingfrom when it receives the STARTx signal until the first rising edge of the CLOCK. Then, the internal ringoscillator switches off, and the Clock counter starts counting the clock cycles of the external CLOCK inputuntil a STOPx pulse is received. The internal ring oscillator again starts counting from the STOPx signaluntil the next rising edge of the CLOCK.

This method is recommended for measuring long time durations and can only be used when the timebetween STARTx and STOPx is a minimum of 2 cycles of the external CLOCK. As the TDC7201 devicehas a maximum clock frequency of 16MHz, the minimum time measurable in measurement mode 2 is125ns.

Page 5: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

IQA

+IQB

STARTx

TIME1

Input Clock1-16 Mhz

TIME2

STOPx

TIME3

Clock Counter Running Clock Counter Running

CLOCK_COUNT1 CLOCK_COUNT2

Ring oscillator running

IQA IQBIQD

IQA

+IQB

IQDIQB

1st STOP 2nd STOP

TOF1TOF2

www.ti.com TDC7201 Short Time Measurements

5SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 4. TDCx Measurement Mode 2

2 TDC7201 Short Time MeasurementsThe minimum time measurable in measurement mode 1 is 12ns. It is feasible to do measurements downto 0.25ns using the two built-in TDCs of TDC7201 in what is called combined measurement mode. Incombined measurement mode, START1 and START2 are connected together:• A common REFERENCE_START signal is applied to START1 and START2 at least 12ns before

occurrence of actual Start and Stop signals• TOF Start (LIDAR_START) signal is connected to STOP1• TOF Stop (LIDAR_STOP) signal is connected to STOP2• Two time periods T1 (REFERENCE_START to LIDAR_START) and T2 (REFERENCE_START to

LIDAR_STOP) are measured and their difference T3 = (T2-T1) is the required time between Start toStop

An illustration of this combined measurement mode is in Figure 5 and Figure 6. It is necessary that theREFERENCE_START pulse is generated at least 12ns before the LIDAR_START pulse. TheREFERENCE_START could be generated by the MCU or by a pulse generator like the TektronixDTG5078. In the setup shown below, the two TDCs of the TDC7201 make their measurement in parallel.TDC1 measures the time period T1 and TDC2 measures the time period T2.

Page 6: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

REFERENCE START

TDC7201

START1

STOP1

Microcontroller(MSP430)

LIDAR_START

LIDAR_STOPSTART2

STOP2

T1

T2

Copyright © 2016, Texas Instruments Incorporated

TDC7201 Short Time Measurements www.ti.com

6 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 5. TDC7201 Short Time Measurements Block Diagram

Page 7: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

LIDAR START

LIDAR STOP

T3

REFERENCE START

T1

T2

START pulse from MCU to both TDCs

LIDAR transmit pulse providesSTOP1 for TDC1. TOF=T1.

First return pulse from LIDARSTOP2 for TDC2. TOF=T2.

Desired TOF = T3 = T2 ± T1.

www.ti.com Test Setup

7SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 6. TDC7201 Short Time Measurements Timing Diagram

3 Test SetupFigure 7shows a block diagram of the test setup. A Tektronix Data Timing Generator DTG5078 and aTDC7201EVM along with MSP430F5529 Launch Pad is used to demonstrate short time measurements.The DTG5078 is used to generate the REFERANCE_START, LIDAR_START and LIDAR_STOP signalsfollowing a DTG trigger from the MSP430. The REFERENCE_START signal is applied to the SMAconnector labeled “COMMON_START (J3)” on the TDC7201EVM which is connected to TDC7201START1 and START2 inputs. Following two changes are needed to the TDC7201EVM to useCOMMON_START (J3):• Populate zero ohm resistors R11 and R12• Remove R2 and R9

Page 8: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

Test Setup www.ti.com

8 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 7. DTG5078 Based Test Setup

An oscilloscope picture of the DTG5078 generated signals is shown in Figure 8. Channel 1 (Blue)represents the REFERENCE_START signal while Channel 2 (Pink) and Channel 3 (Green) represents theLIDAR_START and LIDAR_STOP signals.

Note LIDAR_START is generated 12ns after the REFERENCE _START signal. The start to stop delay forTDC7201 to measure is set as 0.25ns (Δ time period). A screen capture of the TDC7201EVM GUIregisters setup for TDC1 and TDC2 are shown in Figure 9 and Figure 10. A screen capture of theTDC7201EVM GUI graph measurement result is shown in Figure 11.

Page 9: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

www.ti.com Test Setup

9SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 8. DTG5078 Generated Test Signals For Interleaved Short Time Measurements

Figure 9. TDC1 Register Setup

Page 10: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

Test Setup www.ti.com

10 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 10. TDC2 Register Setup

Figure 11. TDC7201 Short Time Measurement Graph Data

Page 11: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

www.ti.com Test Results

11SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

4 Test ResultsFigure 12 to Figure 17 show the raw TOF measurement data of TDC7201 in combined measurementmode and its equivalent distance for TOF durations of 0.25ns, 0.5ns and 1ns. Over 50,000 samples arecaptured and plotted. A 128x running average of the raw samples is also shown. In summary, raw datashows an absolute worst case deviation of 60ps (0.9cm) while 128x running average data shows anabsolute worst case deviation of 6.5ps (1mm).

Figure 12. TDC7201 Combined Measurement Data for TOF=0.25ns: Raw and 128x Running Average

Figure 13. TDC7201 Combined Measurement Data for TOF=0.25ns: Equivalent Distance Raw and 128xRunning Average

Figure 14. TDC7201 Combined Measurement Data for TOF=0.5ns: Raw and 128x Running Average

Page 12: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

References www.ti.com

12 SNAA292–June 2016Submit Documentation Feedback

Copyright © 2016, Texas Instruments Incorporated

Short Time Measurement Using TDC7201

Figure 15. TDC7201 Combined Measurement Data for TOF=0.5ns: Equivalent Distance Raw and 128xRunning Average

Figure 16. TDC7201 Combined Measurement Data for TOF=1.0ns: Raw and 128x Running Average

Figure 17. TDC7201 Combined Measurement Data for TOF=1.0ns: Equivalent Distance Raw and 128xRunning Average

5 References1. TDC7201 Data Sheet (http://www.ti.com/lit/ds/symlink/tdc7201.pdf)

2. TDC7201 Evaluation Module (http://www.ti.com/tool/tdc7201-zax-evm)

Page 13: Short Time Measurement Using TDC7201 - TI. · PDF fileShort Time Measurement Using TDC7201 ... 5 TDC7201 Short Time Measurements Block Diagram ... (edges on STOP pin)

IMPORTANT NOTICE

Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and otherchanges to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latestissue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current andcomplete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of salesupplied at the time of order acknowledgment.TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s termsand conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessaryto support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarilyperformed.TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products andapplications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provideadequate design and operating safeguards.TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, orother intellectual property right relating to any combination, machine, or process in which TI components or services are used. Informationpublished by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty orendorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of thethird party, or a license from TI under the patents or other intellectual property of TI.Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alterationand is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altereddocumentation. Information of third parties may be subject to additional restrictions.Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or servicevoids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.TI is not responsible or liable for any such statements.Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirementsconcerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or supportthat may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards whichanticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might causeharm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the useof any TI components in safety-critical applications.In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is tohelp enable customers to design and create their own end-product solutions that meet applicable functional safety standards andrequirements. Nonetheless, such components are subject to these terms.No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the partieshave executed a special agreement specifically governing such use.Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use inmilitary/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI componentswhich have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal andregulatory requirements in connection with such use.TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use ofnon-designated products, TI will not be responsible for any failure to meet ISO/TS16949.

Products ApplicationsAudio www.ti.com/audio Automotive and Transportation www.ti.com/automotiveAmplifiers amplifier.ti.com Communications and Telecom www.ti.com/communicationsData Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computersDLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-appsDSP dsp.ti.com Energy and Lighting www.ti.com/energyClocks and Timers www.ti.com/clocks Industrial www.ti.com/industrialInterface interface.ti.com Medical www.ti.com/medicalLogic logic.ti.com Security www.ti.com/securityPower Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defenseMicrocontrollers microcontroller.ti.com Video and Imaging www.ti.com/videoRFID www.ti-rfid.comOMAP Applications Processors www.ti.com/omap TI E2E Community e2e.ti.comWireless Connectivity www.ti.com/wirelessconnectivity

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265Copyright © 2016, Texas Instruments Incorporated