Derive an equation that relates the distance d

Assignment Help Mechanical Engineering
Reference no: EM131090227

The objective of this problem is to design an underwater ultrasonic ranging system. The distance to the object, d, can vary from 1 to 100 m. The ultrasonic transducer will send a short 5-μs sound pulse into the water in the direction of interest. The sound wave will travel at 1500 m/s and reflect off the first object it runs into. The reflected wave will also travel at 1500 m/s back to the transducer. The reflected pulse is sensed by the same transducer. Your system will trigger the electronics (give a 5-μs digital pulse), measure the time of flight, then calculate the distance to the object. Using periodic interrupts, the software will issue a 5-μs pulse out PT1 once a second. Using interrupting input capture, the software will measure the time of flight, ?t. The input capture interrupt handler will calculate distance d as a decimal fixed-point value with units of 0.01 m and enter it into a FIFO queue. The main program will call the ritual, then get data out of the FIFO queue. The main program will call Alarm() if the distance is less than 15 m. You do not have to give the implementation of Alarm().You may use any of the FIFOs in Chapter 4 without showing its implementation. To solve this problem on other microcomputers, you may modify the hardware in Figure 6.26 to conform to the available ports. As shown in the figure the time of flight, ?t, is measured from the rise of PT1 (9S12 output) to the rise of PT0 (9S12 input).

Figure 6

1847_2cb4c7fe-557b-48f6-b12c-179c20d02a6a.png

a) Derive an equation that relates the distance d to the time of flight ?t.

b) Use this equation to calculate the minimum and maximum possible time of flight ?t.

c) Choose the TCNT rate that will satisfy the range and resolution requirements of this problem.

d) Give the ritual that initializes the interface, including PORTT timer channels 0 and 1. Don't worry about the other six timer channels.

e) Give the main program that first calls the ritual. The main program will empty the FIFO and call Alarm() if the distance drops below 15 m. Decide whether it is better to convert time (TCNT counts) to distance (decimal fixed point, 0.01m) here in the main program or in the interrupt handler.

f) Give the TC1handler() periodic interrupt handler that issues pulses of about 5-μs duration on PT1 every 1 sec. Good interrupt software has no backward jumps.

g) Give the TC0handler() interrupt handler that measures the time of flight and puts the result (either the count or the calculated distance) into the FIFO. Good interrupt software has no backward jumps. There may be additional sonic echoes, so only calculate the range of the first one and ignore the others.

Reference no: EM131090227

Questions Cloud

A dialogue on personal identity and immortality : 1. How does Gretchen criticize Sam's proposal (in the "First Night") that the same person is present on two different occasions just in case (or, exactly when) the same soul is present on those two occasions?
Implements a digital clock using an led or lcd display : The highest level is a main program that implements a digital clock using an LED or LCD display. Two, three, or four momentary switches will be used to control the operation of the digital clock.
Are certain techniques more appropriate for children : In what situations do you think neuroimaging would be useful? Are certain techniques more appropriate for children? What are the limits and cautions regarding various imaging techniques specifically related to children and adolescents? Provide exa..
Why do juveniles get involved with crime : After watching ABC Primetime: Juvenile Corrections, and reading the chapter, answer the following questions: Why do juveniles get involved with crime? What are some differences and challenges human services professionals may face when working with..
Derive an equation that relates the distance d : Derive an equation that relates the distance d to the time of flight ?t.
What would be the better measure for central tendency : What would you say would be the better measure for central tendency? (i.e., mean, median, or mode) and why? How variable are the data? How would you describe this data?
Should one base morality on self-interest : Take one of the theories of moral duty that we've been studying (Utilitarianism or Natural Law) and answer the central question of this course: How much time and energy should I spend on myself or others?
Write the ritual that configures an output compare on pt1 : Given this value of C, what is the pulse width at 110°F? Give the answer in both microseconds and E clock cycles.
Construct a powerpoint presentation discussing : Construct a PowerPoint Presentation discussing the proper way to create a job-application letter and resume.

Reviews

Write a Review

Mechanical Engineering Questions & Answers

  What is the equation for torque

Determine the stress that would result in a 1in schedule 40 steel pipe if a plumber applies a force of 70lb at the end of a wrench handle that is 16in long. What is the equation for torque? What is the value of T in this problem? Include units. What ..

  Calculate the outer surface temperature

Heat transfer per hour through a solid brick wall 6.5 m long, 3.1 m high and 300 mm thick is 3937 kJ/hr. If the coefficient of thermal conductivity of the brick wall is 0.88 W/mK and inner surface temperature is 4 deg. C, calculate the outer surfa..

  Fluidized bed boiler system by making the most appropriate

500 mw of thermal capacity and t 450 deg c p 80 bar boilers of thermal power plant in 6000 a valuable and

  Plot the cost versus r for 2 le r le 10 m and determine the

a water tank consists of a cylindrical part of radius r and height h and a hemispherical top. the tank is to be

  During an adiabatic process the pressure increased

A piston cylinder holds air at 80 degree F and 15 psi. During an adiabatic process the pressure increased to 165 psi and the entropy generated is 0.15 Btu/lb-degree R. Determine the isentropic efficiency for this

  Calculate the percentage of cobalt in the original sample

calculate the percentage of cobalt in the original sample

  Given the absolute roughness of the pipe is 026 mm density

a new cast iron pipe is 5 km long and 15 mm diameter is used to convey water at a rate of 0.0150m3s-1. given the

  Determine the final quality of the r-134a in the container

an air conditioning system is to be filled from a rigid container. the container initially contains 4 kg of saturated

  Compressed steadily as well adiabatically in a reversible

Refrigerant R-134a is compressed steadily and adiabatically in a reversible compressor. The volume flow rate entering the compressor is 800 ft3/min.

  A spherical water droplet having a diameter

A spherical water droplet having a diameter of 1.3 mm is allowed to fall from rest in atmospheric air at 1 atm and 20C. Estimate the velocities the duplet will attain after a drop of 30, 60, and 300 m.

  Determine the volume of the mixture using a the ideal-gas

a volume of 0.3 m3 of o2 at 200 k and 8 mpa is mixed with 0.5 m3 n2 at the same temperature and pressure forming a

  Compare it to that obtained from the regression line

Compare it to that obtained from the regression line.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd