Using an ultrasonic thickness gauge with a microcontroller?

Thread Starter

mbferguson

Joined Apr 23, 2017
94
I purchased this probe with the intention of using it for a microcontroller of some sort, like the arduino which has an analog input pin. I looked at the heads of the cable and it seems to simply be a coax pin with the metal casing being the ground. My goal is to write software on my microcontroller to detect holes within a material by measuring the amplitude of the reflected ultrasonic wave. This sensor is only designed for ranges of 0.4'' to 6'', so the arduino shouldn't have a problem power-wise. In my understanding of a dual-element transducer, there are two elements, one which transmits and one that receives. However, does it matter which of the elements is transmitting and receiving? Or can both elements be used as either? There is an acoustic buffer located in the middle that seems to work both ways.

*I apologize for the enormous photographs. I can't figure out how to edit the resolution on this editor.



 

Reloadron

Joined Jan 15, 2015
7,523
What you have looks to be a dual element transducer similar to this one. Does the one you have also have a data sheet? You will need for example in the case of the link, 5 MHz or whatever the resonant frequency is of the transmitter transducer is. Probes like this are popular for NDT (Non Destructive Testing) finding flaws in metals. There is quite a bit to it. As to which side? It doesn't matter on some and on other probes it matters.

Ron
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
Does the one you have also have a data sheet?
I have looked for one but found nothing you would typically expect to find when researching an electronic part.

You will need for example in the case of the link, 5 MHz or whatever the resonant frequency is of the transmitter transducer is.
If I can output a 5MHz signal using PWM on the arduino, would it matter if it were a square or sine wave? Does the transducer merely depend upon its resonant frequency?
 

BigBlueCar

Joined Sep 23, 2013
14
I confess it's a long time since I used one of those to make my living but I hope the following is still relevant......

What you appear to have is a 5Mhz piezo transducer from a commercial ultrasonic thickness gauge. That sort of frequency is appropriate for steel and similar metals so long as they are reasonably thin (say, in the range up to 20mm). Other materials depending on their properties (mainly density and bulk modulus) and dimensions, you'd need a much lower frequency for, say, concrete. Contact is made with a fluid, water will do but we used to like thin wall paper paste in my day. The probe will have a "dead zone" immediately under it so cannot measure very thin articles but without a data sheet you can't tell how big.

The problem is that to energise such a probe you need quite a lot of oomph and then some electronics to analyse the transmission and delay times to calculate thickness. Calibration is by adjusting the density setting (i.e. transmission speed) for the article being examined. Sadly, there is no universal number and even the same grade of steel or aluminum will vary from batch to batch. We used to have to calibrate against a micrometer measurement

The electronics used to be very expensive (£ks) but as with all things they are cheaper now and there's probably a chip somewhere that will do all the work for you but for a very specific, limited application. You could have some fun using a oscilloscope, which is basically what we had 50 years ago when I started.

The bottom line is that it's a helluva lot of work to design and build something to use the probe you have and your best bet is probably to buy the box of tricks it's supposed to plug into. Sorry!
 

ebp

Joined Feb 8, 2018
2,332
The connectors are probably copies of Lemo products. They are very nice, but real Lemo connectors are expensive.

The elements are probably identical. Depending on what you are doing, you'll probably get millivolt signals from the receiver. The transmitter would typically be excited with a single pulse of a few nanoseconds width and an substantial amplitude. The instruments one of my clients used for NDT of pipeline welds use pulses of around 400 V, but you may need much less than that. Distinguishing the signal reflected from what you are trying to detect versus anything else that may produce reflections may be a bit tricky. I hope you have an oscilloscope.
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
Distinguishing the signal reflected from what you are trying to detect versus anything else that may produce reflections may be a bit tricky. I hope you have an oscilloscope.
Yes. I have access to a university level electrical engineering lab.
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
The instruments one of my clients used for NDT of pipeline welds use pulses of around 400 V, but you may need much less than that.
Since I do not know anything about the output of the guage meter to the probe, do you reckon it would be wise for me to experimentally test out different voltage pulses? I can listen to the echo on an oscilloscope and see if I can get an audible tone back or not through aluminum.

I hooked up one end of the transducer to a function generator, and the other to an oscilloscope. I tested pulsing a few different cycles (1-5) of 200ns, which is the resonant frequency of 5MHz. But, I merely got back an extremely noisy echo that did not mach the 5MHz transmitting frequency or pulse shape at all. I quickly realized the problem was likely that the function generator's maximum 5V output was insufficient.





The pulse echo signal being received was very low as expected, only millivolts. The frequency was all over the place, which was unexpected. I'm hoping I will be able to test out different pulse strengths such as 50V,100V,150V,... until there is a clearly defined echo being received that I will be able to do some algorithm magic on.

I was under the impression that the transducer cable couldn't attach to the arduino because it was capable of damaging the board, however, if the receiving signal is only a few millivolts, does this really pose a risk? It seems possible to use a function generator to provide the high voltage pulse, and have the arduino listen directly in on its analog input pin.

The other concerns with not using a filtering element between the board and probe would be the need to downsample the higher frequency receiving signal and the potential noise gain from not using a BPF around 5MHz. The downsampling is currently one of the big things I'm stuck on, as I'm not sure what sort of frequencies to expect on the receiving signal when the transducer is actually powered. I'd hope it'd be the same frequency as what it was transmitted.

I only have access to power sources up to 25V, so I will need to build my own power source to produce this pulse. In the past I have worked with home-made function generators such as the one shown here https://www.instructables.com/id/Portable-Function-Generator-on-Arduino/. Is it feasible to produce a high voltage pulse on something such as 4AA batteries? It would require something to control the pulsing, but I imagine with low current, high voltage could be possible without needing an enormous brick.
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,872
hi mb,
Searched the web, best find so far is this bit from eBay.

1PCS 5M PT-12?5MHz 12mm? Ultrasonic thickness meter probe New
Introduction:
Name: Probe for Ultrasonic Thickness Gauge
Model: PT-12 (Lemo 00 connector)
Frequency: 5MHz
Diameter of the contact proportion: 12mm
Measuring Range: 1.0mm-200.0mm
Avaliable Contact Temperature: ?10ºC-60ºC
Applicaiton: use for all Ultrasonic thickness gauge

For testing I would just 'ping' the transmitter with a single 12V, 0.2uSec pulse, initially at a 0.1Sec rate, observe the 'ring decay', in the receiver.
I would say that you will have to amplify the RX echo signal.
Post what you see.

What did you use as a test specimen in those screen shots.?

E
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
What did you use as a test specimen in those screen shots.?
I tested the transducer out on a square plate of aluminum, roughly 20cm x 20cm x 1.75cm. I'll have to account for the speed of ultrasound within the specific metal when running my algorithm, but I'm planning on simply counting the clock cycles it takes for the pulse echo to arrive and if there are multiple echos with different amplitudes to determine possible defects.
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,872
hi,
What have you assumed the velocity of sound is thru Aluminium.?
Have you drilled a small diameter hole in the side of of the Alum test piece, say 1mm or 3mm in dia, so that you can detect this test hole.
Iif you drill a hole, position so from one face its say 25% of the the test piece thickness, then flip it over for a 75% thickness check.
Are you trying just to detect the presence of a hole/cavity or its actual depth in the material under test.?


E
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
What have you assumed the velocity of sound is thru Aluminium.?
Have you drilled a small diameter hole in the side of of the Alum test piece, say 1mm or 3mm in dia, so that you can detect this test hole.
Iif you drill a hole, position so from one face its say 25% of the the test piece thickness, then flip it over for a 75% thickness check.
Are you trying just to detect the presence of a hole/cavity or its actual depth in the material under test.?
I will most likely use the speed of sound in Aluminum 6320 m/s. (google)

There were two drilled holes that were about 3-5mm in diameter. Unfortunately, the low-power wave form did not react much when placed in front of the holes. These holes were drilled from the plate-side, through to the other side. My transducer was placed on the 1.75cm dimension.

The goal is for this device to measure and detect defects from the 1.75cm dimension of the bar. My algorithm should give a rough estimation of the distance the defect is located within the material. I think it will still be a good idea to test a partially drilled hole of known depth, measuring from the opposite plate side, in order to help calibrate and tune the accuracy of my algorithm.
 

ebp

Joined Feb 8, 2018
2,332
200 ns is the period of a full cycle at 5 MHz, so you want to ping the transducer with something not more than half of that if you are using a single pulse.

It rather looks like the received signal is at about 25 MHz - which might be a harmonic or might not even be returned signal but excitation of some other resonant thing.

What are you using for couplant between the transducer and the test block?
 

ericgibbs

Joined Jan 29, 2010
18,872
hi mb,
For the test described in your post #13, how was the transducer driven.?
I guess you know that you will also get an RX echo from the back face of the test block.
A test block with known 'cavities' [holes] depths will be required for calibration.

E
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
200 ns is the period of a full cycle at 5 MHz, so you want to ping the transducer with something not more than half of that if you are using a single pulse.
I'm unsure how many pulses would be best used in the final design. During my test of the square plate, I sent single pulses but varied the amount of cycles. What would you say, in terms of the number of cycles, should each pulse be if there is more than one pulse?

Are there any advantages/disadvantages to sending multiple pulses at a time? Multiple pulses and/or multiple cycles might avoidably increase the complexity of my algorithm. I'm currently planning on sending single pulses at a set interval (maybe 0.25s?) so that the transducer can quickly detect new defects as it is moved across a metal surface.

Could you explain the logic behind why I should only send half a cycle, 100ns, when sending single pulses?
It rather looks like the received signal is at about 25 MHz - which might be a harmonic or might not even be returned signal but excitation of some other resonant thing.

What are you using for couplant between the transducer and the test block?
I did not use any medium between the transducer and the metal surface when measuring. Someone mentioned earlier that it is required though. Would getting the transducer's element damp with water be enough?
 
Last edited:

ericgibbs

Joined Jan 29, 2010
18,872
hi mb,
You will find that the transducer will not go to full power resonance during the first few cycles, it takes time to reach a maximum.
You can use a baby oil as a medium between the transducer and sample.
E
 

Thread Starter

mbferguson

Joined Apr 23, 2017
94
For the test described in your post #13, how was the transducer driven.?
I guess you know that you will also get an RX echo from the back face of the test block.
A test block with known 'cavities' [holes] depths will be required for calibration.
The transducer was driven by a function generator with a 5V pulse at 5MHz. I'm researching how to make a simple, high-voltage pulse generator as I have no access to a high enough voltage power source. I contacted the manufacturer, Yushi Instruments, who told me the pulse amplitude for the PT-12 can be up to 220V.

What is the meaning of 'RX'? I'm expecting to receive an echo when the ultrasound reaches the barrier of the metal and returns to the transducer, as well as if the wave encounters a hole. I suppose any reflected echos would always arrive first to the receiving element.
 

ebp

Joined Feb 8, 2018
2,332
Ultrasonic couplant is typically just "thickened water." I think the most common thickener is methyl cellulose. I've seen packets of thickener for adding to water and jugs of ready to use couplant. Plain water works, but its hard to keep it in place if you need to move the probe around. I've used small pieces of paper as sort of anti-couplant when I wanted a very low signal for testing an in-line amplifier.

If you are using a single rectangular pulse (e.g. starts at zero rises, dwells, returns to zero) you want it to last less than half of the resonant period of the crystal, otherwise you are still driving the crystal one way when it is already trying to "ring" back the other way. What you want to do is much like ringing a bell or a gong - whack it then let it resonate.

I can't remember the details of the transmit pulse generator in the instruments my client used. I do know that they produced a very narrow -400 V pulse by discharging silvered mica capacitors. The voltage could be set to lower levels and I think there were 3 caps of different values that could be selected, both determining the energy into the probe. Probes were typically 5, 10 or 15 MHz. I don't recall there being any difference in the way the probes were driven. Certainly the probes were never driven with a repetitive signal at their resonant frequency. The systems used a single element probe for both transmit and receive. There is a tiny chance I still have a schematic for the pulser. I'll have a look for it later today. The instrument was a Krautkramer Branson USIP 20. KB made a variety of instruments. It might be possible to find some schematics on the web, though a quick search suggests not.
 
Top