sonar – Neil's Log Book https://nrqm.ca What could possibly go wrong? Mon, 21 Feb 2011 23:00:07 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.1 Lots of Neat Options for an Acoustic Transducer https://nrqm.ca/2011/02/lots-of-neat-options-for-an-acoustic-transducer/ Mon, 21 Feb 2011 22:06:20 +0000 https://nrqm.ca/?p=548 I mentioned the US40KT-01 transducer pair from Meas Spec before, but it’s an air sensor.  One could cover it with a potting compound to waterproof it.  My source suggested 3M Scotchcast 2130, which is intended for electrical insulation but apparently has some desirable acoustic properties (viz being close to the acoustic impedance of water).  He cites Acoustic and dynamic mechanical properties of a polyurethane rubber [PDF] by Mott, Roland, and Corsaro as a good resource on this stuff, but I haven’t read it yet.

I also came across some really cheap waterproof transducers that may be suitable.  Unfortunately they both have high directivity, whereas I’d like at least an omnidirectional transmitter.  Another possible issue is that they’re made for outdoor applications, not underwater applications.  How waterproof is “waterproof”?

This guy has a super-cool post on driving the little waterproof transducers.  Instead of using a step-up transformer, he uses an inductor and a MOSFET.  The inductor gets charged from a 9 V battery through the MOSFET.  When the MOSFET is opened the magnetic field collapses and it sends about 300 mA of current through a diode to power the transmitter.  This is called the inductive flyback method.  Awesome!

One final note: I found what look like the transducers that are on the ranger modules I’m using.  Less than US$3 per pair.

]]>
Low-rent acoustic receiver https://nrqm.ca/2011/01/low-rent-acoustic-receiver/ Wed, 05 Jan 2011 07:07:08 +0000 https://nrqm.ca/?p=357
Receiver Circuit

Transmitter (top) and receiver (bottom) circuits.

I’ve previously described the power supply and transmitter for my acoustic modem.

The receiver circuit completes the modem’s hardware design.  It is simply a two-stage amplifier that gives a total gain of about 2000, in series with a band-pass filter.

The acoustic transducer produces a beautiful sine wave with nearly no noise.  I found that I could apply a huge gain to its output and the amplifier’s output would still be clean: the raw (unfiltered) output has a 5 V offset, and the signal fits into the 5 V above the offset.  In other words, the output is at -5 V when idle and peaks at around 0 V when the receiver receives a signal.

The goal is for the receiver to output a signal that is around -10 V when idle and peaks at -5 V when it receives a signal.  These voltages correspond respectively to logic low and high on the microcontroller.

The band-pass filter serves two functions: a blocking capacitor (the simplest kind of high-pass filter) removes the 5 V DC component, and a low-pass filter removes the 40 kHz carrier wave.  The filter also has a side-effect of attenuating the signal, so that the filter’s output peaks at 1 V instead of 5 V (this is bad).  The attenuation problem can probably be avoided, either by tuning the filter better (I’m not sure how), or by replacing the DC blocking capacitor with a diode or something that drops 5 V, or by subtracting 5 V from the output with a difference amplifier.  From now on I discuss the output of the filter, not the raw unfiltered amplifier output.

Acoustic Receiver Output

The receiver's output (0.5 V/div vertical and 500 μs/div horizontal)

You can see the receiver’s output in the photo above.  Unfortunately my screen capture technology is unsophisticated.  The output peaks at just over 1 V (due to the filter attenuation), and lasts for about 3 ms (recall that the 40 kHz carrier signal is filtered out, so it’s just one big chunk of signal).  The waveform corresponds to a very strong input into the receiver: I held a piece of paper about a foot above the modem and transmitted an acoustic ping with the transmitter.  The waveform looks somewhat different when the received signal is weaker:

Weaker received acoustic signal

The receiver output for a somewhat weaker signal (0.5 V/div vertical and 500 μs/div horizontal).

This corresponds to the piece of paper being held a metre or so away from the transmitter.  There is a dip in the middle of the signal, and a lone tertiary peak a little more than 0.5 ms after the original wave ends.  As the acoustic signal gets weaker, this dip gets more pronounced.  This is caused by ringing in the receiver transducer’s piezoelectric sensor.

As I mentioned in my post on the transmitter component, the transmitter encodes a 1 bit of data as eight acoustic pulses at 40 kHz (a 0 bit is simply encoded as no signal).  The total duration of the acoustic signal is 200 μs; clearly this is much less than the 3 ms output observed at the receiver.  What happens is that when the acoustic signal is received, the receiver starts to resonate, like a guitar string.

It takes 8 pulses for the receiver’s piezoelectric crystal to reach full resonance.  Once the acoustic signal stops, the crystal continues to resonate, until after 3 ms the energy finally dissipates and the crystal goes quiet.  I’m not totally sure what’s going on, but I think the dips are caused when the resonance somehow interferes with itself; you can observe this phenomenon in many resonance effects.  Eventually the resonance gets back into phase with itself (or whatever) and reinforces itself for a while.

Anyway, the good news is that even at large distances (>10 metres) the acoustic receiver can pick up the transmitted signal effectively, and the receiver’s output includes a strong peak that fits reliably in a 3 ms window.  This means that for data transmission, one bit can be sent every 3 ms, for a total bit rate of 333 bits per second.  This is a low data rate, but not so much lower than that of commercial modems.  I’ll write more about data transmission later.

]]>
Low-rent acoustic transmitter https://nrqm.ca/2010/12/low-rent-acoustic-transmitter/ Sun, 12 Dec 2010 22:44:02 +0000 https://nrqm.ca/?p=324 Acoustic transmitter circuit

Acoustic transmitter circuit.

Above you can see the transmitter part of my acoustic modem.  From left to right, the components are: the power supply, the acoustic transducer, the amplifier, and the microcontroller.

The problem: I need to send a 40 kHz, 20 V peak-to-peak square wave to the transducer.  The circuit has two outputs, + and -, that are connected to the two transducer pins.  In other words, each output needs to switch from +10 V to -10 V  and back once every 25 microseconds.

As always, there are a few decent solutions, and as always I didn’t implement the best one.

Solution: Transformer

I think the best solution, or at least the awesomest, is to use a step-up transformer.  I don’t need a transformer because the transducer I’m using is pretty low-voltage, so I can use it with a reasonable power supply.  A higher voltage transducer such as the Meas-Spec US40KT-01 [PDF], which operates at up to 300 V peak-to-peak, would definitely need a transformer.  The main downside of using a transformer is that I don’t know very much about using transformers, and also I suspect the circuitry will be more expensive (I do have room in my budget).  The upside is that it will produce a  high voltage signal and should be a simpler circuit once I figure it out.

Solution: Amplifier

I have a little microcontroller generating a 0 V to 5 V square wave at 40 kHz.  Originally I had some kind of vague notion that I would use an amplifer to bump the micro’s output up to 0 V to 20 V.

My stumbling block is that the microcontroller is grounded to the -10 V rail, so according to the op-amp, the micro’s outputs are actually from -10 V to -5 V.  How do you amplify that to a signal that goes from -10 V to +10 V?  I’m sure there’s a slick way of doing it by mucking around with virtual ground, but I gave up pretty quickly.

Solution: Schmitt Trigger

Suddenly it’s clear why I wrote a log entry about the Schmitt trigger!  Another reason: I was too busy to make a long log entry about something more complicated.

Originally I learned about the Schmitt trigger trying to figure out how to turn the receiver’s analog output into a digital signal.  It transforms a signal of arbitrary amplitude into a digital signal flipping back and forth between the op-amp’s two power rails.  I was going to turn the ±10 V output into a 0-5 V output by adding a diode to block the -10 V signal and a voltage divider to turn the +10 V signal into +5 V.

Anyway, the Schmitt trigger produces a ±10 V signal and hey, that’s exactly what I want, so I just made a Schmitt trigger with threshold levels between -10 V and -5 V (that being, again, the microcontroller’s output from the op-amp’s perspective).

It works okay.  The ±10 V waveform is more trapezoidal than square.  Square waves are always are kind of trapezoidal, but this one is really trapezoidal.  But it’s square enough and the acoustic signal it produces is fine.  The raw output of a receiver module receiving my signal is indistinguishable from that of the SRF04 I’m trying to copy, except my signal is marginally more powerful (since I’m sending the transducer a slightly higher voltage).

So that’s what I’m using as a transmitter for now.  The plan is to upgrade the transducer and switch to a transformer amplifier at some point down the line.  This transmitter functions as a proof-of-concept that works well in air (how to get it working underwater is TBD).

Output

Acoustic modem output waveform

Visualization of the output waveform.

The modem encodes data in acoustic pulses, as shown above.  The image is a representation of a single 1 bit, encoded as eight consecutive pulses at 40 kHz.  I will discuss this more later.

]]>
How to power an acoustic modem https://nrqm.ca/2010/11/how-to-power-an-acoustic-modem/ Thu, 18 Nov 2010 22:21:10 +0000 https://blizzle.cybertavern.net/?p=261 I mentioned before that I’m basing my acoustic transducer off the Devantech SRF04 ultrasonic ranger.  I’m removing the piezoelectric transducers from a dead SRF04 unit and using them for my modem.  The transducers, which are the part that generate and receive the acoustic pressure wave that carries data, have a range of about 6 metres or so (one way), are driven with up to 20 V, and resonate at around 40 kHz.

The puzzle I’m working on right now is how best to actuate the transducer to generate a 40 kHz pulse.  The SRF04 does it using a chip that’s intended to convert 5 V logic signals into the ±12 V signals used for the RS-232 serial protocol.  Unfortunately most RS-232 converter chips aren’t made to power an acoustic transducer, and they aren’t able to provide enough current to generate a strong signal.

I bought a couple ADM208EANZ RS-232 converters, which seem like they should be able to provide up to 40 mA.  I didn’t read the datasheet carefully enough and failed to notice that it needs a bunch of 0.1 μF polarized (i.e. aluminum electrolytic) capacitors.  I have 0.1 μF ceramic caps, and I have various electrolytic caps, but I don’t have 0.1 μF electrolytic caps.  The chip will generate +9 V with a 10 μF cap, but it won’t generate the -9 V rail.  I have no idea why some circuits require capacitors with polarity, but if the diagram has a plus sign next to a capacitor you really need to pay attention.  Ceramic capacitors, which don’t have polarity, might not work.

(Most RS-232 converter chips generate ±9 V instead of ±12 V, presumably because ±9 V is easier.  The input is 5 V, then they put that through a voltage doubler to generate 10 V and put that through an inverter to generate -10 V.  Then I guess they put both through something that drops 1 V (a regulator or something to stabilize the output) and you end up with ±9 V.)

If the ADM208EANZ can power the transducer, I think it will be the best solution.  I see three downsides to using an RS-232 converter:

  1. You’re limited to an 18 V swing (or perhaps even less) instead of the full 20 V.  This isn’t a major problem because the transducer output is roughly a logarithmic function of the voltage input, so the output difference between 18 V and 20 V isn’t very high.  But if you want to upgrade your transducer to something like the Maxbotix MaxSonar-UT transducer, which takes up to 60 V, then you’re stuck at 20 V.
  2. The receiver’s amplifier is a little more complex because you have to operate it on a single rail (i.e. 0 V to 5 V instead of -10 V to +10 V).  This downside is overwhelmed by the upside of not having to generate a  ±10 V power supply.
  3. The SRF04 documentation notes that they had to turn the RS-232 chip off while receiving to reduce noise.  The noise is probably from the step-up converter and inverter that generate the positive and negative voltages.  This is pretty annoying, and now that I mention it I recall that the ADM208EANZ doesn’t have a disable feature.  I might be able to filter the noise.

The upside is that the RS-232 converter can be powered from the same 5V supply as the rest of the electronics.  It doesn’t need a complicated battery assembly or external step-up converter, or a bunch of regulators to generate reliable voltage rails.  It just needs a battery and one 5 V regulator, which is more power efficient and space efficient.

One final comment: ADM208EANZ looks like Adam 20 Beanz.

]]>
How not to power an acoustic modem https://nrqm.ca/2010/11/how-not-to-power-an-acoustic-modem/ Sat, 13 Nov 2010 06:42:48 +0000 https://blizzle.cybertavern.net/?p=230 crummy power supply

How not to generate a ±10 V power supply

I feel pretty dumb talking to nobody like this.  My domain name doesn’t even work yet, but I guess logging is what engineers do.  And I’m imaginative enough to see the utility of it: it’ll be nice down the line to have a log to review, writing stuff down helps flesh out ideas, and an open design process will make it a heck of a lot easier to produce open documentation.  It will be tough to expose all my bad decisions and half-baked ignorance (and mixed metaphors), but I can suck it up.

My first project is to build an acoustic modem.  This follows the principle of multiplying work: the modem doubles as my class project for ELEC 571: Underwater Acoustics.  We’ve been using the Devantech SRF04 ultrasonic ranger in the mechatronics lab, and it strongly informs my design.  The SRF04 actually uses an RS-232 chip to generate ±9 V levels, which actuate a piezoelectric transducer.  I took a couple of the transducers from a broken SRF04 to use for my project.

I tried using an RS-232 chip that we had lying around in the lab, but those things have draconian current limits.  There’s no way I can power a whole circuit off of one.  I’m probably going to try it again soon though.

My solution: a DC/DC converter (AP34063N8L) to step up a 7.4 V lithium polymer battery up to 20 V.  Taking half the output as the reference voltage will produce a ±10 V power supply.  With that I can power pretty much anything I want.

I built the circuit shown above based on the AP34063N8L datasheet to step the battery up to 23 V.  It then uses four 5 V regulators to generate 20 V, 15 V, 10 V, and 5 V rails, of which I take 10 V to be the reference.  You may recognize that this circuit is completely ridiculous.

  • Problem #1: the circuit, under no load, draws about 30 mA, or 0.25 W of power (loading it increases the power consumption as you’d expect)
  • Problem #2: the 5 V regulators keep dying.
  • Problem #3: I basically stuck capacitors and inductors anywhere that they wouldn’t cause problems.

Problem #1 is the major stumbling block.  I will probably end up just using a battery pack or a few 9 V batteries to provide the ± rails.  That’s way less cool than using a DC/DC converter (or even an RS-232 converter) but it’s looking like a pretty sweet idea right now.

Problem #2 is interesting.  I’m not sure why, but I blew three regulators in one day.  They weren’t generating detectable heat or anything.  The circuit has the regulators chained together, so for example the one that generates 5 V is referenced to the negative rail and is powered by the regulator that generates 10 V.  The 10 V rail is referenced to the 5 V regulator’s output, and is powered by the 15 V rail.  And so on.  I assume this is a horrible way to do it.  It’s quite conceivable that the output pin on one of the middle regulators can’t sink current from a higher regulator, or maybe there’s some noise getting caught in a feedback loop.  Anyway I bought some 10 V and 20 V regulators.  I want to regulate the 20 V line to get rid of the ginormous ripple voltage coming from the step-up converter.

Problem #3 is mostly due to laziness: “I don’t feel like cutting another jumper wire, I’ll just use an inductor instead.”  And more capacitors can’t hurt, right?  Well, they also don’t help that much.  I did buy some 15 mH inductors to try to filter the power supply a little better.  They will be useless once I give up on this power supply and switch to 9 V batteries, but owning inductors makes me feel cool so it’s okay.

At this juncture it’s worth noting that I’m pretty much broke, so sometimes I’ll do things like build a crummy power supply because it’s cheaper (and niftier) than buying a few 9 V batteries, even though it’s actually way more expensive because I buy spare parts.  This is not my most admirable quality, and hopefully keeping this public logbook will help me develop better habits through shame.  On the bright side, my collection of useful components is expanding.

]]>