XMOS for Phased Array Ultrasonic Rangefinder

XCore Project reviews, ideas, videos and proposals.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

XMOS for Phased Array Ultrasonic Rangefinder

Post by bsmithyman »

Would anyone be interested in discussing implementing a phased-array ultrasonic rangefinder using XMOS chips for the DSP functions and control logic? I've been giving this some thought, and would love an opportunity to discuss it. I suspect the technology is patent-encumbered, but it could provide a fun project for hobbyist purposes. If there's interest, I'll create a group.

Cheers,
Brendan


User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

I would!
I have build several rangefinders in the 10-20 kHz, and in the Ultrasonic (40-45) kHz freq. range.
I have also built working acoustic flashlight's, e.g. pre-modulate a Ultrasonic signal in such a way that the distortion in the air from an array creates a sub-band in the 0-20 kHz range, creates a audible sound (simplest way is to use double sideband amplitude modulation).

Using piezoelectric transducers in a "compact" array will create a narrow beam of possible beam direction of the array, since each transducer has a high directivivty around it's resonance frequency.

By the way, are we talking sound in the air or in water/liquids ?
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Post by bsmithyman »

Thanks lilltroll,
I kind of thought nobody saw my post :) This has ended up pretty long, so hopefully you're still interested by the end!
lilltroll wrote:I would!
I have build several rangefinders in the 10-20 kHz, and in the Ultrasonic (40-45) kHz freq. range.
I have also built working acoustic flashlight's, e.g. pre-modulate a Ultrasonic signal in such a way that the distortion in the air from an array creates a sub-band in the 0-20 kHz range, creates a audible sound (simplest way is to use double sideband amplitude modulation).
Sounds pretty cool! I haven't actually spent much time playing with ultrasound myself, but I'm doing my PhD in full-waveform inversion of seismic data, so the principles are basically the same. In a lot of ways, I think the preprocessing involved would be simpler than the acoustic flashlight concept (which I actually hadn't run across before).
lilltroll wrote:Using piezoelectric transducers in a "compact" array will create a narrow beam of possible beam direction of the array, since each transducer has a high directivivty around it's resonance frequency.
Yes, that's really the issue. I've been playing with some of the basic 40 kHz transducers sold by Maxbotix, and the beam crosstalk between two transducers is extremely narrow. I did find some that have a wider beam (Kobitone, e.g. 255-400ER25-ROX) with lobes at +/- 45 degrees at maybe 4-5 dB down, but they're large, almost $10/ea, and appear to specify different part numbers for transmitters and receivers.
lilltroll wrote:By the way, are we talking sound in the air or in water/liquids ?
My use would be in air, and I'm just doing it with hobbyist level resources. I'd like to put together something with better signal processing than the digital pulse detection that's commonly used, and possibly with some coherent beam forming to get better signal strength. I'd likely prototype some on my XC-1 and XC-1A, but I think an XS1-L1 would be ideal for an embedded processor that just returns an image. I'd like to be able to fire individual transducers as well, and look for diffraction hyperbolae to do a lateral map in front of a linear array of transducers.

My initial though would be to put together a decent analogue front end and do some signal processing with one or two transducers, and then clone the setup for 8 or so. Assuming 40 kHz, it'd be nice to oversample them a bit: I was looking at the TLV1570 from TI, which would max out at about 160 ksps per transducer if there were 8 being used. That wouldn't be enough to do software beam-forming, but it would be okay for pretty much any other use. The TLV1570 would require an analogue front end for each transducer (the LM324 seems popular for this purpose) and the XMOS chip would probably need a buffer (but a simple HC244 would work fine). There are lots of dedicated transducer amplifier/adc chips available, but the cost is quite high and the form factor is difficult to hand-assemble. Something like the Analog Devices AD9273 would include most of the analogue front end aspects, but would likely be overkill in this case.

I've mapped out the pins, and an XS1-L1-64 could drive it with a couple of I/O lines left over, XTAG pads, and 4 lines for either SPI or a 4-wire UART to talk to other hardware. Of course, the other issue is the XCore aspect. Assuming 8 bits per sample * 1.25 Msps * 0.06 s = 75 kB per shot, it would also need a RAM buffer (that assumption is for 10 m). When I was laying out I/O lines I was thinking of one SPI bus for the ADC, one for the boot flash and 4 x 256 kb SPI RAM chips, and one (aforementioned) for the control line to the outside world. Using SPI RAM modules would free up a number of I/O lines vs. a parallel solution, since the only real cost is a 4-bit port for chip select lines. I figure at least one 8-bit port and one 1-bi port would be needed to drive the transducers (8 lines to toggle the sign of the two poles of the transducer; two octal buffers, one with the inputs inverted; one control line to tri-state them).

Anyway, that's where I am so far. Whether it will actually ever get off the ground, I'm not sure :)
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

Using an Audio CODEC is much easier, everything (almost) is in the same chip, specially if you use different transmitter and receivers.
They can typically run up to 200 - 216 kHz.
Voltage is a problem. How much can the transducers take before they going ugly? 10-30 V PtP ??
You cannot use class-D output stage without filters, since the load is capacitive. It's class A/B or class G or output transformers.

If you have an "real"* 192 kHz soundcard with head-phones out, you can play with it in stereo.

Large SPL will create (non-linear) distortion, so it's probably better to use a log chirp instead of some pseudo-noise as MLS/ML-sequence. In the end you will need to calculate the cross-correlation between the signals, probably with FFT, finally windowing the linear part of the IR from the IFFT of the correlation in the frequency domain.

(The solution to the diff-equetion results in a nonlinear wave-equation for air. The nonlinear parts cannot be neglected over 120-130 dB ref. 20 uPa. That's the reason why the audio flash-light is working based on inter-modulation distortion)

*That isn't band-limited to 25 kHz
Probably not the most confused programmer anymore on the XCORE forum.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Post by bsmithyman »

The Audio CODEC idea makes a lot of sense; I can see how that would simplify things a lot. As far as the voltage range goes, it would definitely depend on the transceiver. The ones I have can handle 60V at a 10% duty cycle, or 20V RMS. Considering I was intending to use it with a 5V TTL buffer with flipping rails, that could only max at 10V, so I was well in the safe zone. I see your point about the amplifier issue; it just seemed like a reliable way to decouple the transmission stage from the receiver stage to be able to use the same transducer. Still, something I'll need to think about :)

The filtering seems fairly doable to me; I was planning on doing a filter pipeline in the XMOS chip, once I've got a decent input signal. The FFT is definitely an option, though to be honest it strikes me as faster to do deconvolution in the time domain. For a controlled source pulse, the Weiner filter can be calculated and stored, and it shouldn't be a terribly long time series if the pulse is chosen well. It might be more stable in fixed point using the FFT though.

I hadn't thought of the non-linearity issue, although at present I'm certainly driving the transducer at well under 120 dB. Interesting... To be honest, I haven't read/worked with nonlinear acoustics very much, as we typically assume linearity in seismic exploration settings (not a bad assumption). Any recommended reading?

Thanks a lot!
User avatar
lilltroll
XCore Expert
Posts: 956
Joined: Fri Dec 11, 2009 3:53 am
Location: Sweden, Eskilstuna

Post by lilltroll »

The cell-phones industry uses a lot of piezo-electric loudspeakers, therefore you can by class-G chips with intergraded boost-converters, typically meant to pump up the voltage from a 3.7 V Li-Poly cell. I have now idea if they support 45 kHz - you have to check the data-sheets.

Take a look at thermodynamics and adiabatic compression to start with.
The trouble is that we wrote the literature in Swedish at the university, before we entered EU, but I might have some links to English articles.
Anyway, the speed of sound is dependent on the temperature, and the temperature is depending on the pressure.
Therefore, the speed of the propagating wave will be dependent on the local pressure, and the waveform will thus be distorted.
Also, check out the acoustic impedance for air. The SPL easily gets large at high frequencies, even with a small area of the transducer and limited input power. You might get suprised over the actuall SPL's

A SPL meter often bandlimits at 8 Khz.

2 papers on dist. and measurening distance below 20 kHz
http://www.speech.kth.se/publications/m ... mphrey.pdf
http://www.anselmgoertz.de/Page10383/Mo ... es-swp.pdf
Probably not the most confused programmer anymore on the XCORE forum.
JohnR
Experienced Member
Posts: 93
Joined: Fri Dec 11, 2009 1:39 pm

Post by JohnR »

Hi,

I have been working on a optical rangefinder using a pulsed laser diode to measure the level in water wells. I posted an early version of the software in the projects section.

Obvious problems for this approach are that wells are not always dead straight, there may be obstructions in the way, eg pipes, electrical cables etc and, finally, the reflectivity of water is very low. I have some initial results on our water weel and right now am ready to test a more stable optical system.

Commercial well depth sounders are usually ultrasonic based, with I suppose, corrections for temperature and pressure. The only one I have seen is quite bulky and it would be a neat project to build a more up-to-date version with an XMOS chip doing the processing.

So I would be very happy to join your project.

John.
User avatar
bsmithyman
Experienced Member
Posts: 126
Joined: Fri Feb 12, 2010 10:31 pm

Post by bsmithyman »

lilltroll wrote: The cell-phones industry uses a lot of piezo-electric loudspeakers, therefore you can by class-G chips with intergraded boost-converters, typically meant to pump up the voltage from a 3.7 V Li-Poly cell. I have now idea if they support 45 kHz - you have to check the data-sheets.
Thanks lilltroll,
That could streamline things a fair bit, I'll take a look :)
lilltroll wrote:Take a look at thermodynamics and adiabatic compression to start with.
The trouble is that we wrote the literature in Swedish at the university, before we entered EU, but I might have some links to English articles.
Anyway, the speed of sound is dependent on the temperature, and the temperature is depending on the pressure.
Therefore, the speed of the propagating wave will be dependent on the local pressure, and the waveform will thus be distorted.
Makes sense, I wasn't thinking in terms of a non-linear regime, but I can see how it makes a big difference. For anyone reading along, a good introductory book is "Vibrations and Waves" by A.P. French (actually a great book all around). I don't think he gets into the nonlinear aspects though...
lilltroll wrote:2 papers on dist. and measurening distance below 20 kHz
http://www.speech.kth.se/publications/m ... mphrey.pdf
http://www.anselmgoertz.de/Page10383/Mo ... es-swp.pdf
Thanks, I'll take a look at those! I appreciate the reading, non-linear acoustics is definitely one of my weak points.
JohnR wrote:I have been working on a optical rangefinder using a pulsed laser diode to measure the level in water wells. I posted an early version of the software in the projects section.
Wow, the timing of that must be tricky, sounds very interesting. I didn't have much luck finding it via search; is there a keyword I can look for? Edit: Found it; must have been blind.
JohnR wrote:Commercial well depth sounders are usually ultrasonic based, with I suppose, corrections for temperature and pressure. The only one I have seen is quite bulky and it would be a neat project to build a more up-to-date version with an XMOS chip doing the processing.
I'm not sure what sort of depths you're thinking of, but I have heard of people using some of the off-the-shelf ultrasonic rangefinders for water-level detection (e.g. the Maxbotix line). Those are only good to ~6-10 m though, and I'm guessing you're talking much deeper if you're using lasers.
JohnR wrote:So I would be very happy to join your project.
Sounds great to me! At this point it's not so much a project as a fair bit of rambling, but I think there's a huge potential with the DSP and timing capabilities we have.