sonar sensor project polaroid sonar sensor measuring distance with sound waves overview of the...
Post on 18-Jan-2016
238 Views
Preview:
TRANSCRIPT
Sonar Sensor Project Polaroid Sonar Sensor
Measuring Distance with Sound Waves Overview of the Sensor Module
Details of the Project Sonar Circuit and Processor Concept of Handshaking Sensor and Processor FSMs Calculation of Velocity
ECE 3450 M. A. Jupina, VU, 2013
Particulars of the Sonar Sensor
• Range is six inches to 35 feet
• 16 cycles at 49Khz
• Listen for return pattern
• Sound travels ~0.9 ms/ft
• Timer on DE2 determines distance
Transducer Transmitter/Receiver
ECE 3450 M. A. Jupina, VU, 2013
Ultrasonic Transducer and Circuitry
Sound waves above the audio range (20 Hz – 20 KHz) are transmitted and received by the sensor so as to ascertain thelocation of an object.
ECE 3450 M. A. Jupina, VU, 2013
Speed of Sound
Sound waves travel at
330 meters-per-second or
1082 feet-per-second or
1.082 feet-per-millisecond or
~0.9 millisecond-per-foot.
ECE 3450 M. A. Jupina, VU, 2013
Using Sound Waves to Measure Distance
SensorObject
X
The transmitted and reflected sound waves travel a total distance 2X.
Therefore, total travel time = (0.9ms/ft)(2X)
ECE 3450 M. A. Jupina, VU, 2013
Polaroid 6500 Sonar Ranging Module
ECE 3450 M. A. Jupina, VU, 2013
Circuit Diagram
Tra
nsdu
cer
ECE 3450 M. A. Jupina, VU, 2013
Circuit Diagram
Tra
nsdu
cer
ECE 3450 M. A. Jupina, VU, 2013
Schematic Equivalent Circuits of Polaroid Module’s Inputs and Outputs
The echo output is an open collector transistor output and requires a 4.7 K pull-up resistor between VCC and the output.
ECE 3450 M. A. Jupina, VU, 2013
Ultrasonic Source/Detector
ECE 3450 M. A. Jupina, VU, 2013
Detector Sensitivity versus Frequency
Polaroid detector has a maximum sensitivity at ~50 KHz.
ECE 3450 M. A. Jupina, VU, 2013
Ultrasonic Detection – Highly Directional
Transducer
Object
At 0o : detected signal = -3dB = 0.5 source signal At 30o : detected signal = -20dB = 0.01 source signal
Transducer
Side Lobes
2Vsin D DF
Main Beam
ECE 3450 M. A. Jupina, VU, 2013
Sonar Sensor SignalsPower is turned-on
External Trigger
16 cycles at 49.4 KHzsent by the transducer
Control lines tied low
Detector turned-off
Transducer receivesreflected signal
Measurement range is six inches (due to internal blanking) to 35 feet (due to sensitivity)
Data Request Signal
Data Ready Signal
Total Travel Time
~0.02ms 1/2E-5 = 50 KHz
ECE 3450 M. A. Jupina, VU, 2013
System Diagram
SonarCircuit
4-bits
DATA
Data Request
Data Ready
PROCESSOR SONAR SYSTEM
Data BusRegisters
ALU
FSMs
ECE 3450 M. A. Jupina, VU, 2013
“Handshaking” Signals
• When the Processor requires new data, it raises the Data Request line high (to “1” ).
• Once the Sonar System sees this and has placed the correct data on the 4-bit Data lines, it raises the Data Ready line high.
• When the Processor has taken the data (typically stored in a D-register) it lowers the Data Request line.
• After this, the Sonar System lowers the Data Ready line.• The Processor can only issue a new request after the Data
Ready line is lowered. ECE 3450 M. A. Jupina, VU, 2013
Sonar Project Circuit
?
Clock_50MHz
ECE 3450 M. A. Jupina, VU, 2013
The Sonar Counter Circuit
• The sonar module can be trigger (or initialized) up to 10 times every second (We will only trigger it once a second so a 1 Hz square wave will be used).
• A counter is used to measure the total travel time of the sound wave. The counter measures the time (actually the number of clock cycles) between the rising edge of the INIT or Data Request signal and the rising edge of the ECHO or Data Ready signal.
• The rising edge of Data Request signal triggers the counter to begin counting and the rising edge of the Data Ready signal triggers the registers in the counter block to store the count.
ECE 3450 M. A. Jupina, VU, 2013
Sonar Circuit Block
8-bitCounter
Divide by16
8-bits
CLOCK Cycles
4-bits
Position in feet
What is the system clock frequency if 54 clock cycles are to represent a measured distance of 3 feet?
ECE 3450 M. A. Jupina, VU, 2013
Position Measurement
• The Sonar Count is divided down to a number to represent the position in feet. The position is updated once every second.
• The position of a person standing 2 to 7 feet away from the sonar sensor will be sensed.
ECE 3450 M. A. Jupina, VU, 2013
SONARCIRCUIT.BDF
ECE 3450 M. A. Jupina, VU, 2013
SONARCOUNT.VHD
ECE 3450 M. A. Jupina, VU, 2013
Sonar Count Simulation
ECE 3450 M. A. Jupina, VU, 2013
LPM_CLSHIFT
ECE 3450 M. A. Jupina, VU, 2013
LPM_CLSHIFT
Parameters
ECE 3450 M. A. Jupina, VU, 2013
SONARCIRCUIT.BDF
VCCOr
GND
ECE 3450 M. A. Jupina, VU, 2013
Sonar Circuit Simulation
ECE 3450 M. A. Jupina, VU, 2013
PROCESSOR Block
ECE 3450 M. A. Jupina, VU, 2013
PROCESSOR.BDF
Register A: Current PositionRegister B: Current VelocityRegister C: Previous PositionRegA – RegC: Calculates Velocity
ECE 3450 M. A. Jupina, VU, 2013
SENSORFSM.VHD
ECE 3450 M. A. Jupina, VU, 2013
SENSORFSM.VHD Con’t
ECE 3450 M. A. Jupina, VU, 2013
SENSOR FSM Simulation
ECE 3450 M. A. Jupina, VU, 2013
PROCFSM.VHD
ECE 3450 M. A. Jupina, VU, 2013
PROCFSM.VHD Con’t
ECE 3450 M. A. Jupina, VU, 2013
PROCFSM.VHD Con’t
ECE 3450 M. A. Jupina, VU, 2013
PROCESSOR FSM Simulation
ECE 3450 M. A. Jupina, VU, 2013
Sonar Project File for Simulation(SONARPROJECT1.BDF)
ECE 3450 M. A. Jupina, VU, 2013
Velocity Measurement
The magnitude of a person’s velocity in feet-per-second is determined by a subtraction circuit in the processor block and an absolute value circuit (lpm_abs block). The magnitude of the velocity is updated once every second.
ECE 3450 M. A. Jupina, VU, 2013
SONARPROJECT1.BDF
ECE 3450 M. A. Jupina, VU, 2013
SONARPROJECT1.BDF
ECE 3450 M. A. Jupina, VU, 2013
SONARPROJECT1.VWF
ECE 3450 M. A. Jupina, VU, 2013
SONARPROJECT1.VWF
ECE 3450 M. A. Jupina, VU, 2013
SONARPROJECT1.VWF
ECE 3450 M. A. Jupina, VU, 2013
Sonar Project File for Testing(SONARPROJECT2.BDF)
SystemClockFrequency ?
Signals to & from Sensor:INIT – PIN_D25ECHO – PIN_J22
?
? ?
?Clock_50MHz
ECE 3450 M. A. Jupina, VU, 2013
Pin Assignments for DE2 Board
1. Reset is PIN_N252. 50 MHz clock is PIN_N23. INIT is PIN_D25 (Pin 1 on JP1)4. ECHO is PIN_J22 (Pin 2 on JP1)5. Common Ground is Pin 12 on JP16. Seven Segment Displays are …
ECE 3450 M. A. Jupina, VU, 2013
ECE 3450 M. A. Jupina, VU, 2013
Clock Inputs
ECE 3450 M. A. Jupina, VU, 2013
ECE 3450 M. A. Jupina, VU, 2013
Header Pin Assignments
ECE 3450 M. A. Jupina, VU, 2013
Header Pin Assignments
ECE 3450 M. A. Jupina, VU, 2013
ECE 3450 M. A. Jupina, VU, 2013
Sonar Project Pre-Lab Assignment
1) Determine the system clock frequency such that 54 clock cycles represent a measured distance of 3 feet by the sonar sensor. Use this frequency to set up the SYSCLK signal in the SONARCIRCUIT.VWF waveform file.
2) Determine the state diagram and table of the SENSOR FSM.
3) Determine the state diagram and table and finish the VHDL Code in the procfsm.vhd file so that the following sequence of events can be performed in the Processor Block:
a) Load the “current” position data into register A.
b) Calculate the velocity by performing the following subtraction: RA–RC.
c) Load the velocity data into register B.
d) Load the “previous” position data into register C.
ECE 3450 M. A. Jupina, VU, 2013
Sonar Sensor Practicum WorkWork to be preformed in the Lab:1) Set up the SONARCIRCUIT.BDF file. Properly
configure the LPM_CLSHIFT block. Create a ModelSim simulation and verify the SONAR Circuit.
2) Set up the PROCESSOR.BDF file; save and compile it.
3) Set up the SONARPROJECT1.BDF file; save, compile, and simulate it by using ModelSim.
4) Set up, save, and compile the SONARPROJECT2.BDF file for testing at a sensor station in the lab.
ECE 3450 M. A. Jupina, VU, 2013
Design Verification at the Sensor Test Station1. Bring your laptop to the sensor test station.2. Start the Altera QUARTUS II software.3. Go to PROGRAMMER and add your
SONARPROJECT2.SOF file.4. Test your design by walking back and forth two to
seven feet in front of the sensor. What happens at 8 feet from the sensor?
5. Have either the instructor or TA verify the operation of your sonar sensor design.
6. Hand-in a print-out of the SONARPROJECT2.BDF file.
ECE 3450 M. A. Jupina, VU, 2013
Design Project: “Sonic Tape Measure” 1. Design and implement a sonic sensor system
that measures distances in the units of either centimeters or inches at distances greater than ~2 feet from the sensor and calculates velocities in units of cm/s or inch/s. Your system must be able to measure the distance of an object from the sensor at least 10 feet away within 1 inch or 3 cm of accuracy.
ECE 3450 M. A. Jupina, VU, 2013
Design Project: “Sonic Tape Measure” 2. You will need to increase the word size (> 4 bits) in
the processor block. You are to redesign the sonar circuit block in the prior sonar sensor project example. You can change the system clock frequency (see the note below and the following slide), the divider circuit, the counter circuit, etc to achieve your new system implementation. The seven segment displays can be used in whatever fashion you would like to display the distance measured and the calculated velocity. For example, the seven segment displays can display a base 10 or hex value indicating the total inches or centimeters measured, or the one seven segment display can indicate feet (in hex) and the second display can indicate inches (in hex).
ECE 3450 M. A. Jupina, VU, 2013
Divide-by-35 Circuit to Generate a 720 KHz Signal
ECE 3450 M. A. Jupina, VU, 2013
Design Project Deliverables 1. Each group will hand-in a design proposal (due date
TBA). In the design proposal (60% of the project grade), document all possible designs considered and then the final design (state why this design was chosen). Also, document contributions from each team member.
2. Each group will simulate their design to demonstrate functionality. Each group will demonstrate their design to the course instructor at the sensor test station (40% of the project grade). What is your measurement accuracy?
ECE 3450 M. A. Jupina, VU, 2013
top related