ECE 4510/5530 Microcontroller Applications Week 11bazuinb/ECE4510/Week11_1.pdf · ECE 4510/5530...
Transcript of ECE 4510/5530 Microcontroller Applications Week 11bazuinb/ECE4510/Week11_1.pdf · ECE 4510/5530...
ECE 4510/5530Microcontroller Applications
Week 11
Dr. Bradley J. BazuinAssociate Professor
Department of Electrical and Computer EngineeringCollege of Engineering and Applied Sciences
ECE 2510 2
Lab 10 Elements
• The Physics of Radar/Sonar Signal Processing
• PING
Physics Based Radar/Sonar Signal Processing
ECE 4510/5530
3
March 25, 2013
4
Effective Transmitted Power Density
The range of a wireless communications is dependent upon many system, antenna, and environmental factors.
Assuming on omni-directional antenna, the effective power at a radius R from the antenna is:
24 RPS T
avg
where TP is the transmitted (or received) signal power, R is the distance between the transmitter and receiver
AvgS is in W/m^2
Note: the surface area of a sphere is 22 4 RD
5
Free-Space Loss
• As an RF signal propagates, there is path loss.
tPtG rG
f
RrP
22
cRf4R4L
• As shown above
22
rtt
rttr R4
GGPL
GGPP
fc
Note
6
1st Order RF Range Estimate• Friis Transmission Formula
– Direct, line-of-sight range-power equation– No real-world effects taken into account
where: rP is the received (or transmitted)
tG is the effective transmitter (or receiver) antenna gain R is the distance between the transmitter and receiver, and is the wavelength f is the frequency
22
rtt2
2rt
tr Rf4cGGP
R4GGPP
7
System Range
• Maximum Range (Prmin is receiver sensitivity)
dBmPt
dBmGt
dBmGr
dBmPr
m0 mR1
tPtG rG
f
RrP
rtr
t GGPP
fcR
min4
March 25, 2013
8
Radar Range Equation
The power received by a radar has three components: the transmission, power reflected by the target, and the receiving antenna aperture.
eTT
R ARR
GPP
22 44
where is the radar cross section describing reflected power
424 RAGPP eTT
R
Using 2
4 e
TRAGG
Therefore 4
1
3min
22
4
R
TT
PGPR
Radar/Sonar Design
• Signal Transmission Power• The cross section of the target that reflects energy • Receiver Sensitivity • Antenna efficiency and directionality• In the simplest environment, compensation for path loss is
helpful (an amplifier with gain changing in time to compensation for path loss is desired)
• Reference: Merrill Skolnik, Introduction to Radar Systems, 3rd ed., McGraw-Hill Science/Engineering/Math, 2002.ISBN-13: 978-0072881387
ECE 4510/5530
9
Lab 10: see PING Notes
ECE 4510/5530
10
Distance Measurement UsingTime-of-Flight (TOF)
• Distances are measured based on the round-trip ultrasonic signals time-of-flight.
ECE 4510/5530
11
TofCDist air 2
2TofCDist air
PING)))™ Ultrasonic Distance Sensor (#28015), Parallax Inc., v1.5 2/15/2008, see www.parallax.com.
Speed of Ultrasound in Air
• The speed of sound in air is defined and is dependent upon a number of physical parameters. Temperature is the dominant factor, measured in °C.– See also http://en.wikipedia.org/wiki/Speed_of_sound
– Or PING)))™ Ultrasonic Distance Sensor (#28015)
ECE 4510/5530
12PING)))™ Ultrasonic Distance Sensor (#28015), Parallax Inc.,
v1.5 2/15/2008, see www.parallax.com.
sec/6.05.331 mTC cair
sec/606.03.331 mTC cair
Specifications
• Trigger pulse width (min and max)
• Delay from trigger to ultrasonic burst
• Return pulse width (min and max)
• Time before it can be retriggered
ECE 4510/5530
13PING)))™ Ultrasonic Distance Sensor (#28015), Parallax Inc., v1.5 2/15/2008, see www.parallax.com.
Design Considerations
• One pin input and output– Must trigger and measure the same pin– Design a “one-bit” bidirectional bus with a pull-down resistor.
The signal is expected to stay low.
• Measure the TOF pulse width– Use the ECT to measure rising and falling edge triggered times– If there is no “reflection” does the device time-out or should the
software?
ECE 4510/5530
14
Bi-Directional Bus
• Output to bus under the control of an enable signal• Input from bus whenever a read is desired• Bus at known high or low level when not “driven”
ECE 4510/5530
15
Busses are typically pulled-up
Generate the Bus Enable Timing
• Drive output low 165 nsec D to Q• Enable output buffer 240 nsec Z to Q• Make the pulse 15 usec• Disable the output buffer 240 nsec Q to Z
ECE 4510/5530
16PING)))™ Ultrasonic Distance Sensor (#28015),
Parallax Inc., v1.5 2/15/2008, see www.parallax.com.
‘540 data sheet worst case timing.
Complete Tristate operation before
tHOLDOFF = 750 usec
Determine the Max TOF
• Trigger the PING– Make sure nothing is in front of it
• See when the pulse returns to zero
• Note: a long delay between successive triggers should be used (10-100 msec period)
• Verify the pulse width versus distance relationship before proceeding (is it 18.5 msec ?)
ECE 4510/5530
17
Measure the TOF
• Use an ECT channel to measure the pulse width
• Floating point computations:– Use the time count time scaled by the clock rate to determine the
TOF. – Determine the DISTance from the TOF
• Perform the computations in mm or inches, not meters• That is: express C in terms of mm or in for the math
– Take the rounded integer value for the 3-BCD digit output
ECE 4510/5530
18
Temperature Compensation
• Measure the temperature periodically and recompute the speed of sound (in floating point)– Temperature at 1 Hz is sufficient. – Use one ATD sample or 4 and average ?– Compute the coefficient based on the DIP switch input
ECE 4510/5530
19
Expected Results (Dist.)
• Velocity of sound variation with temperature• Distance based on known time-of-flight
ECE 4510/5530
20
Min Time (msec) Time (msec) Time (msec) Time (msec) Time (msec) Max Time (msec)0.115 1.000 2.000 4.000 8.000 18.500
Temp (deg C) C (m/sec) Dist (in) Dist (in) Dist (in) Dist (in) Dist (in) Dist (in)0 331.30 0.750 6.522 13.043 26.087 52.173 120.6505 334.33 0.757 6.581 13.163 26.325 52.650 121.75410 337.36 0.764 6.641 13.282 26.564 53.127 122.85715 340.39 0.771 6.701 13.401 26.802 53.605 123.96120 343.42 0.777 6.760 13.520 27.041 54.082 125.06425 346.45 0.784 6.820 13.640 27.279 54.559 126.16830 349.48 0.791 6.880 13.759 27.518 55.036 127.27135 352.51 0.798 6.939 13.878 27.757 55.513 128.37440 355.54 0.805 6.999 13.998 27.995 55.990 129.47845 358.57 0.812 7.058 14.117 28.234 56.468 130.58150 361.60 0.819 7.118 14.236 28.472 56.945 131.685
Expected Results (TOF)
• Velocity of sound @ 25 °C• Time-of-flight for Known
Distances
• Note: is the object large enough to reflect a valid return signal?
ECE 4510/5530
21
Dist (in) C (m/sec) TOF (sec)@ 25 deg C
0.75 346.45 109.973E‐61 346.45 146.630E‐62 346.45 293.261E‐63 346.45 439.891E‐64 346.45 586.522E‐65 346.45 733.152E‐66 346.45 879.782E‐68 346.45 1.173E‐310 346.45 1.466E‐312 346.45 1.760E‐316 346.45 2.346E‐320 346.45 2.933E‐324 346.45 3.519E‐330 346.45 4.399E‐336 346.45 5.279E‐342 346.45 6.158E‐348 346.45 7.038E‐354 346.45 7.918E‐360 346.45 8.798E‐3