Author Topic: Idea for reasmpler to view high frequency waveforms on a soundcard.  (Read 1993 times)

0 Members and 1 Guest are viewing this topic.

Offline akkudakkuTopic starter

  • Newbie
  • Posts: 3
  • Country: pl
Hey.
Recently I have found an article about this method of 'touching' super-fast signals with more ordinary equipment. Also as you can guess - no scope here, thats why I had the idea of designing the circuit in the first place. Idea is to sample the high speed waveform and recreate it at a lower frequency that your equipment can pick up.
Schematic's in the attachment, with simulated reconstructed sine. I used two 8 bit synchronous counters - one free running and at low repetition rate, the other a triggered single shot at high frequency.
Then I test to see if the counters became equal and from this I create my sample/hold signal.
What I see from my fun in LTspice is that for any nice accuracy I would need stupidly high clocks (we are talking 74xxx series here).
And you need a fast clock to resample fast waveforms, the count should take ~same time as a single cycle of captured waveform.

So the question is - use less bits for the counters? That will give me uglier waveforms (but can I average those to get better accuracy in the long run?). Learn VHDL and program a CPLD/FPGA?

Thanks for your thoughts :-)
« Last Edit: July 05, 2019, 12:20:04 am by akkudakku »
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9320
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #1 on: July 05, 2019, 12:27:17 am »
Have you considered hacking a cheap RTL-SDR for direct sampling?
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline akkudakkuTopic starter

  • Newbie
  • Posts: 3
  • Country: pl
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #2 on: July 05, 2019, 09:08:36 am »
Didn't even occur to me I could use a software defined radio like that. Don't have the dongle, but the idea is interesting!
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2161
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #3 on: July 05, 2019, 02:58:15 pm »
What are you hoping to achieve with this? Resampling will just give you the low frequency components of the high frequency signal, all the high frequency stuff will necessarily be lost in the filter you need for the waveform reconstruction.

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
 

Offline akkudakkuTopic starter

  • Newbie
  • Posts: 3
  • Country: pl
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #6 on: July 06, 2019, 07:38:38 am »
@David Hess, @jpb Thanks guys, this just shows that my idea is viable, and it even can be simplified.

Actualy what I thought, was that the thing, I was doing in my sim, was exactly the thing that DSO's do ;-)
So whole idea is to make a low cost, simple, 2CH PC scope. Because I'm cheap. And I like to tinker.
If something comes out of this, I will write about it.
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2161
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #7 on: July 06, 2019, 07:47:46 am »
Keep in mind that this scheme only works for repetitive signals and since you will be reconstructing your low frequency waveform from multiple, consecutive high frequency waveforms they strictly speaking have to be identical, too. I don't see a practical value in this.

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #8 on: July 06, 2019, 09:16:31 am »
Keep in mind that this scheme only works for repetitive signals and since you will be reconstructing your low frequency waveform from multiple, consecutive high frequency waveforms they strictly speaking have to be identical, too. I don't see a practical value in this.

Gesendet von meinem Nokia 6.1 mit Tapatalk
A lot of high frequency measurements involve repetitive signals, S-parameter measurements for instance.
It would be no good for looking at glitches but looking at the effect of a circuit on a large signal sine wave for example it should work well.
The issues may be the need to have a wide bandwidth input and also a suitable signal source, but even something like Leo's pulser is repetitive and I find I get nice curves when my scope is set to equivalent sampling mode which is the same as this.
 
The following users thanked this post: ogden

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #9 on: July 06, 2019, 09:32:18 am »
For bandwidths up to a few MHz it may be better to build a real time digitizer using Cypress FX2 and an 8-bit parallel output ADC.
Alternatively, implement a complete scope on some MCU with built-in fast ADC. This has already been done.

Sampling scopes make sense at bandwidths faster than any ADC you are willing to pay for.

Also, to the OP, if you want to connect something to your computer, you better have good input overvoltage protection >:D

Here is the same idea but with 1 GHz bandwidth:

https://www.electronicdesign.com/boards/1-ghz-sampling-oscilloscope-front-end-easily-modified
I have seen this article a while ago while researching high speed sample and hold solutions.

I think there are certain problems with it which the author glosses over a bit.
Quote
the master bridge is loaded with only a low-input capacitance of about 1 pF. Because the bridge’s on-resistance is about 100 Ω, the RC time constant is around 100 ps.
I'm not sure if that's accurate, I think it should be added to the 50Ω impedance of the cable, giving τ=150ps.
Quote
The actual sampling event happens in the track-to-hold transition. It takes place during the few hundred picoseconds in which the master Schottkydiode bridge resistance switches from low to high. Such switching occurs within a small, central part of the full 8-V applied step.
And here's the first problem: if sampling time isn't long enough for the capacitor to fully settle, its state will be measurably dependent on waveform preceding the sample, because the gate is ON for a very long time before taking the sample.
Notably, I would expect a step response similar to trace B in the article. For sampling time of 300ps (1GHz BW), which is merely 2·τ, the initial step would reach 90% of full scale and then exponentially decay towards 100%. I don't know if adding speedup capacitor is a legitimate solution.
The author blames his poor step response on cable attenuation. RG58 is rated about 50dB/100m at 1GHz, so 4dB/8m, so about 1.6x attenuation. That's in line with what we see so the author can be excused.
But I think the cable only adds to the error described above, and the error above would remain if a higher quality and shorter cable is used.

There is probably a reason why Tektronix made efforts to produce very short pulses rather than just fast-falling pulses in their S-1/S-2 sampling heads.
Though OTOH their diodes probably had much higher dynamic resistance - given that the sample signal needed to be amplified 40x, sampling time must have been a short fraction of τ.
These days a long, fast-falling pulse would perhaps suffice, but only with some really low resistance diodes (I think I have seen down to 30Ω) and perhaps smaller sampling capacitance.
I wonder if it would be feasible to use a tiny capacitor directly between the sampling gate and ground, and a noncapacitive resistor branching-off to the buffer amp, such that only the small cap needs to be charged during those short picoseconds. The buffer amp would compensate for the loss caused by distributing charge from the sampling cap to other capacitances in the system.

Another advantage of that approach is that it doesn't put the guts of a low speed JFET opamp in a wideband signal path. Who knows what's the frequency response of parasitic capacitance of TL-072 input pin and the supply bypass capacitors in series with it :scared:

Another problem with TL-072 is it dependence of capacitance on common mode voltage. Ideally, it should run on as high voltage supply as possible and/or be replaced with something better-behaved. OPA1642 supposedly is good.
« Last Edit: July 06, 2019, 09:47:43 am by magic »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15797
  • Country: fr
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #10 on: July 06, 2019, 02:40:26 pm »
Keep in mind that this scheme only works for repetitive signals and since you will be reconstructing your low frequency waveform from multiple, consecutive high frequency waveforms they strictly speaking have to be identical, too. I don't see a practical value in this.

This is basically the purpose of what are often called "sampling oscilloscopes". They can find many uses, for instance to make measurements for very high frequency oscillators, eye pattern measurements, and so on. It allows the use of high resolution/relatively low sampling rate converters. Doing the same kind of acquisition as repetitive single-shot doesn't even necessarily make sense, and would require equipement that would be hugely expensive (to deal for instance with GHz or even THz signals), or that doesn't even exist...

Just an example: https://www.picotech.com/oscilloscope/9200/picoscope-9200-sampling-oscilloscopes

Of course to deal with bandwidths of a couple MHz, that doesn't really make sense, and this is more of a curiosity than anything else, although again it can allow to get high resolution captures if done right (something that would already be pretty expensive for an amateur's budget when using real-time sampling).

For a quick overview:
https://www.electronicdesign.com/test-amp-measurement/what-s-difference-between-real-time-and-sampling-oscilloscopes
« Last Edit: July 06, 2019, 02:45:48 pm by SiliconWizard »
 

Offline thinkfat

  • Supporter
  • ****
  • Posts: 2161
  • Country: de
  • This is just a hobby I spend too much time on.
    • Matthias' Hackerstübchen
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #11 on: July 06, 2019, 08:09:56 pm »



This is basically the purpose of what are often called "sampling oscilloscopes".

...

Which means, they're not general purpose DSOs and resampling is not simply a neat trick to achieve higher bandwidth. They are specialized tools that come in handy when a particular waveform is not of interest but certain general, non-realtime characteristics of a signal.

Gesendet von meinem Nokia 6.1 mit Tapatalk

Everybody likes gadgets. Until they try to make them.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #12 on: July 07, 2019, 08:35:48 pm »
Don't forget: you're not going to defeat Shannon-Nyquist with this, the sampling theorem stands.

Resampling to lower frequency is indeed possible, though of limited use.
BUT: the bandwidth of the sampled signal has to be limited to the Nyquist frequency. On top of that, your sample-hold circuit needs to work correctly at those high frequencies.

Not an easy task.

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #13 on: July 08, 2019, 04:01:48 am »
Keep in mind that this scheme only works for repetitive signals and since you will be reconstructing your low frequency waveform from multiple, consecutive high frequency waveforms they strictly speaking have to be identical, too. I don't see a practical value in this.

The predictable frequency response of a well designed sampler make them useful for calibrating other instruments including reference level pulse generators.

If you have 3 samplers, then can be used to calibrate themselves without any external calibration source.

Here is the same idea but with 1 GHz bandwidth:

https://www.electronicdesign.com/boards/1-ghz-sampling-oscilloscope-front-end-easily-modified

I have seen this article a while ago while researching high speed sample and hold solutions.

I think there are certain problems with it which the author glosses over a bit.

The author used a very simplified and low performance sampler implementation even given his construction requirements.

Quote
Quote
The actual sampling event happens in the track-to-hold transition. It takes place during the few hundred picoseconds in which the master Schottkydiode bridge resistance switches from low to high. Such switching occurs within a small, central part of the full 8-V applied step.

And here's the first problem: if sampling time isn't long enough for the capacitor to fully settle, its state will be measurably dependent on waveform preceding the sample, because the gate is ON for a very long time before taking the sample.

Notably, I would expect a step response similar to trace B in the article. For sampling time of 300ps (1GHz BW), which is merely 2·τ, the initial step would reach 90% of full scale and then exponentially decay towards 100%. I don't know if adding speedup capacitor is a legitimate solution.

In a sequential sampling design like this, that is irrelevant because sampling only occurs on adjacent points on the waveform and the sweep can be slowed as much as necessary to allow the capacitor to fully charge.

Quote
There is probably a reason why Tektronix made efforts to produce very short pulses rather than just fast-falling pulses in their S-1/S-2 sampling heads.

Later Tektronix samplers (starting with the S-4?) use traveling wave gates which rely on the transition time of the trailing edge of the sampling strobe to produce the sampling gate time.

Quote
I wonder if it would be feasible to use a tiny capacitor directly between the sampling gate and ground, and a noncapacitive resistor branching-off to the buffer amp, such that only the small cap needs to be charged during those short picoseconds. The buffer amp would compensate for the loss caused by distributing charge from the sampling cap to other capacitances in the system.

Toss out the capacitor entirely and use an open circuit 1/2 wavelength transmission line tuned to the sampling gate time.

Quote
Another advantage of that approach is that it doesn't put the guts of a low speed JFET opamp in a wideband signal path. Who knows what's the frequency response of parasitic capacitance of TL-072 input pin and the supply bypass capacitors in series with it :scared:

Another problem with TL-072 is it dependence of capacitance on common mode voltage. Ideally, it should run on as high voltage supply as possible and/or be replaced with something better-behaved. OPA1642 supposedly is good.

Tektronix used a common source FET amplifier (no common mode effects) followed by shunt feedback so they effectively differentiated the output from the sampling bridge allowing accurate measurements even with low sampler efficiency due to the time constant being too long for the sampling gate time.  Bandwidth now only depends on sampling gate time and this also allows random sampling because adjacent samples may be uncorrelated.

As you point out, the RC time constant is really not fast enough (and not well controlled) however this does not matter in a sequential sampler when the sweep speed is restricted.  The input capacitance of the TL072 dominates here.

I think the bandwidth limit of this configuration is limited to about 500 MHz if random sampling is used.  Check out the designs of the sampler in the Tektronix 7854 which uses a similar configuration to get to 400 MHz.  The rule here is to get as low a driving impedance and sampling capacitance as possible for maximum bandwidth.

Don't forget: you're not going to defeat Shannon-Nyquist with this, the sampling theorem stands.

Resampling to lower frequency is indeed possible, though of limited use.
BUT: the bandwidth of the sampled signal has to be limited to the Nyquist frequency. On top of that, your sample-hold circuit needs to work correctly at those high frequencies.

The bandwidth has to be limited based on the equivalent sampling rate which can be arbitrarily high and is ultimately limited by noise.  And even if the bandwidth is not limited producing aliasing, the resulting histogram is still correct.

My Tektronix analog sampling oscilloscopes happily produce good results from DC to 10+ GHz with a sampling rate of 50 kSamples/second and equivalent time sampling rate up to at least 200 GSamples/second depending on the sweep configuration.  Waveform amplitudes are accurate to the full bandwidth of the sampler even when massive undersampling and aliasing is present.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #14 on: July 08, 2019, 07:28:33 am »
And here's the first problem: if sampling time isn't long enough for the capacitor to fully settle, its state will be measurably dependent on waveform preceding the sample, because the gate is ON for a very long time before taking the sample.

Notably, I would expect a step response similar to trace B in the article. For sampling time of 300ps (1GHz BW), which is merely 2·τ, the initial step would reach 90% of full scale and then exponentially decay towards 100%. I don't know if adding speedup capacitor is a legitimate solution.
In a sequential sampling design like this, that is irrelevant because sampling only occurs on adjacent points on the waveform and the sweep can be slowed as much as necessary to allow the capacitor to fully charge.
It matters. You are thinking about S-1, where the gate is only opened for the duration of one sample.
This design opens the gate for a few nanoseconds, completely annihilating whatever charge remained from the previous sample.
Precisely, it's opened when the trigger is armed and closed when the circuit has been triggered and the sample delay timer expired. Then it stays closed for half µs to transfer the sample to another capacitor and it opens again.
Each sample is therefore taken completely individually and anew. To get good results, the state of the capacitor right before the gate is closed must reflect what the waveform is now, not a nanosecond ago. So a really low time constant is needed, much shorter than effective sample time.
It's a tradeoff. The sampling head must track much faster than Tek's, but its drive circuitry can be slow and easy to build.

Tektronix used a common source FET amplifier (no common mode effects) followed by shunt feedback so they effectively differentiated the output from the sampling bridge allowing accurate measurements even with low sampler efficiency due to the time constant being too long for the sampling gate time.  Bandwidth now only depends on sampling gate time and this also allows random sampling because adjacent samples may be uncorrelated.
Yep, that's what they did and it cannot be done here.
At the same time, this circuit could do random sampling, just connect some external random sweep management logic to the timebase input.

What you say about advancing a sequential sweep slowly enough to render τ irrelevant is another option, but one which requires very short drive pulses to isolate the sample from preceding waveform.
« Last Edit: July 08, 2019, 07:37:18 am by magic »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17427
  • Country: us
  • DavidH
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #15 on: July 10, 2019, 04:20:53 am »
Precisely, it's opened when the trigger is armed and closed when the circuit has been triggered and the sample delay timer expired. Then it stays closed for half µs to transfer the sample to another capacitor and it opens again.

Each sample is therefore taken completely individually and anew. To get good results, the state of the capacitor right before the gate is closed must reflect what the waveform is now, not a nanosecond ago. So a really low time constant is needed, much shorter than effective sample time.
It's a tradeoff. The sampling head must track much faster than Tek's, but its drive circuitry can be slow and easy to build.

Oh, well, that is a problem.  Still, the author got pretty good results considering that limitation.

It would pay to implement a better sampler allowing S-1 or S-2 (or S-3) like operation but you are on your own.  Do not ask me to do the work.  A traveling wave gate might be easier.

What you say about advancing a sequential sweep slowly enough to render τ irrelevant is another option, but one which requires very short drive pulses to isolate the sample from preceding waveform.

Tektronix did this to implement "smoothing" mode in their sampling sweeps which reduced noise but it naturally only worked with sequential sampling.
 

Offline magic

  • Super Contributor
  • ***
  • Posts: 7453
  • Country: pl
Re: Idea for reasmpler to view high frequency waveforms on a soundcard.
« Reply #16 on: July 11, 2019, 09:34:36 am »
Oh, well, that is a problem.  Still, the author got pretty good results considering that limitation.
Well, he got some results, after compensation, testing with an unknown and uncalibrated DIY edge generator, and there is still some overshoot and irregular ringing and we have no idea how much of it originates from the generator or the sampler. And he didn't show what happens when another step follows 1ns later, but I think I know.

It would pay to implement a better sampler allowing S-1 or S-2 (or S-3) like operation but you are on your own.  Do not ask me to do the work.
No problem, I'm not really building anything, just offering a bit of free criticism on the Internet :)

The time constant issue and sending RF through TL072 die and decoupling caps are probably responsible for at least some of that junk which follows his rising edge and partly responsible for the undershoot in uncompensated version. In fact, he didn't even say anything about decoupling and layout around that opamp, which is probably quite important given that it constitutes the sampling capacitor's ground return.
« Last Edit: July 11, 2019, 09:36:21 am by magic »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf