Ultrasonic Lens Failure

Assuming roughly planar waves come off the ultrasonic transducer head, it should be possible to focus them with a lens. After turning acrylic on a lathe didn’t work, I ordered a 3D printed part and tried this.

Lens and test rod to measure the speed of sound in this plastic.

The plastic normally seemed decently durable, but in several seconds the edge of the lens started curling up and ended up looking like the above. It was pretty warm to the touch and the browning seems to be due to the heat.

So why did this happen? To be honest, I have no idea but a first thing to test would be to thicken the edge. That angle may also be at the Brewster’s angle, which is the angle which gives total reflection (like glass at small angles is reflective). Unlike Snell’s law, Brewster’s angle is not perfectly analagous between light and sound. https://www.sciencedirect.com/science/article/abs/pii/0041624X95001018 The material might also just be too absorptive of the vibrational energy.

I’m still working on measuring the speed of sound and damping coefficient for sound waves in the rod.

Measuring Impedance as a Function of Frequency

Motivation: Measuring complex impedance as a function of frequency is usually done in the context of RF, but I care because the impedance of peizoelectric crystals has a large imaginary component which affects how to efficiently drive them and the resonant frequency. If you have a reactive load and do not want to worry about this, there are four-quadrant power supplies (they can sink as well as source current) which are specifically meant to amplify signals for driving this sort of thing.

There are real benchtop tools to measure impedance, but even used they usually start around $2k, so that’s out of the question for a hobby thing like this. I’ve also learned that there are impedence meters specifically for Peizoelectrics , so it’s neat to see that measuring peizoelectric impedance is common enough that there are devices built specifically for it.

What should peizoelectric impedance be in theory? The best resource I’ve found so far on peizoelectric circuit models is PDF Appendix C: the Rlc Circuit Model for A Piezoelectric Transducer, which gives a way to derive the relevant parameters from crystal geometry. I believe this reference is only applicable for airbacked crystals, when in reality almost all peizoelectric crystals are used in situations where they are connected to things. Peizoelectricity is a reversible process, so it stands to reason that attaching a load would add an inductor as the mechanical system would have momentum. This would definitely affect the electrical resonant frequency, but I haven’t had time to properly figure out this effect.

How am I measuring impedance? I’m just setting up a voltage bridge and driving it with a signal generator. The reference resistor keeps the total impedance nonnegledgible and mostly real, which is good because the signal generator can be weird when trying to source high currents or reactive loads. I actually had to increase the reference resistance from 100 Ohms to 1000 Ohms because V_in was starting to look like a triangle wave and this was affecting the results.

How am I automating this? Even though I’ve learned that trying to hook up electrical equipment to computers is usually a waste of time, I spent a day with my Rigol 1054Z and Koolertron JDS6600 signal generator getting this set up.

Communicating with the Rigol 1054Z can be done over USB (requiring the usbtmc kernel module on linux), and a typical way to do this is to open /dev/usbtmc0 (or whatever device the oscilloscope shows up as) as a file and write commands described in the communication module. The commands are described in the communication manual look like “:CHANnel1:COUPling AC”. I tried a bunch of things and what this guy is doing worked best: https://www.cibomahto.com/2010/04/controlling-a-rigol-oscilloscope-using-linux-and-python/. No ‘updated’ version of it in the comments worked better. Unfortunately, when playing around with this it seemed impossible to download more than 500 samples at a time with a single command over USB, despite the communication manual claiming the ability to download 1250000. Also downloading data which was not present on the screen appeared broken over USB.

Communicating over an ethernet cable uses the same commands as with USB and they can be sent with netcat. I ended up following this guide: https://www.theimpossiblecode.com/blog/rigol-ds1054z-screen-capture-linux/ but with python and sockets instead of netcat.

I would also like to mention https://github.com/pklaus/ds1054z, which can drive most of the oscilloscope’s functions over a computer with over a GUI and is the best software I’ve used for working with an oscilloscope.

As for the frequency generator, supposedly the accompanying CD (which I threw in the trash after unpacking it originally) had a communication manual in Chinese. Thankfully, some kind soul has put the google translated version online: https://www.eevblog.com/forum/testgear/anybody-know-anything-about-this-signal-generator/msg1442325/#msg1442325. This required a linux kernel module I did not have yet, ch341. Even more fortunately, someone has written a python wrapper to control these signal generators https://github.com/on1arf/jds6600_python, which actually works! A note, this requires ‘pyserial’ and will fail in a non-obvious way with the python module named ‘serial’.

Combining the two, I’ve written a python script that will set a frequency on the frequency generator, measure the voltage and phase difference for the setup, and produce a plot of the complex impedance of the load vs. frequency http://akmemorph.us/wp-content/uploads/2019/10/abc.py.

Results: A test with a 100 Ohm resistor:

I’m not sure to what extent the imaginary component is some error vs. due to an actual impedance of the resistor I am using. Still, it’s only a few percent.


The test with the capacitor went very well, with the predicted and actual impedance lying almost on top of each other.

I used it on a small peizoelectric buzzer, which clearly shows a resonance around 4.1 kHz. It would be neat to change the mechanical loading and see what happens to the resonance. I wasn’t able to detach the brass disk, which is used to make the sound louder, for comparison.

Impedance for the peizoelectric with a horn attached for ultrasonic cleaning advertised as resonant at 28kHz. It appears like there is a resonance there, but structure is a lot more complex than for the peizoelectric buzzer.

Future Work: There are a lot of ways this could be improved (sped up by testing multiple frequencies at once, improve the accuracy with auto ranging, have a better measurement of the reference impedance…) but I think it’s good enough for now. I’m most interested in getting this to work with some airbacked crystals for comparison.

Ultrasound from peizoelectrics

Another source of high intensity focused ultrasound uses peizoelectrics, either arranged over the inside of a section of a sphere or as a plane source which is then focused by an acoustic lens. To play with ultrasound from peizoelectrics, I ordered a ultrasound transducer and a driving board (driving peizoelectric crystals is supposedly nontrivial, so it will be nice to have a working driver in front of me for inspiration if I go futher down this path). Other people have done interesting things with this sort of transducer: https://www.youtube.com/watch?v=pFeek0a8s7Q

Just to test if it works, I glued the transducer to a metal tea tin and did the test of putting a piece of aluminum foil in the bath. The foil started disintegrating. This setup has already come in handy as an ultrasonic cleaner.

This transducer is driven at 24kHz, and given the speed of sound in water of 1.5km/s, this gives a wavelength of around 5cm. Having a number this large is both good and bad. It’s good because it implies that the surface quality on a lens or mirror will not need to be very precise. It’s bad because optics generally assumes that lenses are much larger than the wavelength, so there are thin film effects to worry about. I tried to make an acrylic lens by turning a thick block on a lathe, but ultimately failed at mounting it. I’m looking into other ways to make one currently.

Underwater Arcs: Elliptical Mirrors

Upon reading a bit more, I’ve noticed that sources mention using an elliptical mirror-which reflects waves from one focus to the other-instead of a parabola. This appears to mostly work, and I’ve looked into getting an elliptical chamber fabricated. The magnitude of the rarefaction behind the wavefront worries me a bit for some applications, but everything will change as more details are included.

The chamber will be open a bit before the focus so the waves can be applied to objects. The cords for the spark gap will go in the narrower hole in the back. I plan on doing more detailed simulation work before finalizing the chamber design and putting in an order.

Underwater Arcs: reflecting waves

So, as a sanity check I decided to simulate focusing the wave from an underwater arc. The simulation setup is very simplified-a cell is chosen to have 10X the pressure of the surrounding cells in a parabolic geometry. I’ve tried modeling this with cavitatingFoam and sonicFoam. sonicFoam only models the equation of state for gases which is not ideal.

With cavityFoam

And it looks like this will not work because of the different times to the focal point for different paths. This would not be a problem with an acoustic lens, so I will be working more on that instead.

Ordering Points in Faces

The polymesh format used by OpenFOAM requires that for a polyhedron’s face, the points are listed in order definining the circumference of a face, and such that the normal (from the right hand rule) is to the cell with a higher index or outside of the domain. It has been inconvenient to construct and maintain the correct point ordering, so I have switched to doing it in post. It took a while to think of a good algorithm so I’m writing it down. This requires some level of ‘niceness’ to the face but that’s true of CFD in general too.

The first point in an unordered list can be used unchanged. A vector normal to the plane the points roughly lie on (faces can be skew) can be calculated with the cross product of the vectors between one point and any other two points. The rest of the points can be sorted by the angle from the first point to their projection into the normal plane.

For example, given 5 points indexed 0-4, the 0th point will not change. A normal vector to the plane can be calculated with 3-0 cross 3-2 or any other pair. The center of mass of the face is just the average coordinate of {0…4}. The points can be sorted by the angle from their projection into the plane to 0 through the center of mass.

Underwater Arcs: Different Switches

The current was destroying the mechanical relay I was using, but a friend gave me some SKT 55/06D Thyristors. After a small trigger charge (~V, ~100mA) thyristors act as diodes, so they can be used as switches which stay open until the current through them stops and they reset. These are rated up to 700V, which gives roughly half the stored energy that the capacitor is capable of. The steady state current limit is only ~100 but the surge current is rated to 1300A, so they should be fine for this application. I’ve been concerned about the difference in shot quality, especially with wasted energy by the arcing on the relay, so I thought I would compare the two.

To measure current in the main line, I made a Rogowski coil. Changing currents induce a voltage in the coil, which can be measured in the usual manner. I tried calibrating the readings to the output of a signal generator, which gave a reading of 1.5E-6V/AHz. Unfortunately I was only able to calibrate it at higher frequencies, greater than 1MHz, as otherwise the signal was too small with the test current I could produce. The output voltage should correspond to dI/dt, but in this case it also had a phase lag of ~pi/2 behind that. Also the output was nonlinear in frequency, increasing faster than linearly above 5MHz. Obviously, this could be done better, and there are proper ways to compensate for the inductance of the coil and so on. There is also an amusing tradeoff, which is that without too much more efficiency, the coil would reach voltages beyond what is safe to probe with my oscilloscope, while with the efficiency currently, the voltages are low enough it is hard to test.

Below are three measurements of voltage on the coil and on the main line, two for the relay and one for the thyristor. The thyristor has much more consistent shots.

Notice difference in time scales
These all have pretty similar decay constants, implying the power dissipated by the switch is similar.

In all cases, which the swtich closes there is a momentary current increase seen on the Rogowski coil (hard to see). Then comes a ~0.5 ms period of roughly constant voltage, before the saltwater breaks down. I assume that the water in the gap heats up during this period. After this, the current spikes as resistance of the spark gap drops to around zero, and the resistance of the system is set by the 1 Ohm current limiting resistor. Finally, at around 150V the current is extinguished.

In terms of diagnostics, it would be nice to get a peizoelectric pressure sensor, but I am also concerned about difficulties due to frequency response with something like that.

The color also appears to change depending on the shot power, so I believe it would be interesting to look at spectra. I got a diffraction grating but haven’t taken any data.

I have realized that a better way to deposit energy into the water would be to limit the current with an inductor instead of a resistor, and hook up my other thyristor across the capactitor reverse to the starting polarization. This would allow the current to flow in the loop longer, dissipated only by the spark gap and the voltage drop across the thyristors. I’m not sure this would be better for pressure waves/shock wave generation, as the initial breakdown might be the main contributor for that. The speed of sound in water is ~1km/s, so during the ms discharge of the capacitor sound has had the time to travel a full meter, which is much larger than the system. The time for the initial breakdown is 1us, giving 1mm, about the size of the spark gap. This is very rough logic-it may be that the slower timescale is fine if enough power is delivered.

I also aquired a real ignitron…

Underwater Arcs: Motivation

While arcs are cool on their own, I’m interested in using them for hydroacoustics. One of the ways to treat kidney stones uses focused ultrasound to break the stone while inside the patients body, and some of the devices use underwater spark gaps for the wave source. Electrohydrolic forming uses the pressure waves to force metal into molds. I doubt this is possible, but it would be really neat to be able to have shock sintering of materials with this sort of setup.

Lenses for sound work the same way light lenses work, with refraction according to Snells law. Unlike light, where lens materials have slower speed of transmission than air, most lens materials will have faster speeds of sound than water, so the geometry of converging and diverging lenses are reversed. The ratio of reflected to transmitted power is given by the difference in impedances, and shortly, plastics should mostly allow sound to be transmitted, making them useful as lenses, while metals mostly reflect sound, making them suitable for mirrors.

Underwater Arcs

I’ve been playing with underwater arcs recently. This will be more of a photodump than a writeup. I’m using a 1kV capacitor with ~600J stored energy. I’m also using saltwater because the breakdown voltage is lower.

The spark gap I’m using (there is a gap there). Made from two tungsten rods and hot glue. The glue is fine despite the electrode damage. The tips appear to have reflowed. At low currents all that happened with electrolysis, which caused the positive tip to be coated in some chemical.
A lower power shot (not actually a video). I need to make a better relay.
Higher power, shot at 300FPS
300FPS video.