Question about Timing Sonar Pulse
bobledoux
Posts: 187
I'm working on a sonar application. The Stamp issues a Pulsout command that turns on a 555 timer to emit 12 ultrasonic pulses at 24khz. I then want to determine the length of time it takes to get a return.
How can I measure the return time? I need to resolve a range of 3 to 5 milliseconds. I don't see how the Pulsin command can work. The pulsout command actually represents the start of the time pulse. So a complete pulse switch, as required by Pulsin (like high to low to high) can't take place. The return I actually get is only low to high.
Any ideas out there?
I could program a PIC to send the pulsout, then drop a line, which returns to high with the sonic return. The Pic could could count time for the sound travel. But I was hoping to avoid a second processor in the project.
How can I measure the return time? I need to resolve a range of 3 to 5 milliseconds. I don't see how the Pulsin command can work. The pulsout command actually represents the start of the time pulse. So a complete pulse switch, as required by Pulsin (like high to low to high) can't take place. The return I actually get is only low to high.
Any ideas out there?
I could program a PIC to send the pulsout, then drop a line, which returns to high with the sonic return. The Pic could could count time for the sound travel. But I was hoping to avoid a second processor in the project.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
My application is this: A beacon contains sonar receiver and radio transmitter. Robot holds sonar transmitter and radio receiver. The distance between robot and beacon is measured by time of flight of sonar from robot to beacon plus radio return from beacon to robot.
Using a Pulsout command to generate the sonar transmission results in no way, I can tell, to initiate the Pulsin command, as the leading pulsin edge change has occurred before the pulsin command takes place.
One possibility is to program a PIC to pull a line low when it sends the 12 pulses for the sonar transmitter. Let the Pic monitor the radio receiver and pull the line high when the echo is heard. The Stamp could time this period using the Pulsin command.
Thanks for your input, Jon.