So, with the laser system falling through, I've been looking around at alternate distance measurements. Hence, ultrasonic. This isn't your typical sonar arrangement, though.
Your typical sonar system is composed of two ultrasonic transducers and associated electronics. One is used to transmit, one is used for recieve. Higher end units use one transducer (still figuring it out) and usually have closer range requirements. I'd like to build this one-transducer arrangement. Another issue/advantage to sonar is the wide detection spread. Some units can sense everything within a 90 degree cone, or so. Good if you're looking for ANYTHING, bad if you're looking for SOMETHING. Transducer frequency varies with size (smaller = tighter pattern). Some higher frequency ones (commonly 235KHz) have a much narrower cone, also.
I have a 25 KHz transducer, and might get my hands on a few 40KHz models. So, the pattern will be exceptionally wide. Cheap, though. So, how to counteract this? We turn to technology to do some cool effects?
Modern radar often times uses a phased array instead of mechanical means to slew the radar beam. A phased array is made up of many small radar units. These units have their signals carefully timed to generate specific phase relationships across the entire antenna. Due to the constructive/destructive nature of waves, this can be used to both combine the power of the antenna units and to focus the useful energy into a single beam. It also allows the unit to both be redundant and to electronically steer the beam path just by adjusting the phase from antenna to antenna.
Modern sonar also uses it, but in different ways. There may be a single sound source, but an array of recievers is used to detect the signal, allowing the arrival time and phase difference from each sensor to successfuly determine the direction and range (if active) of the target. This method is also used in modernday medical ultrasound to allow a 3D map to be generated from all the responses. We're looking at quite the DSP problem, though!
Considering I haven't found any hobbyist doing this, I thought it'd be nice to attempt to build a modular sonar array that can be configured to have any and all units be phase-related transmitters and recievers. I could control the whole thing via a CPLD, but my test unit will be based on a dsPIC probably.
The initial design will have single transducers (with associated filter and power electronics) placed on individual PCBs. Each PCB will have power, ground, digital in, digital out, analog in, analog out pins plus perhaps a serial port. The digital pins will allow a CPU to trigger and measure all recieved signals digitally, as most sonar units do. The analog pins will be there to let the user experiment with generating a cleaner analog frequency out and get the analog return. The transducers band-limit the signal, so the analog in may not be necessary. The analog out is more important as this could be coupled to a high speed ADC to allow more accurate phase measurements and to get certain signals out of the process (doppler shift, signal strength returns, etc). If some digitally programmed controls, like a digital pot, are used to control signal strength, a serial connection will also be supplied of the appropriate type. The individual boards have the advantage that you can reconfigure them to test out different transducer arrangements. They have the disadvantage of causing possible alignment difficulties that may result in bad results.
The CPU board would have headers for these boards. I could either generate the signals via PWM or output compare hardware. Returns would either go for input capture(CCP) or ADCs. Many dsPICs have a 500Ksps or 1Msps ADC with a 4 lane sample and hold system, allowing me to accurately measure 4 sensors at once. They also can have up to 8 PWMs and CCP units. In theory, this means that up to 4 analog signals or 8 digital signals could be processed at once. I think I'll start with 4 and go from there. I probably could do 8 analog signals at once at the speeds these ADCs work at without concern of being off too much (25Khz x8=200Khzx2=400Khz, so worst case is slightly better than the nyquist limit). Other architectures may be better for this (ARM people? AVR people?).
One idea for the mobile PC robot crowd is to use a 18F4550 PIC. These chips have a 200Ksps ADC and enough CCP units to possibly support a full 5 transducers. This data could be sent back on the USB bus for capture analysis inside a math program (I'm considering this myself for algorithm and hardware testing). After that, take what you've learned and put together a DSP algorithm for a dsPIC.
I think that this could result in quite exceptional sonar mapping with fairly low cost 1D, 2D, and 3D arrays.
Thoughts? Did I miss someone out there who's done this before?