Author Topic: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)  (Read 1690 times)

0 Members and 2 Guests are viewing this topic.

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« on: January 01, 2019, 04:49:01 pm »
I have played a bit with ultrasonic delay lines from old PAL TVs recently. (Thanks to Dave, and especially to Mike from mikeselectricstuff, for inspiring youtube videos!) I arrived at this via an interest in 1940's computer architectures, which used delay lines as their main memory. I hope to eventually build a simplistic CPU around some "real" ultrasonic delay memory.

These PAL delay lines provide a 64µs delay, and need to be operated in the vicinity of their 4.4 MHz resonance frequency to get a decent output signal level. To store a somewhat useful amount of information, one would ideally want a bit rate on the same order of magnitude. 5 MHz bit rate would allow for e.g. twenty 16-bit words to be stored.

I have played with a simple "modulation" scheme which represents a "1" bit by one full oscillation of a 5 MHz square wave, and a "0" bit by a 0V level for the same 200 ns duration. The delay line is not meant to work with a carrier modulated this rapidly -- it has a pretty high Q factor, and would prefer to keep oscillating... But with some modification of the input signal, I can get the required alternating output cycles. See the attached example, which shows a repeated 0011111111 bit pattern being sent (lower trace is the input to the delay line), and the output from the delay line (upper trace, phase shifted vs. the lower by approx. 64 µs). Whenever the input value changes, the input waveform is modified to jump-start or dampen the oscillation.

In order to turn this into a memory, I will need to sample the output, and send it back to the delay line's input. I plan to compare the output amplitude to a threshold, and use a flipflop to sample and hold that value near the peak of the oscillation. (The clock will need to be adjusted to fit the near-exact number of bits into the delay time, of course, but the sample & hold will restore and re-sync the data, and provide a bit of timing tolerance.) Then resend the bit to the delay line, using the simple modulation scheme shown above.

Which gets me to my question:

There is always at least a factor of 2 between the positive output swings representing "high" and "low" bits, so this should be feasible. But it turns out I am out of my depth here: If at all possible, I would like a single-supply solution, which seems to rule out feeding the raw signal (including the negative swings) to a comparator? A half-wave rectifier for such low-amplitude signals, at 5MHz, turns out to be more difficult than I had expected.

How would you sample the positive output peaks, to distinguish "high" from "low" peaks?
Thank you for any hints! Bonus points for single-supply solutions!  ;)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17225
  • Country: us
  • DavidH
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #1 on: January 01, 2019, 07:27:01 pm »
5 MHz is not particularly demanding for a peak detector but what is the accuracy requirement?  100 millivolts?  Or is the full scale range 100 millivolts?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 28138
  • Country: nl
    • NCT Developments
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #2 on: January 01, 2019, 07:53:51 pm »
For starters I'd feed an AC signal into the delay line. An interesting method would be to use IQ modulation. That should allow to store more then one bit in a single timeslot and have a reference signal to use as a reference for the amplitude.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #3 on: January 01, 2019, 07:59:09 pm »
5 MHz is not particularly demanding for a peak detector but what is the accuracy requirement?  100 millivolts?  Or is the full scale range 100 millivolts?

I don't need much accuracy, since I only want a binary result -- is the peak heigth above or below a fixed threshold? As mentioned, "high" vs. "low" peaks differ be at least a factor of 2 in amplitude. The full scale (max. amplitude) is 200..300 mV, and the threshold on the order of 100 mV.

I did some SPICE modelling of the typical "precision rectifier" circuits in the literature (op-amp with diode feedback) -- using TI's TINA, which might give you a clue regarding my level of sophistication in analog electronics...  ;) To my surprise I found that an op-amp with 50 MHz GBW product would only provide usable results up to 1 MHz or so. Appreciate your help regarding parts selection or circuit design!

 

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #4 on: January 01, 2019, 08:07:23 pm »
For starters I'd feed an AC signal into the delay line. An interesting method would be to use IQ modulation. That should allow to store more then one bit in a single timeslot and have a reference signal to use as a reference for the amplitude.

Yes, you could think of using a classic carrier wave, and modulating that at a frequency well below the carrier. But even if you get smart with the modulation scheme and encode multiple bits per time slot, I can't see how you would get to the bit rate which my brute force "amplitude modulation" achieves.

Hence, I am quite content with the transmission/modulation scheme described above. I just need help converting the output.

N.B.: I don't quite get what you mean by "start by feeding an AC signal". That's what I did, right? (Yes, my input signal also has a DC offset. But the delay line's piezo transducer and glass substrate don't really care about that...)
« Last Edit: January 01, 2019, 08:10:42 pm by ebastler »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17225
  • Country: us
  • DavidH
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #5 on: January 01, 2019, 08:10:53 pm »
Closed loop based circuit built around operational amplifiers have severe speed limitations.

However I think a better solution would be a comparator driving a set/reset flip-flop.  If the peak during the bit period is higher then the threshold, then the comparator triggers or sets the set/reset flip-flop which is then reset at the end of the bit period for the next test.  50 nanosecond and faster comparators are routine parts.

This is essentially a data slicer with a memory.
 
The following users thanked this post: ebastler

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #6 on: January 01, 2019, 08:18:46 pm »
I think a better solution would be a comparator driving a set/reset flip-flop.  If the peak during the bit period is higher then the threshold, then the comparator triggers or sets the set/reset flip-flop which is then reset at the end of the bit period for the next test.  50 nanosecond and faster comparators are routine parts.

Thanks, David. A comparator was my first idea -- but can I use a single-supply comparator and still feed it the full signal including the negative half-waves? Are there comparators which tolerate that without damaging the inputs, or saturating some stages and messing up the response time?
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17225
  • Country: us
  • DavidH
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #7 on: January 01, 2019, 08:40:02 pm »
I think a better solution would be a comparator driving a set/reset flip-flop.  If the peak during the bit period is higher then the threshold, then the comparator triggers or sets the set/reset flip-flop which is then reset at the end of the bit period for the next test.  50 nanosecond and faster comparators are routine parts.

Thanks, David. A comparator was my first idea -- but can I use a single-supply comparator and still feed it the full signal including the negative half-waves? Are there comparators which tolerate that without damaging the inputs, or saturating some stages and messing up the response time?

Hmm, that is right; it is AC coupled with a variable DC content.

Some comparators can work with negative levels or at least not be damged but there is a better way.

The way video circuits handle this is to restore the DC level by selectively clamping part of the waveform which does involve something like peak detection.  A video clamp circuit to restore the DC level operates in parallel with the comparator so it would not add any additional delay and may suit you very well here.  In this case, every negative peak can be clamped at zero or some other value.  So the AC coupled input to the clamp circuit has a DC value added to it and that DC value is controlled to bring the negative peaks up to zero or whatever.  If you want to do that before the comparison, then here is a simple way.

Fiber optic receivers and some old oscilloscope trigger circuits do something similar but detect both positive and negative peaks and use this to adjust the threshold voltage.  This is a little more universal but would have problems with long strings of low or high values where the AC input drifts out of range.  See figure 63 on page 29 of Linear Technology application note 72.

The transistors in the array can be replaced by 2N3904s and 2N3906s or whatever.  A slower comparator could be used although as shown the circuit runs on a single 5 volt supply which requires a single supply comparator.
 
The following users thanked this post: ebastler

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #8 on: January 01, 2019, 08:57:00 pm »
The way video circuits handle this is to restore the DC level by selectively clamping part of the waveform which does involve something like peak detection.  A video clamp circuit to restore the DC level operates in parallel with the comparator so it would not add any additional delay and may suit you very well here.  In this case, every negative peak can be clamped at zero or some other value.  So the AC coupled input to the clamp circuit has a DC value added to it and that DC value is controlled to bring the negative peaks up to zero or whatever.  If you want to do that before the comparison, then here is a simple way.

That's a great idea, thank you!  I have actually used that exact circuit in the input stage of a video upscaler I built for my vintage PONG arcade board a couple of years ago; but didn't make the connection now. Thank you for helping me out!

Slightly embarassed, but happy...  ::)
 

Online BrianHG

  • Super Contributor
  • ***
  • Posts: 8156
  • Country: ca
    • LinkedIn
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #9 on: January 01, 2019, 10:01:32 pm »
Careful, TV color delay lines not only delay 1 line, they delay 2 or 3 while super-imposing the results on top of each other with inverted amplitudes creating a color-comb filter effect.  This effect is used to remove vertical cross color artifacts in color decoding and makes the glass delay line filter out and amplify a narrow frequency, adding gain, or canceling out stray what you might call 'single bits' in your type of application.

The glass delay lines typically have 2 frequency types, the NTSC ones which are tuned to 3.579545Mhz and the PAL ones which are tuned to 4.43361875Mhz.  Make no mistake, the slither of signal dave illustrated in his video is nothing compared to once you feed in a small 2-3 cycles, on 2 vertical adjacent lines of video with the same phase (IE same color) at the delay line tuned frequency.  If you feed into the glass delay line a signal like this, the output will be a full amplitude signal identical to the glass filter's source input signal, with all other frequencies/components filtered out or removed.

This means using such a glass delay line filter for data may leave you with weird residue signals when the source data perfectly mimics the chrominance of a color picture signal, and it may erase data if you flip such a positioned bit from one delay to the next.  You may get lucky and find a really weird odd old glass delay line filter which doesn't do this, however, my experience is that they were designed to improve color separation beyond a R-L-C filter by creating a delay with internal reflections to specifically create the color combing effect I described above.

Also, at the tuned frequency, I got 1vp-p going through a few of the NTSC units I had.
« Last Edit: January 01, 2019, 10:05:38 pm by BrianHG »
 

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #10 on: January 02, 2019, 07:35:26 am »
Careful, TV color delay lines not only delay 1 line, they delay 2 or 3 while super-imposing the results on top of each other with inverted amplitudes creating a color-comb filter effect.  This effect is used to remove vertical cross color artifacts in color decoding and makes the glass delay line filter out and amplify a narrow frequency, adding gain, or canceling out stray what you might call 'single bits' in your type of application.

Hmm, I can't confirm any multiple reflections. If I send in a single burst, I see the output after 64µs as shown in the OP. At 128µs and further out, the output signal is within the noise. That's true for the 5 MHz signal shown in the OP, but also at the 4.4 MHz resonance. I thought that in PAL TVs, the Chroma processing between successive lines was done in analog electronics, and the "delay line" is really only providing the delayed information?

I use 390 Ohm termination, as seen in an old datasheet, but the termination value does not seem too critical. I did not provide any LC filters at the input and output however, in contrast to the datasheet circuit.

Quote
You may get lucky and find a really weird odd old glass delay line filter which doesn't do this, however, my experience is that they were designed to improve color separation beyond a R-L-C filter by creating a delay with internal reflections to specifically create the color combing effect I described above.

So far I have tried three different types/makes of delay lines. All of them seem to be PAL chroma types, with approx. 64µs delay and a resonance around 4.4 MHz. They all behave as discussed above, and all seem to provide a single-reflection (64 µs delayed) output.

Quote
Also, at the tuned frequency, I got 1vp-p going through a few of the NTSC units I had.

Yes, that part has me wondering. I don't get anywhere near the output amplitudes Mike showed in his video. (At resonance, he shows output amplitudes in excess of the input.) That's true for all three delay lines I played with. I'm using 390 Ohm in series at the input, 390 Ohm in parallel at the output. Is there any additional trick to this?
 

Offline ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7197
  • Country: de
Re: Fast precision rectifier/peak detector needed (5 MHz, 100 mV)
« Reply #11 on: January 02, 2019, 06:32:52 pm »
I found a nice article from Philips about the first generation of glass delay lines for PAL (1968),
http://www.extra.research.philips.com/hera/people/aarts/_Philips%20Bound%20Archive/PTechReview/PTechReview-29-1968-243.pdf,

and a datasheet for various delay lines which are apparently still available from China:
www.eectech.info/DocumentDownloas.aspx?id=YNjvLwD6n5BtaNw4QXUZ3LiNOytfWQ3ink6quaWab1xkcjliV44b6g==
(see pages 6 and 7 for the 64µs glass delay lines).

Both sources describe a typical insertion loss of 9 to 10 dB. So the factor of approx. 10 between input and output amplitudes, which I observe somewhat above the resonance frequency, seems reasonable. Not sure what Mike did to achieve his very high outut amplitudes -- maybe the scope was still set to assume a 1:10 probe which wasn't there?

Also, the old paper and the new datasheet specify an attenuation of higher-order reflections by at least 21 db and 26 dB, respectively. Hence, I am pretty sure that the delay line itself is not meant to create and mix multiple delayed versions of the input signal, but is designed to produce a single, delayed copy of the input.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf