[SOLVED] Rectified sine wave to peak processing - not exactly sure what to call it!

Status
Not open for further replies.

DaveKMKControls

Newbie level 3
Joined
Sep 19, 2011
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Southern Georgia
Activity points
1,319
NEWBIE ALERT!

First post, however, long time lurker. I've learned volumes here, and thought I'd give it a shot to see if anyone might have some thoughts on my project.

I'm trying to figure out how to build a circuit that can solve this:



To the left is a 40kHz signal, half-wave rectified, to the right it what I'm trying to accomplish. Note that I'm not trying to find a single peak, but trying to modify the waveform to eliminate everything 'but' the peaks. Mathematically I know how to do this, but does anyone have thoughts on solving this with an analog circuit?

Really appreciate the input!
 

Can you describe the mathematical analysis?

How about using a peak detector followed by low pass filter.?
 

Strictly spoken, the sketched waveform suggests, that don't have an exact mathematical definition of the behaviour. Or can you explain, what exactly causes the slope down to zero at the right side of the envelope waveform?

Basically, you have the choice between a peak detector with simple decay time constant and some kind of peak hold circuit, which will obviously need a reset condition. The straight lines suggest a peak hold type, but the said point shows, that the reset condition isn't clearly defined yet. It may be e.g. a time-out, but then we would see a delay.
 

Sorry, I should have given more detail to start. This project is for an ultrasonic receiver. I run the output through an op-amp, then a cap to strip DC, then a diode to toss out the negative voltages, so it's a 1/2 sine wave in the diagram above. I then feed this to an A/D.

Mathematically, it's simply a matter of picking up the peaks at the apex at 40kHz, tossing out the balance, and running a simple curvefit.

The real heart of the issue is feeding a 1/2 sine signal into an A/D and getting meaningful results. Even with a high rate of conversion, the peaks are read as well as the non-peaks, so deciphering the peaks is a bit difficult. I'm doing it in an AVR 8-Bit RISC chip, but it takes a lot of somewhat messy code to get there - a curve like I drew to the right would be much more meaningful to me. I thought about a peak detector/peak hold, but I'm looking for all peaks across a time frame, not a single peak. For example, after the transducer rings down, I would want to get an output of all the peaks above a given threshold for, say 50ms.
 

I expect, that a more averaging method, e.g. a switched integrator synchronized with 40 kHz carrier would give better noise and interference suppression than a peak detector. It will also hold the output signal during a clock cycle for AD conversion.
 

I'm not sure I can syncronize to the incoming data - I know exactly when the 40kHz pulse is applied, but the reflected signal, while at 40kHz, is not necessarily in sync with anything, since it's basis is time of flight. If the reflecting objects were at exactly the right distances, I could understand this (and in fact, I could syncronize my A/D to it). Perhaps I'm missing something?

I want to express my grattitude to every one who's replied - I'm kind of suprised with the level of response in just a few hours. When I first got started programming Atmels many years back, I used to ask questions on a different board. I was slammed and slapped down to the point I wouldn't bother visiting there, simply because I was new to the board. Thanks again, it's truly refreshing.
 

The echo signal has arbitray phase but still same frequency, this means, that averaging a full wave rectified signal over half cycles achieves a phase independent magnitude.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…