Sonar in a chip? I think I need a PIC programer....

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

I need to generate a chirp or click, record a couple of seconds with timestamps, pick the peaks out of the recording to do some math on the time to calculate distances, then transmit the result. Is there an existing chipset that can do this? Do I need to have a custom program written for a PIC? For testing and experimenting purposes software for a PC with a soundcard would be great, but eventually it's all got to fit in a tiny box. I'll worry about the instrument itself, but I don't know how to handle the computer side.
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

The device only needs to record time and amplitude. Not sure of the ideal sampling rate but I guess 5khz would do.
Mike6158
Posts: 409
Joined: Fri Nov 12, 2004 1:01 am
Location: Weimar, Texas
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Mike6158 »

I know of an ultrasonic sensor that is used in a robot whose construction details can be found in the book called "Insectronics" by Karl Williams. He uses it and a PIC to determine distance and then tell the robot to change direction. The module is an xmitter/ receiver pair. It's made by Devantech. Part number SRF04. <p>It can be found here as well as other places...<p>Parallax Website
<EDIT>
Could I have worded the first sentence any worse than what I did? I think not...<p>[ January 08, 2005: Message edited by: NE5U ]</p>
"If the nucleus of a sodium atom were the size of a golf ball, the outermost electrons would lie 2 miles away. Atoms, like galaxies, are cathedrals of cavernous space. Matter is energy."
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

Thanks but that's not what I need. The transmitter/reciever itself IS the project. I'm building the instrument, I just need the computer that will capture and interpret the sound.
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

PS the Basic Stamp and software part might be just what I need, tho. I just wanted to clarify that! Thanks.
Mike6158
Posts: 409
Joined: Fri Nov 12, 2004 1:01 am
Location: Weimar, Texas
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Mike6158 »

I'm pretty sure that a PIC will cost less and that it programs almost, not quite, exactly like the Basic Stamp chip.<p>Interpretation of the sound would be the part where I would go- "Oh" and slowly back away :D <p>That said, did you check the Microchip website? They have specialty chips called DSPIC's that can be used for signal processing.<p>Not to be hard headed (or nosey) but does the chirp of click have to be audible? If it doesn't then the USM that I mentioned would insulate you from the noise in the surrounding area. At least the audible noise anyway. The SRF04 in conjunction with the PIC causes the onboard transmitter to send a 40Khz ultrasonic pulse. The PIC makes the receiver pause after the sound is sent (100us)and then it waits (36ms)for the reflected wave to return. The output from the USM module is fed to the PIC which calc the distance based on the speed of sound at standard conditions. Adding a temp sensor would let it determine the speed of sound at ºC...<p>[ January 09, 2005: Message edited by: NE5U ]</p>
"If the nucleus of a sodium atom were the size of a golf ball, the outermost electrons would lie 2 miles away. Atoms, like galaxies, are cathedrals of cavernous space. Matter is energy."
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

Ultrasonic won't work in my application.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by philba »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by Tinkerer:
Ultrasonic won't work in my application.<hr></blockquote><p>From the initial description, I would think that ultrasonic should work. Can you explain why it won't? And, what would work?
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

I really don't know hardly anything about PICs, Basic Stamps, DSP, or programing. That's why the inital post. I only know what I need it to do. I was hoping to hook up with someone that could either point me to something already existing that could work (longshot, I know) or willing to do it for a reasonable fee.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by philba »

Have you googled for a PIC based ultrasonic design. There are a fair number of them out there but, iirc, you have to get a little creative on the keywords. I'm pretty sure I found at least 4 or 5 when I looked a year ago or so.
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

The project requires ranging up to several hundred feet. Ultrasonics loud enough to work would have dogs barking a mile away! Look, really, this is not my question. I need a computer/software to catch the echo and process it to determine the distance. It's possible there is computer/software designed for ultrasonic work that could be used and I'd like to hear about. The device I'm attaching it to is what I'm desiging and testing.
rocket scientist
Posts: 25
Joined: Mon Jan 03, 2005 1:01 am
Location: san diego
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by rocket scientist »

I have done quite a bit of work with TX adn RX of sound. The first thing I wonder about is what you mean by 'chirp'. Chirp normally means (in both sonar and radar literature) a frequncy sweep, which allows you to get, simultaneously,long pulses for increased TX energy and high bandwidth for high spatial resolution. However, this requires some advanced digital signal processing on the RX end.<p>If you can spend the money, I would recommend getting a DAQ pcmcia card and LabVIEW G (graphical) programming software from National Instruments, both of which you can use on a laptop. This will give you almost state-of-the-art-capability in digital active sonar, including ultrasound if you wish. How sophisticated you get will only depend on the software you write. And you really don't have to write software with LabVIEW, you simply connect existing blocks with virtual wires!!!! I find this great for prototyping. If you develop a design you really like, you can then port it to an FPGA chip.
Tinkerer
Posts: 21
Joined: Sat Jan 08, 2005 1:01 am
Location: Pennsylvania
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by Tinkerer »

Ok, forget I said "chirp". I'll need it to send the signal to whatever I decide will make the sound at the same moment it starts the clock to time the echos. I checked those data acquisition PCMCIA cards. They would be great but are WAY out of the budget.<p>Isn't there a way to use the soundcard in a PC to do what I need? That would be suitable for testing but I'd eventually need to scale it down to a very small package like a Stamp or PIC. Can I write a BASIC program to control the sound card?
rocket scientist
Posts: 25
Joined: Mon Jan 03, 2005 1:01 am
Location: san diego
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by rocket scientist »

Sounds cards are great digitizers for frequencies up to 20 kHz. You will probably get a good 12 bits of dynamic range from a 16 bit card. You can send your tranmit pulse to the audio channel to provide a time stamp to syncronize your audio channel with the TX. I am almostsure you can read the sound card digital output in BASIC, but I use Matlab to read wave files from the sound card so I can't help you there. Find someone that can help you do this in BASIC and you've got it.
rshayes
Posts: 1286
Joined: Tue Mar 04, 2003 1:01 am
Contact:

Re: Sonar in a chip? I think I need a PIC programer....

Post by rshayes »

There are devices, such as cameras and ultrasonic tape measures, that use ultrasonic ranging out to ten or fifteen feet. These use very small radiating and receiving areas. A more efficient transmitter and receiver, possibly using horns or focussing devices, might increase the range to 150 feet. Using a corner reflector as the target might also help. Better signal processing, such as low noise amplifiers and tuned, narrow band amplifiers would also help.<p>Optical rangefinders using solid state lasers will easily work at 150 feet, but they require that the time be measured in nanoseconds rather than milliseconds.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 41 guests