Maker Pro
Maker Pro

Envelope detector design

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
I am working on a project in which we are trying to design and build an ultrasonic thickness gauge that will calculate the thickness of a given part based on the time difference between sending a signal and receiving a reflection back (using the known speed of sound through the medium).

As we are in the initial stages of prototyping, we are currently using an Arduino nano as the MCU for our prototype. We have successfully amplified the pulse generated by the MCU to a higher voltage, which is then used to excite the ultrasonic transducer (which is in contact with the part that is being measured). The reflection is then detected by the second element of the transducer and converted into an electric signal that is centred around the natural frequency of the transducer (5MHz). This signal is then processed (amplified and filtered) into a level that would be detectable by the MCU (circuit and scope screenshot as shown below). However due to MCU's limited sampling rate, the signal will not be reliably detected. Therefore I was wondering if we would be able to devise an envelope detector that would extract the amplitude modulation of the reflection signal, effectively converting a very high frequency into a lower frequency signal, which I am hoping would be detected by the MCU.

Amplifier and Filter.png

According to what I have read so far, this would be achieved by first rectifying the signal using a “super-diode” (precision rectifier configuration as shown below) and then integrate it through an op-amp integrator. However, it seems that because I am relying on single supply and the frequency of the signal of interest is very high, the rectifier will not work as I expected, in fact I did not get anything out of it. Is there perhaps a way of designing an envelope detector entirely from transistors instead of op-amps?

Precision Rectifier.png

Any pointers or suggestions will be highly appreciated!!

Thanks in advance!

Joe
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Don't Arduinos have boot loader overhead that slows things down like a Picaxe? Have you considered using a much faster MCU like a 32MHz PIC?

Chris
 

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
Don't Arduinos have boot loader overhead that slows things down like a Picaxe? Have you considered using a much faster MCU like a 32MHz PIC?

Chris

We tried with STM32F411RE, which is 100MHz MCU, but the sampling rate of the ADC pin is only around 1Msps, so we want to use envelope detector circuit to decrease the frequency of our signal.
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
Even with a very fast op amp such as the LM7171, the classic op amp-based "precision rectifier" circuit such as the one you showed is going to be completely helpless in the face of a 5 MHz input signal. As you found, it simply does not work.

If you want to try making a peak detector circuit (envelope detector) from transistors that will handle the high frequencies you're dealing with, try the following:

peakdetector.png

The above was adapted from a "High Speed Adaptive Trigger Circuit" design in Linear Technology, Inc.'s Application Note AN-72. See Figure 63 on page 29.

The input to the circuit should be driven from a fast buffer amplifier with low output impedance. The envelope output is high impedance and should be buffered before attempting to drive an ADC. The circuit is not high precision (I assumed your application doesn't require it); the output will be offset from the input by as much as several hundred millivolts. But it should be fast.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,722
Joined
Nov 17, 2011
Messages
13,722
In which parameters of the received signal are you interested? Is it the specific waveform or simply the time delay between transmitted pulse and received pulse?
In the latter case, I think you can simplify the circuit considerably:
  • no need for an active high pass filter. The coupling capacitors will suffice to suppress low frequency noise and DC. Use the second stage for more gain instead.
  • no need for an active rectifier circuit. With enough signal amplitude a simple diode rectifier should suffice. Or the circuit recommended by OBW0549 which is also moderately complex.
  • no need for an integrator. A simple RC low passs filter should suffice. Essentially what was used in crystal radio receivers a century ago.
 

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
Even with a very fast op amp such as the LM7171, the classic op amp-based "precision rectifier" circuit such as the one you showed is going to be completely helpless in the face of a 5 MHz input signal. As you found, it simply does not work.

If you want to try making a peak detector circuit (envelope detector) from transistors that will handle the high frequencies you're dealing with, try the following:

View attachment 31849

The above was adapted from a "High Speed Adaptive Trigger Circuit" design in Linear Technology, Inc.'s Application Note AN-72. See Figure 63 on page 29.

The input to the circuit should be driven from a fast buffer amplifier with low output impedance. The envelope output is high impedance and should be buffered before attempting to drive an ADC. The circuit is not high precision (I assumed your application doesn't require it); the output will be offset from the input by as much as several hundred millivolts. But it should be fast.

Hi OBWO549, thank you for your idea. however, I have tried to build the peak detector based on the circuit diagram that you provided, it doesn't work. I have nothing at the output, even after I modify it (change resistors, add capacitors).
 

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
In which parameters of the received signal are you interested? Is it the specific waveform or simply the time delay between transmitted pulse and received pulse?
In the latter case, I think you can simplify the circuit considerably:
  • no need for an active high pass filter. The coupling capacitors will suffice to suppress low frequency noise and DC. Use the second stage for more gain instead.
  • no need for an active rectifier circuit. With enough signal amplitude a simple diode rectifier should suffice. Or the circuit recommended by OBW0549 which is also moderately complex.
  • no need for an integrator. A simple RC low passs filter should suffice. Essentially what was used in crystal radio receivers a century ago.

I am just interesting in the time difference between transmitted pulse and received pulse. and the problem that we have is we are not able to detect the received pulse. We tried coupling capacitors and simple RC low pass filter, they doesn't really help at all, it is either we cannot see any changes between input and output signal, or there is no output.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I am just interesting in the time difference between transmitted pulse and received pulse. and the problem that we have is we are not able to detect the received pulse. We tried coupling capacitors and simple RC low pass filter, they doesn't really help at all, it is either we cannot see any changes between input and output signal, or there is no output.
From the very start of this thread I've had my reservations regarding employing sonar (slow as a snail) techniques to measure differences in inches. I would totally expect the transmitted burst to collide with the reflected echo before the transmitted burst completed the burst width. Perhaps I'm missing something. You also said something in your first post that raised my eyebrows. That would be this statement...
The reflection is then detected by the second element of the transducer and converted into an electric signal that is centred around the natural frequency of the transducer (5MHz).
5 MHz is far above the 'sonic' spectrum. What ultrasonic transducer do you have that specs that?

Chris
 

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
From the very start of this thread I've had my reservations regarding employing sonar (slow as a snail) techniques to measure differences in inches. I would totally expect the transmitted burst to collide with the reflected echo before the transmitted burst completed the burst width. Perhaps I'm missing something. You also said something in your first post that raised my eyebrows. That would be this statement...

5 MHz is far above the 'sonic' spectrum. What ultrasonic transducer do you have that specs that?

Chris

I am using 5P Ultrasonic transducer, it is for metal thickness measuring and have natural frequency of 5MHz. we used oscilloscope to measure the frequency of our returning signal, which shows in the image that I have posted before, and it is around 5MHz.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
I really don't know how to respond to that. I simply can't wrap my head around the term "Ultrasonic" and 5MHz, in the same sentence. 5MHz is well into the low RF spectrum.

Please post a link to your transducer.

Chris
 

AnalogKid

Jun 10, 2015
2,893
Joined
Jun 10, 2015
Messages
2,893
The gain of the first stage is only 13 (22.3 dB). That's not much. Any reason why it is so low?

From the scope shot it looks like there is a clear amplitude difference between the quiet gap during propagation and the start of the reflected pulse. Why not use a simple level detector? It will have a faster response time than any envelope detector.

ak
 
Last edited:

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
I really don't know how to respond to that. I simply can't wrap my head around the term "Ultrasonic" and 5MHz, in the same sentence. 5MHz is well into the low RF spectrum.
5 MHz is not an unrealistic frequency for materials testing, or for medical ultrasound. Take a look here.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
5 MHz is not an unrealistic frequency for materials testing, or for medical ultrasound. Take a look here.
That was quite enlightening. Thank you for pointing me there.

Chris
 

Joe Wu

Feb 9, 2017
11
Joined
Feb 9, 2017
Messages
11
We have changed the diodes and problem solved, now is just the matter of program the MCU. Thank you.
 

AnalogKid

Jun 10, 2015
2,893
Joined
Jun 10, 2015
Messages
2,893
Good more. A power rectifier has a fat junction area which means high capacitance which means low speed.

ak
 

OBW0549

Jul 5, 2016
157
Joined
Jul 5, 2016
Messages
157
Good more. A power rectifier has a fat junction area which means high capacitance which means low speed.
It also has a huge Trr reverse recovery time, something like a microsecond if I recall rightly. No wonder the circuit didn't work...
 
Top