Idea for reasmpler to view high frequency waveforms on a soundcard. - Page 1
Forum section: electronics / projects

author: akkudakku
author_rank: Newbie
timestamp: July 05, 2019, 12:07:22 am
content: 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 :-)

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 05, 2019, 12:27:17 am
content: Have you considered hacking a cheap RTL-SDR for direct sampling?

author: akkudakku
author_rank: Newbie
timestamp: July 05, 2019, 09:08:36 am
content: 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!

author: thinkfat
author_rank: Unknown
timestamp: July 05, 2019, 02:58:15 pm
content: 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

author: jpb
author_rank: Super Contributor
timestamp: July 05, 2019, 04:52:38 pm
content: You may find this interesting:https://www.analog.com/en/analog-dialogue/articles/turning-pc-sound-card-into-sampling-oscilloscope.html

author: David Hess
author_rank: Super Contributor
timestamp: July 05, 2019, 10:36:32 pm
content: Here is the same idea but with 1 GHz bandwidth:https://www.electronicdesign.com/boards/1-ghz-sampling-oscilloscope-front-end-easily-modified

author: akkudakku
author_rank: Newbie
timestamp: July 06, 2019, 07:38:38 am
content: @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.

author: thinkfat
author_rank: Unknown
timestamp: July 06, 2019, 07:47:46 am
content: 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

author: jpb
author_rank: Super Contributor
timestamp: July 06, 2019, 09:16:31 am
content: Quote from: thinkfat on July 06, 2019, 07:47:46 amA 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.

author: magic
author_rank: Super Contributor
timestamp: July 06, 2019, 09:32:18 am
content: 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 protectionQuote from: David Hess on July 05, 2019, 10:36:32 pmI 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.QuoteI'm not sure if that's accurate, I think it should be added to the 50Ω impedance of the cable, giving τ=150ps.QuoteAnd 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 itAnother 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.

author: SiliconWizard
author_rank: Super Contributor
timestamp: July 06, 2019, 02:40:26 pm
content: Quote from: thinkfat on July 06, 2019, 07:47:46 amThis 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-oscilloscopesOf 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

author: thinkfat
author_rank: Unknown
timestamp: July 06, 2019, 08:09:56 pm
content: Quote from: SiliconWizard on July 06, 2019, 02:40:26 pmWhich 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

author: Benta
author_rank: Super Contributor
timestamp: July 07, 2019, 08:35:48 pm
content: 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: thebandwidthof 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.

author: David Hess
author_rank: Super Contributor
timestamp: July 08, 2019, 04:01:48 am
content: Quote from: thinkfat on July 06, 2019, 07:47:46 amThe 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.Quote from: magic on July 06, 2019, 09:32:18 amThe author used a very simplified and low performance sampler implementation even given his construction requirements.QuoteIn 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.QuoteLater 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.QuoteToss out the capacitor entirely and use an open circuit 1/2 wavelength transmission line tuned to the sampling gate time.QuoteTektronix 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.Quote from: Benta on July 07, 2019, 08:35:48 pmThe 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.

author: magic
author_rank: Super Contributor
timestamp: July 08, 2019, 07:28:33 am
content: Quote from: David Hess on July 08, 2019, 04:01:48 amIt 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.Quote from: David Hess on July 08, 2019, 04:01:48 amYep, 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.

author: David Hess
author_rank: Super Contributor
timestamp: July 10, 2019, 04:20:53 am
content: Quote from: magic on July 08, 2019, 07:28:33 amOh, 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.Quote from: David Hess on July 08, 2019, 04:01:48 amTektronix did this to implement "smoothing" mode in their sampling sweeps which reduced noise but it naturally only worked with sequential sampling.

author: magic
author_rank: Super Contributor
timestamp: July 11, 2019, 09:34:36 am
content: Quote from: David Hess on July 10, 2019, 04:20:53 amWell, he gotsomeresults, 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.Quote from: David Hess on July 10, 2019, 04:20:53 amNo problem, I'm not really building anything, just offering a bit of free criticism on the InternetThe 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.