Ted Yapo - Towards an Open-Source Multi-GHz Sampling Oscilloscope

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] okay our next speaker is a longtime hardware hacker occasional writer for hackaday he enjoys working with components and off-label uses and occasionally practices with practical application his talk today recounts in his journey towards an open-source high speed sampling oscilloscope please welcome to the hackaday super conference stage Ted Yap oh thank you all right so again I'm Ted Yap oh and I'll talk today about some progress towards a multi gigahertz open-source sampling oscilloscope towards means it's not done yet multi gigahertz means between one and ten open source you all know what that means and sampling oscilloscope we're gonna need to find as we go because that may not be familiar to as many people so we're gonna start somewhat arbitrarily with the state of the art in 1968 and this is because these were the first things I got exposed to so here is the state of the art 1968 on the left hand side is the Tektronix s1 sampling head that was announced in the spring of 1968 with a 1 gigahertz bandwidth you may not recognize the connector that's a gr8 74 connector on the on the front and you can see they transition to the SMA connector by the fall when they released the s4 sampling head with a 14 gigahertz bandwidth this was in 1968 so this is just amazing from my perspective I wondered how these things could possibly work it turns out they published the schematics and and descriptions of how they worked so it wasn't that much of a mystery but it really set the hook in me when I bought these on eBay and opened them up so here's the sampling board from the 1 gigahertz part and one you want to get Hertz plug in to our eyes today used to identity surface mount you know high-tech components this is one step up from macaroni and white glue right bug it is and and the thing that really got me was there are two Schottky diodes here and these black packages is one behind each other and this is actually what sampling wave for him with the one gigahertz bandwidth this is just just amazing you look at the here's the strobe board from the 14 gear Hertz sampling head again the first time I looked at this I'm like I could design and build one of those the truth is what I probably was thinking is I could solder one of those although after the SMD challenge the other day I'm not even sure of that the the key thing on this board is this step recovery diode this thing switches off in tens of Pico seconds and switches off the Schottky sampling diodes on the other board here so I was just amazed by the simplicity of this and the performance that it got and so to look at how we might duplicate this in modern technology first we have to take a look at exactly what they're doing so we're going to discuss real time sampling which I'm sure everyone's familiar with versus equivalent time sampling which may be a new concept so in real time sampling you have this waveform here here it's a sine wave and you take samples at uniform points in time and if you've done this at a high enough sampling rate you can reconstruct the waveform exam exactly and there's a Nyquist theorem that tells you how often you need to do that so you may have an idea in your head about how this might work you might have a fast analog to digital converter and some fast Ram and you clock them together and generate these samples and if you have that image in your head that's great but I want you to forget it because that's not what we're gonna do so we're gonna contrast that with equivalent time sampling which is how these oscilloscopes work and so the caveat here is your waveform has to be repetitive obviously the sine wave is repetitive square waves triangle waves all the basic things are repetitive and the trick is to make any complex waveform you want to digitize repetitive as well and if you do that there's a much simpler way to obtain the same samples that you did in real time sampling and so the trick is to always take your sample relative to a trigger point on any repetition of the wave so here the first sample point is right on the trigger point the second sample point is offset a little bit from the trigger point and so on and it doesn't matter that we've taken this on the first wave in the second wave and the third wave you could wait a thousand in between you could wait a million you could take the next sample next Thursday as long as you're accurately offset a trigger point on that repetition of the wave you'll get exactly the same sample as you do in real time sampling and you can reconstruct the waveform in exactly the same way so how do you do this take a quick look at the architecture basically you need two things you need a sampling gate of some sort some sort of device that can take the input and get a sample of it and store it somewhere here it's drawn schematically as a switch and a capacitor it would be great if you could actually use a switch in a capacitor but but the switch switches you can get are too slow and you need a variable delay so when the trigger comes in you wait a variable amount of time and then you take your sample and the way you use this the simplest way is if you have a device that you can clock yourself you have an internal clock I've kind of drawn it on the left side of the diagram but this is a clock internal to the sampler it creates a clock for the device under test you take the output of that and sample it and meanwhile you have the trigger driven by the same clock this is useful if you want to measure the rise or fall time of a driver for instance in cases where you have a device that generates its own clock you need to split off part of the waveform to as a trigger and this is known as a trigger pick off in some cases this is part of the sampling and in some cases it's external so here's an example from 1989 of this technology it has exactly the exactly the architecture we just saw this is a Tektronix 11801 B there are a couple different versions of this and this is typically if people like you or I want to measure high-speed signals today this is what you buy on eBay this costs about $1000 now when it was new it would have been about 54 thousand dollars in today's today's dollars with with the for sampling heads this unit that's on my bench has 75 thousand hours on it it's still working it's not going to work forever and these eventually gonna dry up and we're gonna need something else to use there isn't a pipeline of newer versions behind this because they really stopped making these sampling scopes and in this kind of style because real-time scope technology became available and everybody jumped to that but you're not going to be able to for a real-time scope at 20 gigahertz which this is very easily I know I'm certainly not so we've got to come up with our own so the way these all worked and and we're gonna contrast this with a different way later on is the analog way so here's a simple schematic of a sampling head with four Schottky diodes you've got your input that's 50 ohm terminated you've got a hold capacitor that you want to get the sample of your waveform on and we can do is you can turn on these diodes for a very brief time with a current pulse so while the currents flowing through the diodes they act as resistors and a portion of your sample of your input waveform ends up on the whole capacitor and when the diodes are reverse biased they they act as open circuits it's not exactly true there's actually some leakage that you need to compensate for and so you can buy Schottky diodes today great ones that work fine in this application the trick is to come up with these current pulses of very fast current pulses and so in 2019 there are a number of different ways you can do this you can just just for contrast you take the five five five that is a hundred nanosecond edges you can there's some CML gates that are made today they can get down in the single-digit picosecond range I haven't been able to get any they will return my emails but you can easily get down to the twenty twenty to thirty Pico second range using a variety of technologies later on we'll talk about using some emitter coupled logic here in the hundreds of Pico seconds and you may recognize this from the early crazy super computers so that technology still available very fast and useful the other one is current mode logic get that down into again the twenty or thirty Pico second range and I use that in part of the design as well so I'll do this information I charged off and built my first analog sampler here it is it's got seven port AC logic at the top to generate the strobe and a diode gate made with six Schottky diodes sometimes you see with two we saw on the s-1 head the schematic had four and this uses six they're different topologies you can use here it is on the bench being tested you have the sampler there's a fast step generator generates an edge that you can use to estimate the band and the other board is the delay generator to do the trigger delay and here's the UI you have a potentiometer to set the delay and you read off the sample on a voltmeter and then you just write them all down so my first waveform took about half an hour to capture and then when you plot it here it is so this sampler has a rise time about two and a half nanoseconds which equates to bandwidth of one hundred and forty one megahertz so this is what you can get with pencil and paper with this technique so you can imagine if you through microprocessor and some real stuff at at what you can do and here's the problem with the analog way so technics is as very kindly allowed me to reproduce this for you this was from a paper generated by picosecond pulse labs in 1989 Tektronix subsequently acquired them they took nine of the leading sampling oscilloscopes in the world these were all world-class devices in their time and fed them with exactly the same input and the results are all different right so this is what you can do with the world-class design teams basically unlimited budgets and decades of experience so you have to imagine what I can do in my basement on a shoestring budget with very little high-speed experience this is a tough problem analog samplers are a tough problem I haven't given up on it I have about six designs in the works and I think this is the way to go above 10 gigahertz eventually but it turns out there's an easier way if you're content with things below 10 gigahertz so we talked about the analog way using Schottky diodes as as sampling devices now we'll talk about the digital way so here's the schematic I've got a comparator here it looks like an op amp but it's a comparator and all it does is compares the two inputs plus and minus inputs and tells you whether one is higher than the other a digital analog converter converts a digital word into an analog voltage in some control electronics and so we can use this even though we only get a one bit output we can use this to measure the input voltage so if I have one point three volts input maybe I guess it's one the competitor says on comparator says I'm too low so I'll adjust my gas I'll say it's 1.5 and now it says I'm too high and I'll try 1 and 1/4 and now it says I'm too low again and I'll do this successively and each time I do this I'm getting one more bit of accuracy in this analog to digital conversion you may recognize this as a successive approximation in a lot of digital converter and even if you don't recognize it you may have used this without knowing this without knowing it because this is built into a number of analog to digital converters you can just buy off-the-shelf so this works with a DC input it turns out there's there are comparators that have a latch input as well and what these do is these compare their two inputs at a very specific moment in time you can buy off-the-shelf comparators that have sampling apertures in the tens of Pico seconds so they can do that comparison in a very short window of time and so you add a nice 50 ohm Terminator on the input you drive that latch from the delay line like in the architecture we saw before and now you have something that can emulate an analog sampler by using the successive approximation technique so this technique this wasn't available in 1968 this whole thing comes about in 1975 from my master's thesis it was done here at UCLA and this architecture in this master's thesis is a little bit different but basically the same idea and then for about 10 years NIST had a program to develop a very accurate waveform sampler they actually went as far as developed in their own comparator because they didn't it couldn't get the performance that they needed with off to shelf devices although the ones we have available today made with silicon germanium are much better and then into 14 at 2014 there was actually a Kickstarter campaign to to produce a 300 dollar sampling oscilloscope which I think has a similar architecture to this one although the design wasn't published and it's not open source and we really don't know and that way that wasn't successful unfortunately so if you look at what comparators are available today these are all analog devices parts the last two came in from the hittite microwave acquisition but they have bandwidth between 1 and 1/2 and 10 gigahertz single my single quantity prices between six and seventy dollars if you graph this it's almost exponential so you pay a lot for the higher bandwidth I thought the sweet spot here was the eight gigahertz bandwidth the part cost twenty dollars a quantity one I think if you buy a hundred of them it's just under eleven dollars each which is kind of a bargain for what you get once you have the comparator right though the next thing you need is it as a delay technology to build your time base the first sampler I showed you before used a resistor and a ver actor as an RC circuit a fair actor is a voltage variable capacitor basically and by varying the voltage on the capacitor you can change the capacitance and change the RC delay this is amazingly cheap and simple and wildly unstable and probably not useful for anything there are a number of different technologies here and I've played with each one they've all been used except for the FPGA FPGA techniques in commercial designs although the FPGA stuff is up and coming the last one using switch gate delays is actually what I use and so there's an off-the-shelf part that's used to align clock edges this is an ECL part it's from the micro line that was bought by microchip not too long ago on some on semiconductor also has a basically compatible version and what this is this is an ECL part that's very fast and has a number of gate delays that you can switch in so you can switch in one gate delay two gate delays all the way up to 512 gate delays so we have a 10 bit Digital word that can control the delay through this part and increments of about 10 picoseconds and they're not accurate and they drift with temperature so you need to calibrate this part the other nice thing that it has a animal analogue fine tuning voltage that you can tune between 0 and 30 picoseconds and i feed that with a 12 bit DAC so theoretically you have a resolution of about 20 femtoseconds you can tune this to of course that's dwarfed by that's worth buy drift and buy jitter and some other things so you really can't get it that far you can get it down to one or two picoseconds pretty well and so once you have that you need to calibrate this delay line and the easiest way to calibrate this Delaney is stick an inverter on the end and loop the output back to the input and once you do that the whole thing starts to oscillate and the oscillation frequency depends on the delay and so you set the delay and measure the frequency and then you can calculate what the delay is and you do that for all the different steps and the fine tuning voltages and you can build a table that that you calibrate and it turns out you can calibrate the end points and everything is pretty linear in between once you've calibrated individual steps and you can recalibrate in in about a hundred milliseconds so at this point I'm doing that before every sweep just to just to make everything accurate so I put this all together this is the specs for the second prototype the interesting thing here is that achieves about seven gigahertz bandwidth well there's little asterisks there we'll talk about why that is equivalent I'm sample rate of 100 Giga samples per second base I've pushed it up to about 500 GB samples per second I think you could probably get it to a tera sample per second although it may not be that interesting because of the the level of jitter involved and the cost for this the parts cost including the PC board is a less than $100 still that may vary a little bit going forward there's a picture of it it's built on ash Park at far 408 for layer process the power supplies right now are off the board there are some linear regulators on there just just to keep noise from leaking where you don't want it but the switching power supplies that I'd eventually like to put on or not on the board it's not something I wanted to put on sensitive electronics at this point here's the first waveform I captured this was from proto 1 on the left in green is my waveform on the right is the result from the 20 gigahertz tech scope the main difference here was some ground bounce because of the way I was triggering you can see I've highlighted here and the bottom left although otherwise they seem pretty similar especially compared to the the discrepancies we saw on the analog scopes in the in the P SPL paper there's another example this is a sine wave output of my VNA my VNA only goes to three gigahertz so this is the sine wave out at 2.75 gigahertz there's some distortion here I don't know yet whether this is in the debt and the VNA or the way I'm I'm sampling it here's an example of a 1 gigahertz square wave if you think about what's involved in 1 gigahertz square wave there's a lot of harmonics involved right third harmonics at 3 gigahertz fifth at five you're here at Summit that seven gears it's tough to even produce a good square wave this speed and then measuring it's another thing so here's an example of using a very fast edge to measure the bandwidth so if you take the rise time between 10 and 90% of the of the extremes here there's a formula based on the assumption that the the sampler has a Gaussian or first order response you can estimate the bandwidth from this rice on which is what I did in the first sampler there's some noise here so every time you do this you get a little different answer so I did it a thousand times and I estimate the bandwidth you know it's somewhere between seven and seven and a half gigahertz the datasheet for the comparator says it's eight gigahertz and if you read the fine print in the datasheet they say they're using the 20 to 80 percent rise time so I had the data to do that you do that and you get eight and a quarter here so they're not lying if you measure it their way you get eight gigahertz so I don't know what to call it the truth is this probably doesn't have a first order response so this bandwidth estimate just using this rise time in this formula probably isn't very accurate so I have to use another method estimate that bandwidth and and that's the next step but just for comparison I know I'm throwing around two gigahertz and picoseconds and and all those sort of things the seven and a quarter gigahertz bandwidth equates to a 48 Pico second rise time right if you don't have a idea of what 48 picoseconds is light travels 14 point four millimeters in 48 Pico seconds that's the width of my little finger so that's that that's the rise time of this scope in PC board material signals travel about half that speed so they travel about half as far in the nice time of the scope so this is going pretty fast let's talk a little bit about applications the first step is time domain reflectometry you may never have heard about this but this is very similar to radar if you can if you're familiar with the concept of radar except this happens within a transmission line for measuring things along a transmission line so here's an example of a setup that you might use there's the sampler that we've built the there's a very fast step generator connected to a splitter and what you do is you send out an impulse down a transmission line a piece of cable a PC board trace or whatever you measure the reflection that comes back and by measuring the time and the amplitude of the reflection that comes back you can deduce what the characteristic impedance is of each section of the cable you could do that too so here's a picture of the setup you got the sampler the step generators little modular plugin there's a cable that goes here the device under test is this a trace on a PC board and this is the return you get back so let's look at what this what this means so the first part this little wiggle is just from the TDR head itself and you can ignore that this next section right around 50 ohms is the cable and if you bend the cable you can watch that impedance move around but a big kink in the cable you can see what it does to reflections this next section is the mated SMA connectors and here's the PC board trace itself it doesn't look like a very uniform impedance and this is because fr4 is made with fiberglass and the fiberglass weave makes little bumps and they beams bill Hurd has a great video on this on hackaday comm if you haven't seen it and you're interested in this stuff you should definitely check that out and he has the same scope that I do that the Tektronix scope and uses that for some measurements and finally the end part at 50 ohms again is the 50 ohm terminator so what do you do with this so let's say you want to design a 50 ohm coplanar waveguide this is a specific type of trace that's supposed to have a defined impedance on a PC board so you can pull up the chi-chi calculator and it'll plug in the characteristics of your PC board and they'll tell you how wide the trace needs to be it turns out this isn't your only choice there are a whole bunch of these calculators and they all give you different answers so I ran ten of them I got between thirty point five mils and 40 mils and they're all different so first problems you gotta pick one the second problem is none of them are solving the problem that you want to solve and what they're solving is the problem on the left they're assuming that you don't have a solder mask which will reduce your character characters and beans and there is also assuming that somehow the top and bottom ground planes are magically held at the same potential well no there's no way that that happens what you have to do is you have to have vias that connect the top and bottom ground planes and once you have vias on the side of this structure you've created not a coplanar waveguide structure but what's called a channelized coplanar waveguide structure that has a different characteristic impedance there are not calculators for this unfortunately so what do you do you build a test board so here this is on two layer wash park I've got five different traces from 18 mils why to 30 miles wide and I test them you know you can't really tell the scale of this right so that's better so you can tell from this picture this is exactly three inches long and the reason that this the TDR a resolution here is about five millimeters you needed this long because there are variations in the impedance due to the due to the fiberglass weave right so you want to see an idea of this the variation so here are the TDR traces I've plotted them all on one one graph you can see the characteristic impedance varies from about forty seven forty seven ohms to about fifty three ohms the reality is these would all be great matches for most RF applications if you're building an oscilloscope though these kind of reflections can add up in your in your time domain response and will will make it look kind of lousy so I didn't hit exactly 50 with any of these so what you can do is you can plot them you can see or the distribution of each one at each trace width you can see the distribution of impedance and that's again due to the fiberglass we've issued and this is this curve is fit almost exactly by quadratic it's it's very good fit and you could figure out where it hits the 50 ohm lines and come up with a fact that you should be 22 mils wide to have a 50-ohm trace on this board it's interesting to compare this with what the calculators did these are all the different variance calculators in red the worst case puts you off by about 10 ohms all right so you'd have a 60 ohm trace instead of 50 again that's only about a 9% reflection in most cases that may not matter in my case it does because that 9% reflection is what makes those little Wiggles at the top of those steps so here's another applications eye diagrams for those who aren't familiar we'll just have a brief entry fist of introduction to eye diagrams so here's a snapshot of a serial waveform you've got a zero in one bit position another you've got a 1 and you've got a zero right that's easy and the interesting thing is you see this little overshoot between the 0 and the 1 that overshoot goes away if you had a 1 in the beginning and so what that shows you is the shape of the waveform for the particular bit depends on what's happened before and so this is how a lot of distortions one way one way that distortions happen in in serial transmission and the way you visualize that is you do what's called an eye diagram you take a whole bunch of different bit patterns before the bit you're looking at and line them all up and overlay them and draw this diagram so here I've got the previous 11 bits all did all the possible patterns of the previous 11 bits all the different ways they could change and what that how that affects this this diagram the reason this is called an eye diagram if I show you one that looks like a more classic diagram is the center portion looks like a human eye right it looks like it's open and it's looking at you in order to do this I cheated a little bit and through a low-pass filter in there to slow down the edges just to get this this image so this would be a good example of a a good idea Graham you could easily tell the ones from the zeros right the ones are on top and the zeros are in the bottom here's an example where the eyes closed in this case you couldn't tell ones from zeros anymore and you'd have a lot of errors in bit transmission again I cheated this was 225 megabits transmitted over some jumper cables I found in the garage and so this explains why you don't use this in high speed data transmission the hardest part was getting SMA connectors on here finally there's just the joy of discovery right when you buy a microscope what do you do you grab everything on your desk and put it under there under there and look and so I had this other circuit this was a gated ring oscillator and this is measured on a 1 gigahertz oscilloscope you can see the output at the bottom and the purple looks kind of like a sine wave and so one of the first thing I did when I came up this new sampler was to measure it on the new sampler and it looks different right you see these little these little steps in in the output and I first I thought this was reflections on my PCB traces like this was a problem in in mice and my scope itself I tried this on the faster tech scope and yeah they're there and in fact what this is this is a seven for AUC gate that uses this three-stage output to drive transmission lines and as the as the waveform as the waveform goes up these stages turn off in in turn and over the period of you know a hundred picoseconds or so these various stages are turning off and you can see that in the waveform this isn't a bug in the part right there's nothing wrong with this part this is this is the behavior as designed but if you didn't have a scope this this fast you would never see it so this is a way to like see what's going on inside the part that you just you wouldn't see with a slower scope it's just a way to get an idea of of what's happening inside I think that I thought that was really neat like I found this I thought was an anomaly and I'm actually discovered something about this part that you couldn't see with slower scopes so what's next proto 3 obviously first I need a better name I'm terrible at naming things I need a faster CPU on there some time base enhancements I want to get the power supply integrated and I will get this in Chi CAD right now it's in Eagle and for 4 layer Eagle you have to buy a subscription I'm happy to do it but I know that limits of what a lot of people can do with it because they're not willing to pay for an eagle subscription for applications I want to explore ultra-wideband radar this has certainly got the the bandwidth to do that and lidar if you took some optical networking components and threw them on the front of this you could make your own lidar system I have to thank a couple people of my my friends on Twitter and and hackaday da da da o especially bill Hurd who was nice enough to test some things I would send him in the mail before I got my fasco if this interests you at all get in touch you can get me on hackaday io or Twitter I love to talk about this as as you can tell and I'd love to talk to you about this your projects or how you might use this right now I'm looking for interesting use cases so if you have some fast signals you want to look at I'd like to see if this can measure it one thing I'd like to leave you with before I finish out in order to that I didn't know much about high-speed design when I started this project just about a year ago and I went through dozens of designs testing just traces on PC boards and about a hundred smaller tests testing components and footprints and and things like that and I used to work with a couple engineers who would kind of derived this as cut and try engineering and their idea was you should really understand the theory first and you know be able to design something that works on the first try and that's not how I do it I beat my head of might beat my head against a problem until I solved it and that's what I've done with this to get there so far so this is what I had to do to learn sort of the basics of high-speed design somebody else might have to do this to blink an LED and that's fine that's a perfectly valid way to approach a bra problem if you stick with it ask for help when you need it you'll eventually get there [Music]
Info
Channel: HACKADAY
Views: 16,436
Rating: 4.9830747 out of 5
Keywords: Hackaday, Hackaday Superconference, Supercon, Ted Yapo, Oscilloscope, High-Speed Circuit Design
Id: 99u53V7uDFY
Channel Id: undefined
Length: 31min 7sec (1867 seconds)
Published: Sun Nov 17 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.