Ultrasonic Distance Measurement BoosterPack

Ultrasonic Distance Measurement BoosterPack

TI Designs

Ultrasonic Distance Measurement BoosterPack

TI Designs

This design guide provides a foundation for building ultrasonic distance measurement system using TI’s

MSP430™ MCU. The document includes methodology, testing, and design files to quickly evaluate and customize the design for your end application. TI Designs help you accelerate the time to market of your projects.

Design Resources

TIDA-00462

MSP430F5172

TPS61046

TPS71733

CD4049

LMP7715

Design Folder

Product Folder

Product Folder

Product Folder

Product Folder

Product Folder

ASK Our E2E Experts

Design Features

• Ultrasonic Technology

• Non-Contact Detection and Measurement

• Maximum Measurable Distance: 99 in

• Minimum Measurable Distance: 6 in

• Maximum Measured Error: < 1.5 in

• Current Consumption: < 1.8 mA at 5 V

• Simple, Low-Cost, System-in-a-Chip Solution

Featured Applications

• Factory Automation and Process Control

• Sensors and Field Transmitters

• Building Automation

• Portable Instruments

0.2

0

-0.2

-0.4

-0.6

-0.8

-1

-1.2

-1.4

0 10 20 30 40 50 60 70 80 90 100

Object Position (in)

D002

MSP430

MCU

Transmitter circuit

Ultrasonic sensor

(Transmitter)

Receiver circuit

Ultrasonic sensor

(Receiver)

Distance: D

Time-of-Flight: T

An IMPORTANT NOTICE at the end of this TI reference design addresses authorized use, intellectual property matters and other important disclaimers and information.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

1

Key System Specifications

1 Key System Specifications

www.ti.com

PARAMETER

Sensing range

Display

Measurement status

Trigger

Sonic frequency

Blind region or dead zone

Maximum measured error

Power supply

Current consumption

Table 1. Key System Specifications

SPECIFICATION

99 inches

The measured object distance is displayed in Sharp® Memory

LCD BoosterPack Plug-in Module

Onboard burst LED Indicator shows measurement in progress

Continuous: One measurement after every 204.8 ms

(Default board software implements continuous mode)

Manual: Onboard push button to start the measurement

40 kHz

6 in

Less than ±1.5 in

3.3 to 5 V

Less than 1.8 mA at 5 V

2 System Description

Sensors are essential for an automated industrial process. Programmable logic controllers (PLCs) need sensors to collect information about the process variables from the environment. Sensors allow PLCs to detect the state of process and take necessary actions based on logic as programmed inside PLCs. Even the best PLC cannot control the process without reliable sensors. Therefore, the need for accurate and reliable sensors is growing in many markets around the world, such as industrial and manufacturing, automotive, medical, energy, and smart grid applications. When it is necessary to detect the presence of an object without making any physical contact and measure its distance from the sensor over longer and wider distances than inductive or capacitive sensors can provide, ultrasonic sensors are often the only alternative. Ultrasonic sensors are well known for their robust performance because they work reliably even under harsh environmental conditions. Ultrasonic sensors are insensitive to fumes, dust, humidity, ambient noise, object color, opacity, surface finish, or shape. These features make ultrasonic sensors an obvious choice for usage in environments where traditional sensors cannot be used. Ultrasonic sensors have proven their suitability virtually in all industrial applications.

The scope of this design guide is to give system designers a head-start in integrating TI’s industrial ultralow-power MCU, analog signal conditioning, and power management technologies into their endequipment systems. This design guide describes the principle of operation and basic design process for a low-cost distance measuring system based on ultrasonic sound utilizing the MSP430 ultralow-power MCU.

This design guide also addresses component selection, design theory, and test results of the TI Design system. All the relevant design files like schematics, BOM, layer plots, Altium files, Gerber, and MSP430

MCU firmware are provided in

Section 10

.

2

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

3 Block Diagram

Block Diagram

The essential components in block diagram shown in

Figure 1

are the MSP430 MCU, two 40-kHz ultrasonic transducers (one transmitter and one receiver), transmitter circuit, receiver circuit, and power supply.

DC/DC converter

TPS61046

(U1)

FB

V_OUT = 9 V or 12 V

V_IN

J5

40-KHz crystal

(Y1)

BNC

(for programming)

SBW

Interface

J8, J9 40-KHz burst

Ping

Object

J1

SPI

GPIOs

+3.3V_LP

Timer_A

MSP430F5172

(U4)

Capture/Compare

Transmitter circuit

CD4049

(U3)

Receiver circuit

LMP7715

(U5)

Time, T

TX

Received echo

RX

Echo

J6

TPS71733

LDO (U2)

3.3 V

Distance, D

+5V_LP

+3.3V_LDO

D =

CT

2

Where, C = Speed of sound

T = Round trip ToF

To or from LaunchPad and BoosterPack

Figure 1. TIDA-00462 Block Diagram

The MSP430 MCU is the heart of the system. The firmware running inside the MSP430 generates a short burst signal of 40 kHz at regular intervals. Once the burst signal is generated, it is supplied to the transmitter circuitry. After receiving the 40-kHz electrical burst signal, the ultrasonic transmitter (TX) emits ultrasonic sound towards the object through the air. Once the burst is transmitted, the ultrasonic transmitter (TX) goes quiet to listen to the echo. These waves travel through the air, hit the object, and then reflect back to the system as an echo as shown in

Figure 1 . The ultrasonic receiver (RX) converts the

echoes to electrical signals of the same 40-kHz frequency. But these echoes are potentially weak signals, which need amplification and processing to become useful. Afterwards, the MSP430’s integrated analog comparator detects the arrival of the echo to the system. The MSP430 accurately measures the lag between the emitted ultrasonic burst and received echo and computes the distance of the object from the system using the speed of sound in the medium. The measured distance is then displayed using a

Sharp® Memory LCD BoosterPack Plug-in Module in inches with an accuracy of ±1 inch. The minimum distance that this system can measure is 6 inches and is limited by the ultrasonic transmitter’s settlingtime. The maximum distance that can be measured is 99 inches. The amplitude of the reflected ultrasonic signal must be high enough to allow reliable measurement. If the amplitude of the echo received by the system is so low that it is not detectable by the comparator, the system goes out of range. This is indicated by displaying an error message.

3.1

Highlighted Products

The MSP430-based ultrasonic distance measurement reference design features the following devices:

• MSP430F5172: Ultralow power MSP430

• CD4049: Hex inverter

• LMP7715: High-speed operational amplifier

• TPS61046: 28-V boost converter

• TSP71733: Low-noise, high-bandwidth PSRR, low-dropout, 150-mA linear regulator

For more information on each of these devices, see their respective product folders at www.ti.com

.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

3

Theory of Operation

4 Theory of Operation

www.ti.com

Sound waves are longitudinal pressure waves in the medium in which they are traveling (that is, the particles in the medium vibrate in a direction parallel to the movement of the wave). Consider sound as vibrations in a medium. Sound needs a medium to propagate. Sound does not exist in places with absolute vacuum such as in outer space. Sound waves can travel through all states of matter—solid, liquid, and gas. Sound travels faster in solids than in liquids, and faster in liquids than in gases.

The use of sound waves has been present for many different applications over the years, from the technique of counting seconds between a lightning flash and the sound of thunder to determine how far away the storm is to the more advanced techniques used in sonar and ultrasound imaging. One can calculate distance by knowing the speed and travel time. The thunderstorm example is one of the most basic applications. The storm sends out both light and sound in all directions, and since light has almost no travel time, one can use the speed of sound in air to determine how far away the storm is.

1.

2.

3.

Figure 2. Thunderstorm Distance Measurement

4

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Theory of Operation

This application is based upon the reflection of sound waves. Objects whose dimensions are larger than the wavelength of the impinging sound waves reflect them; these reflected waves are called an echo. If the speed of sound in the medium is known and the time taken for the sound waves to travel the distance from the source to the object and back is measured, the distance from the source to the object can be computed accurately. This is the measurement principle of this application. Here, the medium for the sound waves is air, and the sound waves used are ultrasonic. The ultrasonic waves are sounds of frequencies above 20 kHz, which cannot be heard by humans. Sound waves travel twice the distance (D) between the source and the object, so the total distance traveled by sound waves is computed by the formula given in

Equation 1 . The speed of sound in air is C

AIR and the measured round trip time-of-flight

(ToF) for the sound waves to travel from the source to the object and back is T seconds.

Total  Distance

=

2

´

D

=

C

AIR

´

T

(1)

=

C

AIR

2

´

T

13627.2

´ T

=

2

  inches

(2)

1. Emit ultrasonic burst at t = T

1

2. Reflected by object at t = T

2

Ultrasonic transmitter and receiver

Distance, D

3. Echo received at t = T

3

Time of Flight (ToF) = T = T

3

±

T

1

Figure 3. ToF Measurement

For a contactless ultrasonic distance measurement, the system has to rely on the object to reflect the pulse back to the system as an echo. The amplitude of the echo depends on the reflecting material and surface, distance, size, and orientation of the object.

Material and Surface

The nature of surface affects the amount of sound energy reflected or absorbed. Ultrasonic sensors are capable of detecting most of the objects like metal or non-metal, clear or opaque, liquid, solid, or granular having sufficient acoustic reflectivity, dry or wet, and rough or smooth. A disadvantage of the ultrasonic sensor is that sound-absorbing objects such as cloths, cotton, wool, carpets, soft rubber, and foam reflect poorly. Therefore, the maximum measurable range is lower for such objects. It can be difficult to detect objects with a large surface undulation because of irregular reflection.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

5

Theory of Operation

www.ti.com

Distance

The strength of ultrasonic waves propagated into the air attenuates rapidly with distance (inverse square).

This decrease is caused by diffusion loss on a spherical surface due to diffraction phenomenon and absorption loss, where the medium absorbs energy. As shown in

Figure 4

, the higher the frequency of the ultrasonic wave, the bigger the attenuation rate and the shorter the distance the wave reaches. Therefore, the shorter the distance of an object from a sensor, the stronger the returning echo. As the ultrasonic frequency increases, so does the attenuation of the sound waves in the air. Therefore, long-range sensors work at low frequencies, and short-range sensors work at high frequencies.

Figure 4. Attenuation of Ultrasonic Waves With Distance

Size

Reflections of ultrasound depend upon the size of the objects with respect to the wavelength of the transmitted ultrasound. Objects whose dimensions are larger than the wavelength of the impinging sound waves reflect them. Therefore, bigger objects reflect more signal than smaller objects. The signal strength of the returned echo drops off as the object size decreases.

6

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Theory of Operation

Orientation

The amplitude of the reflected signal is not only dependent on the reflection coefficient of an object, but also depends on its orientation. Most of the sound energy reflects back to the transducer, resulting in a high-amplitude echo when the surface is perpendicular to the ultrasound beam. However, if this object’s surface is tilted 45º, almost all energy will be reflected away from the surface, resulting in a very lowamplitude return echo to the transducer.

Ghost echo

True echo

Ultrasonic transmitter and receiver

Lost Echo

Figure 5. Echoes From Surfaces at Different Orientations

The speed of sound depends on various environmental factors like air temperature, relative humidity, pressure, density, air composition, altitude, wind speed, and its direction. If there is air turbulence along the path from the sensor to the object, then the average speed of sound will randomly change, causing the object range computed by the sensor to vary randomly from pulse to pulse. Air temperature has maximum influence on the speed of sound. The speed of sound is a function air temperature that can be determined approximately using

Equation 3 :

C

AIR

= 331.3

´ 1 +

T

273.15

  m/s

(3) where

• C

AIR

(T) = Speed of sound in dry air as a function of temperature in m/s

• T = Temperature of air in ºC

The approximate speed of sound in dry air at temperatures near 0°C can be calculated from:

C

AIR

( )

=

(

331.3

+

0.606

´

)

(4)

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

7

Theory of Operation

www.ti.com

Figure 6

shows that warmer temperatures increase the speed of sound because warmer particles generally move at a faster rate. The linear approximation is nearly equal to the actual value in the range marked by the two black lines, from T ≈ 250K to T ≈ 350K.

Figure 6. Speed of Sound versus Temperature

If accuracy is not a priority, stretch T from 225K to 400K as shown by the green lines. The error is:

• ≈ 0.80% at T = 225K

• ≈ 0.93% at T = 400K

8

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Theory of Operation

Figure 7

shows the percentage error after linear approximation in the temperature range between 150 K and 473 K.

Figure 7. Percentage Error After Linear Approximation

Because the accuracy of ultrasonic technology relies on knowing the speed of sound in the medium, every unforeseen change in that speed directly affects the accuracy of the measurement. At 25ºC, the speed of sound is 346.13 m/s and it changes by ~0.167% for each 1ºC change in air temperature. As the air temperature increases, air becomes denser and sound waves travel faster. As a result, measured distances appear to shorten unless some form of temperature compensation is applied. To achieve a higher accuracy, measure air temperature with a temperature sensor that corrects for distortion, or add more compensation circuitry that measure other environmental factors (like humidity) that affect the speed of sound. However, discussing various compensation techniques are beyond the scope of this reference design.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

9

Hardware Implementation

5 Hardware Implementation

www.ti.com

5.1

Ultrasonic Transducers

An ultrasonic transducer converts AC voltage into ultrasound and ultrasound into AC voltage. In ultrasonics, the term typically refers to piezoelectric transducers. Ultrasonic transducers are distinguished from piezoelectric ceramic audio transducers as ultrasonic transducers produce sound waves above 20 kHz that are inaudible to humans. When voltage is applied to piezoelectric ceramics, mechanical distortion is generated according to the excitation voltage and its frequency. When vibration is applied to piezoelectric ceramics, an electric charge is produced. The piezoelectric ceramic has a natural resonance frequency like a bell, meaning it continues to vibrate for some time when struck. If the frequency of the voltage applied to the piezoelectric ceramic is the same as its natural frequency, the crystal will settle into steady large amplitude oscillations that produce high intensity sound waves. By applying this principle, when a 40-kHz electric signal is added to a vibrator, constructed of two sheets of piezoelectric ceramics or a sheet of piezoelectric ceramics and a metal sheet, the electric signal is radiated by flexure vibration. As a reverse effect, when an ultrasonic vibration is added to the vibrator, an electric signal is produced.

Because of these effects, piezoelectric ceramics are used as ultrasonic sensors.

Figure 8. Ultrasonic Transducer Construction

This application uses separate transmitter and receiver open structure type ultrasonic sensor as shown in

Figure 8

. This multiple vibrator is a combination of a resonator and a vibrator, which is composed of a metal sheet and a piezoelectric ceramics sheet. The resonator is conical to efficiently radiate the ultrasonic waves generated by the vibration and to effectively concentrate the ultrasonic waves at the central part of the vibrator. The sensitivity of the transducer is the maximum at the resonant frequency of piezo-element. The directivity of transducer’s beam pattern allows detection of the object position in space. When the object enters the transducer lobe, the echo is received. The ultrasonic transmitter is tuned to the 40-kHz resonant frequency for maximum output, whereas the ultrasonic receiver is most sensitive incoming signal at 40 kHz to produce maximum voltage output. The ultrasonic transmitter

(MA40S4S) and receiver (MA40S4R) used for this application match those from Murata. These transducers can detect an object at a distance of 20 cm to 4 m.

10

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Hardware Implementation

5.2

MSP430 MCU Operation

The main role of the MSP430 MCU employed in this reference design is to drive the transmitter transducer with 12-cycle bursts of a 40-kHz electrical pulse train signal derived from the crystal oscillator at regular intervals, and measure the ToF. The Timer_D0 in the MSP430 is configured to generate 12-cycles of 40kHz signal on port pin PJ.3 pin (TX). The measurement time base is very stable as it is derived from a 40kHz quartz-crystal oscillator. The echo received by the receiver transducer is amplified by an operational amplifier and the amplified output is fed to the Comparator_B input. The Comparator_B senses the presence of the echo signal at its input and triggers a capture of Timer_A0 count value to capture compare register TA0CCR1. The capture is done at the instant the echo arrives at the system. The captured count is the time it takes for the ultrasonic burst to travel from the system to the object and back to the system. The distance in inches from the system to the object is computed by the MSP430 using this measured time. The measured distance is sent to the Sharp® Memory LCD BoosterPack Plug-in Module through SPI for display. Immediately after updating the display, the MSP430 goes to sleep mode to save power. The watchdog timer module is configured in interval timer mode to generate interrupts every 204.8

ms. The interrupt signal from the interval timer wakes up the MSP430 to repeat the measurement cycle and update the display. Apart from these services, the MSP430 MCU also enables the device to be connected and interfaced with other devices through its I/O ports and SPI signals routed to J8 and J9 connectors.

The MSP430F5172 (U4) is the core of this system. To maximize the output power for the ultrasonic transducer, it should be driven as close as possible to its specified frequency to maximize the output power. Therefore, a 40-kHz crystal (Y1) is chosen for the low-frequency crystal oscillator to match the resonant frequency of the ultrasonic transducers used in this application. R16 serves as the pullup resistor for the reset line, and the integrated brownout-protection circuit takes care of brownout conditions.

Capacitors C12 through C17 provide power-supply decoupling to the MSP430 and are located close to the power supply lines of the device. A 14-pin box header (J20) allows Spy-Bi-Wire interface to the MSP430 to provide in-circuit debugging and programming using the MSP430 flash emulation tool. A push-button is also provided to start the measurement manually. LED (D5) indicates measurement cycles. Port pin PJ.3

is configured to output the burst of 40-kHz square-wave required by the ultrasonic transmitter.

+3.3V

J21

142-0701-201

1

GND

GND

3

2

Y1

DNC

DNC

4

1

CM250C40000AZFT

40 kHZ

C20

22pF

C21

22pF

J14

J16

2

S1

1

SPI_CS

TRIGGER_SW

TRIGGER

SPI_CLK

SPI_SIMO

SPI_SOMI

LCD_PWR_CNTL

LCD_EN

LCD_SPI_CS

COM_INV

STOP

COMPIN

BSL_RX

BSL_TX

START

TX

+3.3V

SBWTCK

MSP430 MCU

9

10

38

39

28

7

8

23

24

29

30

31

34

35

36

19

20

21

22

13

14

15

16

11

12

5

6

3

4

1

2

U4

P1.0/PM_UCA0CLK/PM_UCB0STE/A0/CB0

P1.1/PM_UCA0TXD/PM_UCA0SIMO/A1/CB1

P1.2/PM_UCA0RXD/PM_UCA0SOMI/A2/CB2

P1.3/PM_UCB0CLK/PM_UCA0STE/A3/CB3

P1.4/PM_UCB0SIMO/PM_UCB0SDA/A4/CB4

P1.5/PM_UCB0SOMI/PM_UCB0SCL/A5/CB5

P1.6/PM_TD0.0

P1.7/PM_TD0.1

P2.0/PM_TD0.2

P2.1/PM_TD1.0

P2.2/PM_TD1.1

P2.3/PM_TD1.2

P2.4/PM_TEC0CLR/PM_TEC0FLT2/PM_TD0.0

P2.5/PM_TEC0FLT0/PM_TD0.1

P2.6/PM_TEC0FLT1/PM_TD0.2

P2.7/PM_TEC1CLR/PM_TEC1FLT1/PM_TD1.0

P3.0/PM_TEC1FLT2/PM_TD1.1

P3.1/PM_TEC1FLT0/PM_TD1.2

P3.2/PM_TD0.0/PM_SMCLK/CB14

P3.3/PM_TA0CLK/PM_CBOUT/CB13

P3.4/PM_TD0CLK/PM_MCLK

P3.5/PM_TA0.2/A8/_VEREF+/CB12

P3.6/PM_TA0.1/A7/VEREF-/CB11

P3.7/PM_TA0.0/A6/CB10

PJ.0/SMCLK/TDO/CB6

PJ.1/MCLK/TDI/TCLK/CB7

PJ.2/ADC10CLK/TMS/CB8

PJ.3/ACLK/TCK/CB9

PJ.4/XOUT

PJ.5/XIN

PJ.6/TD1CLK/TD0.1/CB15

32

TEST/SBWTCK

33

RST/NMI/SBWTDIO

MSP430F5172IRSB

R16

47k

GND SBWTDIO

DVIO

17

DVCC

27

AVCC

37

VCORE

25

AVSS

40

DVSS

DVSS

PAD

26

18

GND

R10

10.0

R11

10.0

R12

10.0

C11

0.47µF

C12

0.1µF

C13

10µF

C14

0.1µF

C15

10µF

C16

0.1µF

C17

10µF

GND GND GND

GND

Figure 9. MSP430F5172 MCU Circuitry

GND

1

D5

2

R20

Super Red

560 J17

STOP

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

11

Hardware Implementation

www.ti.com

5.3

Transmitter Circuit

The output drive circuit for the transducer is powered directly from the 12-V boost supply and provides approximately a 20-V

PP drive to the ultrasonic transmitter. The 20 V

PP is achieved by a bridge configuration with hex inverter gates CD4049 (U3). One inverter gate provides a 180° phase-shifted signal to one arm of the driver. The other arm is driven by the in-phase signal. This configuration doubles the voltage swing at the output and provides the required 20 V

PP to the transmitter transducer. Two gates are connected in parallel so that each arm can provide an adequate current drive to the transducer. Capacitors C9 and C10 block the DC to the transducer. Since the CD4049 operates on 12 V and the MSP430 operates on a VCC of 3.3 V, there is a logic level mismatch between the MSP430 and the output driver circuit. Bipolar transistor Q1 acts as a logic-level shifter between these two logic levels. The transmitter circuit must not drive the transducer with too much voltage. Specifically, do not exceed the transducer’s maximum voltage specification. The maximum driving voltage for ultrasonic transducer is 20 V

PP

.

40-KHz Burst Signal

Ultrasonic Sensor

(Transmitter)

CD4049UB

(VCC: Pin-1)

(GNC: Pin-8)

GND

Figure 10. Ultrasonic Transmitter Circuitry

12

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Hardware Implementation

5.4

Receiver Circuit

Once an ultrasonic signal has been generated from the ultrasonic transmitter, the next task is to detect and return the time of reflected pulse. The returning sound wave is significantly attenuated; therefore, amplification is necessary before the signal can be detected by a comparator. This amplification can be a single op-amp in a difference amplifier configuration.

When the ultrasonic sound wave hits the object, the echo is sent back to the MA40S4R receiver transducer (see

Figure 11 ). The strength of the returning ultrasonic sound wave is significantly attenuated

proportional to the object distance and needs amplification before the arrival of the echo can be detected by the MSP430’s integrated analog comparator Comparator_B. The receiver circuit is a single stage opamp circuit. Op-amp U5 is the five-pin low noise, low offset, rail-to-rail output TI op-amp LMP7715. This amplifier has a high-gain bandwidth and provides a sufficiently high gain at 40 kHz. The op-amp is connected in an inverting amplifier configuration. The input capacitor C25 blocks some residual DC, which is always present. R15 and R13 set the gain to 333 approximately and C19 provides a high-frequency rolloff. R18 and R19 bias the non-inverting input to a virtual mid-rail for single-supply operation of the op-amp.

The amplified ultrasonic signal swings above and below this virtual mid-rail. The high Q of the ultrasonic receiver (RX) selects the targeted frequencies and rejects unwanted frequencies other than 40 kHz. The output of the op-amp is connected to the Comparator_B CB12 input of the MSP430 through P3.5 port pin.

The on-chip software selectable RC filter, selectable voltage reference generator, and hysteresis generator provide a clean stable output CBOUT. The Comparator_B reference is internally selected to be

1.875 V. When no ultrasonic echo is received, the voltage level at CB12 goes slightly lower than the reference voltage. When an echo is received, the voltage level increases above the reference voltage and toggles the Comparator_B output (CBOUT), which is internally connected through software to input capture signal (CCI1B) of Timer_A0. R18 and Comparator_B reference can be fine-tuned for the required sensitivity and the measurable range can be optimized.

7 pF

0.01 µF

1.5K

499K

Ultrasonic transducer

(Receiver)

4

3

+

LMP7715

2

5

3.3 V

1

1M

10 µF

+

1M

Figure 11. Ultrasonic Receiver Circuitry

Pay attention to two parameters when selecting the op-amp:

1. Gain-bandwidth product

2. Slew rate

Gain-Bandwidth Product

From the LMP7715 datasheet ( SNOSAV0 ), the gain bandwidth product for the LMP7715 is ~14 MHz

(typical) at V+ = 2.5 V. Therefore, the maximum gain at 40 KHz is 14 MHz/40 KHz = 350. Actual gain in the circuit is set to 333, which is close to the maximum gain of 350 available using the LMP7715 op-amp.

Slew Rate

If a weak echo coming from the object placed at the maximum detectable range produces 250 mV at the output of the amplifier. Thus, the peak rate of change of the 250-mV sinusoidal signal at 40 kHz would be

250 mV × 2 × π × 40 kHz, which comes out to be around 0.628 V/μs. The slew rate of op-amp must be greater than this; the slew rate of the LMP7715 is around 9.5 V/ μs.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

13

Hardware Implementation

www.ti.com

5.5

Power Supply

The circuit uses the TPS71733 LDO to generate 3.3 V for the MSP430 MCU and receiver circuitry. Either

9 V or 12 V required for the ultrasonic transducer transmitter is generated by the TPS61046 boost converter. Use the following jumper settings to power-up the circuit:

POWERED BY

5-V external power supply

5 V from LaunchPad™

3.3 V from LaunchPad

Table 2. Jumper Settings

9 V 3.3 V

Short J2-1 and J2-2;

Short J6-1 and J6-2

Short J2-2 and J2-3;

Short J6-1 and J6-2

Short J6-2 and J6-3

Short J5-1 and J5-2

Short J1-2 and J1-3;

Short J5-1 and J5-2

Short J1-1 and J1-2;

Short J5-1 and J5-2

12 V

Short J5-2 and J5-3

Short J1-2 and J1-3;

Short J5-2 and J5-3

Short J1-1 and J1-2;

Short J5-2 and J5-3

+3.3V_LP

+5V_LP

SH-J1

J1

1

2

3

PEC03SAAN

EXT_PWR

J4

1

2

ED120/2DS

D1

V_IN

MBR0540T1G

D2

MBR0540T1G

C1

1µF

GND GND

C2

0.1µF

U1

A1

VIN

L1

LPS5030-103MLB

SW

VOUT

B2

C2

C1

EN

TPS610461YFF

FB

B1

GND

A2

FB

R2

560k

J3

R3

2.4k

V_OUT

GND

GND J5

PEC03SAAN

SH-J5

R4

54.2k

GND

D3

Green

GND

GND

Figure 12. TPS61046 Boost Converter

EXT_PWR +5V_LP

SH-J2 J2

1

2

3

PEC03SAAN

L2

VLS201610ET-100M

R1 1.6

LDO_IN

GND

C3

1µF

+3.3V_LDO

GND

C4

0.1µF

1

3

U2

TPS71733DCKR

IN OUT

5

EN NR

4

GND

GND GND

C7

0.01µF

GND

C5

1µF

C6

10µF

TP1

TP2

Figure 13. TPS71733 LDO

+3.3V_LDO

+3.3V

+3.3V_LP

SH-J6 J6

1

2

3

PEC03SAAN

14

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

5.6

Minimum and Maximum Measurable Distances

Hardware Implementation

5.6.1

Minimum Measurable Distance

The distance from the active surface of a transducer to the minimum sensing range is often referred to as the "blind zone" or "dead zone". Ideally, this distance would be zero. The transmit transducer’s settling time determines how much would be the minimum measurable distance. When the ultrasonic transducer is driven by an electrical signal at a frequency close to the specified resonance frequency, the transducer continues to oscillate like a bell for a brief interval even after the electrical signal stops due to natural mechanical resonance behavior of the transducer. This behavior is known as ringing (see

Figure 14 ). Due

to the nature of piezoelectric ceramics and the constraints of transducer design, there will always be some amount of ringing time. This time is necessary to dissipate mechanical energy after excitation ceases, the extent to which a transducer rings depends on its design. The amount of ringing also varies slightly from transducer to transducer of the same design due to manufacturing tolerances.

12-cycle, 40-kHz burst

Ringing time

TX output

Direct pick-up by receiver

RX output

Echo

Direct pick-up by receiver

RX output

Echo

Comparator threshold

Turn on comparator here

Figure 14. Ringing and Direct Ultrasonic Wave Pickup

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

15

Hardware Implementation

www.ti.com

As transmit and receive transducers are positioned close together, the receiver picks up due to direct coupling from the transmitter through PCB and air. During this time, the high-amplitude oscillations mask any echoes, making it difficult to differentiate between the directly coupled ringing and the returning echo.

There is a period after transmission during which no object can be reliably detected, known as the blanking distance. Therefore, a delay greater than the ringing time of the transducer is required before the receiver is turned-on. Mount transducers outwards at an angle and a cut in the PCB to greatly reduce the amount of direct pick-up; however, this pickup cannot be eliminated completely.

RX TX

TIDA-00462 board

Figure 15. Ultrasonic Sensor Orientation

16

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Hardware Implementation

Oscilloscope trace 3 in

Figure 16

shows the ringing sine wave due to resonance in the transducer. Notice that the ringing lasts for 1 ms, which is same as mentioned in the transducer’s datasheet.

Figure 16. Oscilloscope Trace of Transmitter’s 40-kHz Burst and Direct Wave Pickup

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

17

Hardware Implementation

www.ti.com

Figure 17

shows the oscilloscope traces for one complete measurement cycle. The rising edge on trace 1 indicates the start of new measurement cycle that repeats after every 204.8 ms. Trace 2 shows the 12cycle, 40-kHz burst at the output of the transmitter transducer. Trace 3 shows the amplified receiver transducer output pin of the op-amp. The first burst-signal on the trace 3 represents the signal directly received from the transmitter and is ignored by the MSP430. The next burst on the trace 3 represents the echo reflected by the object and is the signal used by the MSP430 for measurement. Trace 4 shows the width of the time interval measured by the MSP430. This width represents the time it takes for the burst to travel the distance from the measuring system to the object and back, and it depends on the distance measured.

Figure 17. Oscilloscope Trace of One Measurement Cycle

18

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Hardware Implementation

5.6.2

Maximum Measurable Distance

The maximum measurable distance is determined mainly by four aspects of the system:

1. Texture of the reflecting surface

2. Angle of the reflecting surface with respect to incident sound waves

3. Amplitude of the transmitted ultrasonic sound waves

4. Sensitivity of the receiving transducer

The maximum range depends on the object to be detected. Large and hard objects can be detected over a longer range than small and soft objects. Use transducers that can accept higher excitation voltage to increase transmission power. The gain of the receiver amplifier at 40 kHz determines what the comparator can detect. The ToF of reflecting object is measured with comparator threshold. Because the signal strength of the echoes depend on the size and the material of the reflectors, this threshold has to be chosen so low that it can detect all object, but high enough so that it will not be triggered by noise or multipath components. Adjusting comparator threshold voltage carefully guarantees that the smallest echo is detected. This reference design uses only a single stage amplifier whereas adding multiple receiver gain stages and the filtering circuit before the comparator would reduce the noise and help in improving the measurement range.

Ultrasonic transmitter and receiver

Actual distance

O

B

J

E

C

T

Blind Zone or

Dead Zone

Sensing range

Figure 18. Minimum and Maximum Measurable Distances

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

19

Software Implementation

6 Software Implementation

www.ti.com

For MSP430 firmware updates, Code Composer Studio™ (CCS) v6.1 is recommended. CCS is an integrated development environment (IDE) for Texas Instruments (TI) embedded processor families. CCS comprises a suite of tools used to develop and debug embedded applications. It includes compilers for each of TI's device families, source code editor, project build environment, debugger, profiler, simulators, real-time operating system, and many other features. The intuitive IDE provides a single user interface that goes through each step of the application development flow. For programming and debugging, the

MSP430F5172 implements an embedded emulation module (EEM). It is accessed and controlled through either 4-wire JTAG mode or Spy-Bi-Wire mode. This reference design only supports the Spy-Bi-Wire mode. For more details on how the features of the EEM can be used together with CCS, see Advanced

Debugging Using the Enhanced Emulation Module ( SLAA393 ). The 2-wire interface is made up of the

Spy-Bi-Wire test clock (SBWTCK) and Spy-Bi-Wire test data input/output (SBWTDIO) pins. The SBWTCK signal is the clock signal and is a dedicated pin. In normal operation, this pin is internally pulled to ground.

The SBWTDIO signal represents the data and is a bidirectional connection. To reduce the overhead of the

2-wire interface, the SBWTDIO line is shared with the RST/NMI pin of the device. For programming and debugging purposes, the SBWTCK, SBWTDIO, VCC, and GND from the debugger need to be connected on J20.

SH-J19

SBWTDIO

SBWTCK

J19

PEC03SAAN

11

13

7

9

1

3

5

J20

2

4

6

8

10

12

14

VCC_TOOL

VCC_TARGET

SBH11-PBPC-D07-ST-BK

BSL_TX

BSL_RX

+3.3V

GND

Figure 19. Spy-Bi-Wire Programming Connections

The application firmware for measuring ultrasonic distance is written in C for easy portability and built using CCS. The firmware uses the following functions and ISRs. To download the complete firmware, see the reference design files at http://www.ti.com/tool/TIDA-00462 .

// Function Definition

void

Init_SysTimer(

void

);

void

Init_SysClk(

void

);

void

Port_Mapping(

void

);

void

Init_IOPorts(

void

);

void

Init_Timer_TA0(

void

);

void

Start_Timer_TA0(

void

);

void

Stop_Timer_TA0_Get_Counts(

void

);

void

Stop_Timer_TA0(

void

);

void

Init_COMPB(

void

);

void

Start_COMPB(

void

);

void

Stop_COMPB(

void

);

void

Init_Timer_TD0(

void

);

void

Start_Timer_TD0(

void

);

void

Stop_Timer_TD0(

void

);

void

Init_Timer_TD1(

void

);

void

Start_Timer_TD1(

void

);

void

Stop_Timer_TD1(

void

);

void

Update_Display(

float

); aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa

20

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

Software Implementation

// Interrupt service routines (ISRs)

// Watchdog Timer ISR

#pragma

vector = WDT_VECTOR

__interrupt void

WDT_ISR(

void

)

{

}

Sharp96x96_SendToggleVCOMCommand();

//P3OUT ^= BIT3; // Toggle P3.3 using exclusive-OR (LED)

Start_Timer_TD0();

Start_Timer_TD1();

P2OUT &= ~(BIT0);

//PJOUT |= BIT3;

// Start Timer_TD0 to start sending burst signal

// Start Timer_TD1

// Reset TOF pulse

// Set PJ.3 (TX)

// Timer0_D1 ISR

#pragma

vector=TIMER0_D1_VECTOR

__interrupt void

TIMER_TD0_ISR(

void

)

{

TD0CTL0 &= ~(TDIFG); // Clear any pending interrupt

if

(Burst_Counter < ((2*BURST_PULSES) - 1))

{

PJOUT ^= BIT3; // Toggle PJ.3 (TX)

Burst_Counter++;

if

(Burst_Counter == BURST_PULSES)

{

P2OUT |= BIT0; // Set TOF pulse

Start_Timer_TA0(); // Start the TOF measurement counter (Timer_TA0) in the middle of burst signal

}

} a a a a a a a a a

else

{ a a a a a a a a a a a cycle

Stop_Timer_TD0();

PJOUT &= ~(BIT3);

Burst_Counter = 0;

// All pulses transmitted, stop Timer_TD0

// Reset PJ.3 (TX)

// Reset the burst counter to zero for next measurement a a a a a

} a

} a

// Timer0_TA0 CC1 ISR

#pragma

vector=TIMER0_A1_VECTOR

__interrupt void

TIMER_TA0_CC1_ISR(

void

)

{ valid

}

Stop_Timer_TA0();

Stop_COMPB();

Timer_TA0_OverFlow = TRUE; a a

// Stop Timer_A0 on overflow i.e. echo not received a

// Disabled Comparator_B a

// Set Timet_TA0 overflow flag indicating TOF counts not a a a a a a a aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa

// COMP_B ISR

#pragma

vector=COMP_B_VECTOR

__interrupt void

Comp_B_ISR (

void

)

{

Stop_COMPB(); // Disabled Comparator_B once echo is detected

Stop_Timer_TA0_Get_Counts(); // Stop Timer_D0 and read the TOF counts

//CBINT &= ~(CBIE); // Disable Comparator_B interrupt

__bic_SR_register_on_exit(LPM3_bits); // Exit LPM3

} aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

21

Software Implementation

// Timer1_D0 ISR

#pragma

vector=TIMER1_D0_VECTOR

__interrupt void

TIMER_TD1_ISR(

void

)

{

Stop_Timer_TD1();

Start_COMPB();

//P2OUT ^= (BIT0);

// Stop Timer_TD1 after 1msec

// Then enabled Comparator_B

// Reset TOF pulse

} www.ti.com

aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa

22

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

7 Test Setup

Object

Ultrasonic

TX + RX

Distance, D

Test Setup

Host computer

TIDA-00462 board

Bench

Figure 20. Test Setup

This section discusses the test setup and the system accuracy. Although these results adequately show the good performance of the system, they do not actually reflect the accuracy in a real environment. This section describes the scenario where some position measurements are taken to evaluate the position accuracy of our system in a real environment and the corresponding results.

To evaluate the accuracy of the system, we used a transmitter and receiver separated by certain known distance around 20 mm.

Figure 20

shows the test setup used in the distance measurements. The ultrasonic transmitter was configured to transmit an ultrasonic burst of 12 pulses at 40 kHz. The measurement rate was selected to make one ToF measurements every 204.8 ms. Since, the average temperature of lab was 25°C (approximately), a speed of sound of 346.13 m/s was estimated. The object position was incremented in steps of 1 inch in the range from 6 to 99 inches. A total of 32 ToF measurements were taken for each distance. After taking 32 measurements, the readings are averaged and the distance is calculated and displayed.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

23

Test Data

8 Test Data

NOTE:

The test data in the following sections were measured with the system at room temperature, unless otherwise noted.

www.ti.com

NOTE:

All of the measurements in this section were measured with calibrated lab equipment.

9

105

90

75

60

45

30

15

0

0 15 30 45 60

Object Position (in)

75 90 105

D001

Figure 21. Measured Position versus Set Position

0.2

0

-0.2

-0.4

-0.6

-0.8

-1

-1.2

-1.4

0 10 20 30 40 50 60 70 80 90 100

Object Position (in)

D002

Figure 22. Measured Position Error versus Set Position

Summary

The integrated analog Comparator_B, 16-bit Timer_D0, 16-bit Timer_D1, 16-bit Timer_A0 with hardware capture/compare registers, and the watchdog timer (in interval timer mode) peripherals simplify this ultrasonic distance measurement application design and provides a system-in-a-chip solution. The average current consumed by the application is less than 1.8 mA. This includes the quiescent currents of boost converter U1, LDO U2, op-amp U5, and CMOS hex inverter U3 and MSP430 MCU U4. The op-amp alone has a quiescent current of 1.15 mA and the remainder of the circuit current consumption is 650 μA.

This is made possible by taking advantage of the ultralow-current features of the MSP430. The MSP430 sleeps in LPM3 most of the time. Since the speed of sound is temperature dependent, the measured reading will be less accurate at temperatures other than room temperature. A simple thermistor-based temperature measurement and distance compensation can be employed in this application to allow the system to measure accurately over a wide range of temperatures. If required, the measured distance and temperature data can also be stored in the flash memory. Adding additional receiver gain and filter stages could improve the overall performance. To measure the distances less than 6 in, hardware and software filters must be implemented.

24

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

10 Design Files

10.1 Schematics

To download the schematics, see the design files at TIDA-00462 .

L1

LPS5030-103MLB

Boost Converter Circuit

+3.3V_LP

+5V_LP

SH-J1

J1

1

2

3

PEC03SAAN

EXT_PWR

J4

1

2

ED120/2DS

D1

V_IN

MBR0540T1G

D2

MBR0540T1G

C1

1µF

GND GND

C2

0.1µF

U1

A1

VIN

C1

EN

TPS610461YFF

SW

VOUT

B2

C2

FB

B1

GND

A2

FB

R2

560k

R4

54.2k

GND J5

PEC03SAAN GND

SH-J5

GND

J3

R3

2.4k

V_OUT

C6

10µF

TP1

TP2

D3

Green

GND

GND

Design Files

LDO Circuit

EXT_PWR +5V_LP

SH-J2 J2

1

2

3

PEC03SAAN

L2

VLS201610ET-100M

R1 1.6

LDO_IN

GND

C3

1µF

+3.3V_LDO

GND

C4

0.1µF

1

3

U2

TPS71733DCKR

IN OUT

5

EN NR

4

GND

GND GND

C7

0.01µF

GND

C5

1µF

+3.3V_LDO

+3.3V

+3.3V_LP

SH-J6 J6

1

2

3

PEC03SAAN

LCD_PWR_CNTL

LCD_EN

LCD_SPI_CS

SPI_CLK

+3.3V_LP

J22

J24

J25

9

11

13

15

5

7

1

3

17

19

J8

10

12

14

16

6

8

2

4

18

20

SSW-110-23-F-D

+5V_LP

GND TRIGGER

START

STOP

9

11

13

15

5

7

1

3

17

19

J9

10

12

14

16

6

8

2

4

18

20

J23

J18

SSW-110-23-F-D

GND

COM_INV

SPI_CS

SBWTDIO

SPI_SIMO

SPI_SOMI

J8 TO BP PIN MAPPING

BP-1 <-- J8-1 J8-2 --> BP-21

BP-2 <-- J8-3

BP-3 <-- J8-5

J8-4 --> BP-22

J8-6 --> BP-23

BP-4 <-- J8-7

BP-5 <-- J8-9

BP-6 <-- J8-11

BP-7 <-- J8-13

BP-8 <-- J8-15

BP-9 <-- J8-17

BP-10 <-- J8-19

J8-8 --> BP-24

J8-10 --> BP-25

J8-12 --> BP-26

J8-14 --> BP-27

J8-16 --> BP-28

J8-18 --> BP-29

J8-20 --> BP-30

J7 TO BP PIN MAPPING

BP-40 <-- J7-1 J7-2 --> BP-20

BP-39 <-- J7-3

BP-38 <-- J7-5

J7-4 --> BP-19

J7-6 --> BP-18

BP-37 <-- J7-7

BP-36 <-- J7-9

BP-35 <-- J7-11

BP-34 <-- J7-13

BP-33 <-- J7-15

BP-32 <-- J7-17

BP-31 <-- J7-19

J7-8 --> BP-17

J7-10 --> BP-16

J7-12 --> BP-15

J7-14 --> BP-14

J7-16 --> BP-13

J7-18 --> BP-12

J7-20 --> BP-11

SBWTDIO

SBWTCK

Note for user:

1. Ultrasonic measurement is issued either manually (TRIGGER_SW) or via Launchpad (TRIGGER signal).

2. BoosterPack execute the state machine which triggers the TX signal to the ultrasound transducers.

3. When the ultrasound wave is received it is amplified and fed to the COMPIN.

4. If the echo signal is valid signal STOP LED lights up and same STOP signal is also fed to LaunchPad.

Figure 23. Power Supply Circuitry and BP Connector Schematic

GND

SH-J19

Spy-bi-wire Interface

J19

PEC03SAAN

11

13

7

9

1

3

5

J20

2

4

6

8

10

12

14

VCC_TOOL

VCC_TARGET

SBH11-PBPC-D07-ST-BK

BSL_TX

BSL_RX

+3.3V

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

+3.3V

J7

R5

1.0k

D4

Green

GND

Ultrasonic Distance Measurement BoosterPack

25

Copyright © 2015, Texas Instruments Incorporated

Design Files

www.ti.com

Ultrasonic Transmitter Circuit

V_OUT

GND

C8

0.1µF

5

U3B

CD4049UBDR

4 US_TX_1

R6

10.0k

U3F

CD4049UBDR

15 3

U3A

CD4049UBDR

2 14

7

GND

V_OUT

U3C

CD4049UBDR

6

TP4

TX

R7

10.0k

R8

10.0k

1

Q1

MMBT3904LT1G

GND GND

C10

0.22µF

US_TX_A

GND GND

+3.3V

GND

11

V_OUT

U3E

CD4049UBDR

12

R9

100k

J10

1

DNP

J11

1

DNP

C9

0.22µF

US_TX_B

DVIO

DVCC

AVCC

17

27

37

VCORE

25

R10

10.0

C11

0.47µF

C12

0.1µF

C13

10µF

R11

10.0

C14

0.1µF

C15

10µF

R12

10.0

C16

0.1µF

C17

10µF

9

GND

V_OUT

U3D

CD4049UBDR

10 US_TX_2

TP3

J21

142-0701-201

1

GND

3

2

Y1

DNC

DNC

4

1

CM250C40000AZFT

40 kHZ

C20

22pF

GND

GND

C21

22pF

2

S1

1

J16

SPI_CS

TRIGGER_SW

TRIGGER

SPI_CLK

SPI_SIMO

SPI_SOMI

LCD_PWR_CNTL

LCD_EN

LCD_SPI_CS

COM_INV

STOP

COMPIN

BSL_RX

BSL_TX

START

TX

+3.3V

SBWTCK

MSP430 MCU

10

38

39

28

7

8

9

23

24

29

30

31

34

35

36

13

14

15

16

19

20

21

22

11

12

5

6

1

2

3

4

U4

P1.0/PM_UCA0CLK/PM_UCB0STE/A0/CB0

P1.1/PM_UCA0TXD/PM_UCA0SIMO/A1/CB1

P1.2/PM_UCA0RXD/PM_UCA0SOMI/A2/CB2

P1.3/PM_UCB0CLK/PM_UCA0STE/A3/CB3

P1.4/PM_UCB0SIMO/PM_UCB0SDA/A4/CB4

P1.5/PM_UCB0SOMI/PM_UCB0SCL/A5/CB5

P1.6/PM_TD0.0

P1.7/PM_TD0.1

P2.0/PM_TD0.2

P2.1/PM_TD1.0

P2.2/PM_TD1.1

P2.3/PM_TD1.2

P2.4/PM_TEC0CLR/PM_TEC0FLT2/PM_TD0.0

P2.5/PM_TEC0FLT0/PM_TD0.1

P2.6/PM_TEC0FLT1/PM_TD0.2

P2.7/PM_TEC1CLR/PM_TEC1FLT1/PM_TD1.0

P3.0/PM_TEC1FLT2/PM_TD1.1

P3.1/PM_TEC1FLT0/PM_TD1.2

P3.2/PM_TD0.0/PM_SMCLK/CB14

P3.3/PM_TA0CLK/PM_CBOUT/CB13

P3.4/PM_TD0CLK/PM_MCLK

P3.5/PM_TA0.2/A8/_VEREF+/CB12

P3.6/PM_TA0.1/A7/VEREF-/CB11

P3.7/PM_TA0.0/A6/CB10

PJ.0/SMCLK/TDO/CB6

PJ.1/MCLK/TDI/TCLK/CB7

PJ.2/ADC10CLK/TMS/CB8

PJ.3/ACLK/TCK/CB9

PJ.4/XOUT

PJ.5/XIN

PJ.6/TD1CLK/TD0.1/CB15

32

TEST/SBWTCK

33

RST/NMI/SBWTDIO

MSP430F5172IRSB

R16

47k

SBWTDIO

AVSS

DVSS

DVSS

PAD

40

26

18

GND

GND

GND GND GND

TP5

GND

COMPIN

+3.3V

R17

10.0

C19

7pF

R15

499k

1

U5

LMP7715MF

V+

V-

4

3

C24

10µF

C18

0.1µF

GND

+3.3V

R18

1.00M

Ultrasonic Receiver Circuit

R13

1.50k

C25

0.01µF

R14

3.9k

TP6

GND GND

TP7

GND

R19

1.00M

C23

0.1µF

C22

10µF

GND

GND

1

D5

2

R20

Super Red

560 J17

STOP

Figure 24. MSP430 MCU and US Sensor (TX+RX) Circuitry Schematic

GND

J12

1

DNP

J13

1

DNP

26

Ultrasonic Distance Measurement BoosterPack

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

www.ti.com

10.2 Bill of Materials

To download the bill of materials (BOM), see the design files at TIDA-00462 .

10.3 Layout Prints

To download the layer plots, see the design files at TIDA-00462 .

10.4 Altium Project

To download the Altium project files, see the design files at TIDA-00462 .

10.5 Gerber Files

To download the Gerber files, see the design files at TIDA-00462 .

10.6 Assembly Drawings

To download the assembly drawings, see the design files at TIDA-00462 .

Design Files

11 References

1. Texas Instruments, MSP430F51x2 and MSP430F51x1 Mixed-Signal Microcontrollers, MSP430F5172

Datasheet ( SLAS619 )

2. Texas Instruments, MSP430x5xx and MSP430x6xx Family User's Guide, MSP430F5172 User's Guide

( SLAU208 )

3. Texas Instruments, TPS61046 28-V Output Voltage Boost Converter in WCSP Package, TPS61046

Datasheet ( SLVSCQ7 )

4. Texas Instruments, TPS717xx Low-Noise, High-Bandwidth PSRR, Low-Dropout, 150-mA Linear

Regulator, TPS71733 Datasheet ( SBVS068 )

5. Texas Instruments, CD4049UB, CD4050B CMOS Hex Inverting Buffer/Converter, CD4049 Datasheet,

( SCHS046 )

6. Texas Instruments, Single and Dual Precision, 17 MHz, Low Noise, CMOS Input Amplifiers, LMP7715

Datasheet ( SNOSAV0 )

7. Texas Instruments, Advanced Debugging Using the Enhanced Emulation Module (EEM) With Code

Composer Studio Version 6, EEM Application Report ( SLAA393 )

8. Murata, Ultrasonic Sensor Application Manual

( http://www.symmetron.ru/suppliers/murata/files/pdf/murata/ultrasonic-sensors.pdf

)

9. Texas Instruments, E2E Community ( http://e2e.ti.com/ )

12 About the Author

MATTHIEU CHEVRIER is a Systems Architect at Texas Instruments, where he is responsible for defining

and developing reference design solutions for the industrial segment. Matthieu brings to this role his extensive experience in embedded system designs in both hardware (power management, mixed signal, and so on) and software (such as low level drivers, RTOS, and compilers). Matthieu earned his master of science in electrical engineering (MSEE) from Supélec, an Ivy League university in France. Matthieu holds patents from IPO, EPO, and USPTO.

SHARAD YADAV is a Systems Engineer at Texas Instruments India, where he is responsible for

developing reference design solutions for the industrial segment. Sharad brings to this role his extensive experience in high-speed digital, mixed-signal boards, low-noise analog, and EMC protection circuit design.

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Ultrasonic Distance Measurement BoosterPack

Copyright © 2015, Texas Instruments Incorporated

27

Revision History

www.ti.com

Revision History

Changes from Original (September 2015) to A Revision

...............................................................................................

Page

• Changed from preview page

.............................................................................................................

1

NOTE: Page numbers for previous revisions may differ from page numbers in the current version.

28

Revision History

TIDUAI8A – September 2015 – Revised October 2015

Submit Documentation Feedback

Copyright © 2015, Texas Instruments Incorporated

IMPORTANT NOTICE FOR TI REFERENCE DESIGNS

Texas Instruments Incorporated ("TI") reference designs are solely intended to assist designers (“Buyers”) who are developing systems that incorporate TI semiconductor products (also referred to herein as “components”). Buyer understands and agrees that Buyer remains responsible for using its independent analysis, evaluation and judgment in designing Buyer’s systems and products.

TI reference designs have been created using standard laboratory conditions and engineering practices. TI has not conducted any

testing other than that specifically described in the published documentation for a particular reference design. TI may make corrections, enhancements, improvements and other changes to its reference designs.

Buyers are authorized to use TI reference designs with the TI component(s) identified in each particular reference design and to modify the reference design in the development of their end products. HOWEVER, NO OTHER LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL

OR OTHERWISE TO ANY OTHER TI INTELLECTUAL PROPERTY RIGHT, AND NO LICENSE TO ANY THIRD PARTY TECHNOLOGY

OR INTELLECTUAL PROPERTY RIGHT, IS GRANTED HEREIN, including but not limited to any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used.

Information published by TI regarding third-party products or services does not constitute a license to use such products or services, or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI.

TI REFERENCE DESIGNS ARE PROVIDED "AS IS". TI MAKES NO WARRANTIES OR REPRESENTATIONS WITH REGARD TO THE

REFERENCE DESIGNS OR USE OF THE REFERENCE DESIGNS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING ACCURACY OR

COMPLETENESS. TI DISCLAIMS ANY WARRANTY OF TITLE AND ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS

FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, QUIET POSSESSION, AND NON-INFRINGEMENT OF ANY THIRD PARTY

INTELLECTUAL PROPERTY RIGHTS WITH REGARD TO TI REFERENCE DESIGNS OR USE THEREOF. TI SHALL NOT BE LIABLE

FOR AND SHALL NOT DEFEND OR INDEMNIFY BUYERS AGAINST ANY THIRD PARTY INFRINGEMENT CLAIM THAT RELATES TO

OR IS BASED ON A COMBINATION OF COMPONENTS PROVIDED IN A TI REFERENCE DESIGN. IN NO EVENT SHALL TI BE

LIABLE FOR ANY ACTUAL, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES, HOWEVER CAUSED, ON ANY

THEORY OF LIABILITY AND WHETHER OR NOT TI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, ARISING IN

ANY WAY OUT OF TI REFERENCE DESIGNS OR BUYER’S USE OF TI REFERENCE DESIGNS.

TI reserves the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per

JESD46, latest issue, and to discontinue any product or service per JESD48, latest issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products are sold subject to TI’s terms and conditions of sale supplied 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 terms and conditions of sale of semiconductor products. Testing and other quality control techniques for TI components are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed.

TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide adequate design and operating safeguards.

Reproduction of significant portions of TI information in TI data books, data sheets or reference designs is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions.

Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards that anticipate dangerous failures, monitor failures and their consequences, lessen the likelihood of dangerous failures and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in

Buyer’s safety-critical applications.

In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. 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 parties have executed an agreement specifically governing such use.

Only those TI components that TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components that have not been so designated is solely at Buyer's risk, and Buyer is solely responsible for compliance with all legal and regulatory 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 of non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.

IMPORTANT NOTICE

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265

Copyright © 2015, Texas Instruments Incorporated

Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project