Why Buy A New Scope When You Can ‘Just’ Build One?

ThunderScope datapath

Hackaday Prize 2021 Finalist ThunderScope is doing exactly that. [Aleska] is building a modular open source PC-connected oscilloscope aiming at four channels and a cool 100 MHz bandwidth with a low budget. The detailed project logs, showing how he is learning about ‘scope technology on-the-fly is a fascinating look into the mind of an engineer as he navigates the ups and downs of a reasonably complicated build.

We like how [Aleska] has realised early on, that keeping the project private and only releasing it when “I’m done” actually impedes progress, when you could open source from the beginning, log progress and get great feedback right from the start. All those obvious mistakes and poor design choices get caught and fixed before committing to hardware. Just think of all the time saved. Now this is an attitude to cultivate!

Modular Design

A modular approach to de-risk the hardware design is a good call, allowing upgrades or alternative functional modules to be dropped in as the need arises. Need to swap out a single-ended frontend for a differential one, or on one with some other specialised function? Sure, just pop it out and drop in the replacement and crack on.

 

A Neat USB 3.0 Trick

Neat USB 3.0 trick
From numato.com

The data path pulls samples from the HMCAD1511 ADC on eight 1-GBit/s LVDS lanes, feeding them into the SERDES blocks on a Spartan 6 FPGA. Inside that, a FIFO takes the deserialised (parallel) data and synchronises it into the clock domain of the USB interfaces, as well as buffering during periods when the USB is busy. This allows the use of an off-the-shelf USB 3.0 FIFO interface chip from our good friends at FTDI to deal with all that messy interfacing.

Next the ADC itself needs configuration, the programmable frontend also, not to mention the FPGA requires its bitstream loading via JTAG during development. All this ‘side-channel’ stuff is dealt with via a USB 2.0 interface chip (again from FTDI).

This neat trick of inserting a USB 2.0 Hub takes advantage of the way USB 3.0 connectors can have both USB 3.0 super-speed ports and high-speed ports operating in parallel, so you can wire the super-speed port direct to the FT601 interface chip, and stick a hub chip in the USB 2.0 path and then feed other USB 2.0 devices from the same connector. A simple, but clever trick to save both cost and complexity!

The eagle-eyed will notice that some of the traditional oscilloscope circuit functions are missing, notably a hardware trigger. This design is hinging on the speed of modern PCs to enable this function to be implemented adequately by the scope application when continuously fed with all the sample data.

We shall watch with interest how well this pans out.

26 thoughts on “Why Buy A New Scope When You Can ‘Just’ Build One?

  1. You see? These things are the very reason people are not learning anything anymore. Who wants to go out and spend a couple of thousand dollars for a scope or hundreds for any other piece of test equipment or project to build ? What are you going to learn about what you have when you purchase it in a box ready assembled, all you have to do is turn it on and hope to become familiar with how works by reading an instruction pamphlet. Very little ! The entire electronics industry has left people with desires to learn behind and gives them what the industry deems is needed and not what so many are truly wanting. Who has 10’s or 100’s of thousands of dollars to spend 3 to 5 years in a school to learn how to do this? Not nearly enough. OK so some will do this but there are thousands more that would like to learn by making a hobby from building or assembling electronic appliances at home. Some may even find a way into the world work force by learning at home and then moving on to a higher level of education with a firm knowledge of basics and get through school much faster and spend lot less thereby making their lives much easier by not having to pay off HUGE loans for school for years and years. The electronics market has lost far too many businesses on account of so called advancements like SMT. I can’t urge with making components smaller for reducing resource use but I don’t see reduction happening with increased quantities of disposable appliances. I think the world still has a great need for kits and means for people to build their own stuff which is simply gone now with Heathkit and others. Now we have lost Frie’s electronics among others like Radio Shack, which at one time used to be a good source for electronic components and later on not much more than a battery house with a few toys and what ever mostly made in Japan or China, surrounding areas. The whole idea of made in U.S.A. is leaving question marks on peoples faces. You mean we used to make things right here? The secret to the universe is not made in China or anywhere else in the far east ! Now with things as they are factories and government need, no MUST make it plausible for industry to exist within our own borders and employ people here doing something besides what is left over after all those industries left. We have some of the most developed cities, ( at one time ) literally rotting into the earth with once great factories that used to make stuff we are forced to import with supply disruptions due to plagues, political and social issues, material issues, environmental issues, foreign affair issues you name it. We didn’t have to worry about those things when we were not depending on anyone but ourselves. The Global Market is only going to prove one thing, and that is it Can’t work in perpetuity. The internet has filled in a gap but who truly wants to wait days, weeks or longer for a few parts that are not able to be located locally or even out of the community. That is a waste of the most valuable resource your time, and the waste goes on from that point. It doesn’t take a genius to see that. It will take a lot of changes to make the industry return as it was back when RCA was making TV’s with modules you could pull out like tubes and have them tested, buy a replacement and go home and make your TV work again, and not likely to be that way ever again. So where do we go from here. I’ve seen where we ended up and I’m not fully satisfied. Fortunately ( perhaps) for me, I don’t have a lot of time left to dwell on it. I’m just an opinionated old fart trying to adjust to a different world than what I grew up in. Like it says in the old song. I’m an old hippy just trying to adjust. Ain’t trying to please anyone just trying to get by. Time is passing so I don’t have much to sit waiting on a trans oceanic cargo container and a customs station. I like building things and its even gotten to a point it’s almost impossible to find a schematic for something to build you think you might want to build beyond an LED blinker on a Arduino. I never learned C code so now what? Find a place to go sit with a pole in my hand waiting for something else, everyone knows how that will end. We saw it in the movie Grumpier old men. Works for me I guess.

    1. The fact that this site and thousands like it exist is proof enough that no electronics as a hobby isn’t dying out (and people who have the curiosity to dive into its depths aren’t disappearing either) it’s simply evolving. I actually agree that there are many ways in which the modern world has taken a wrong turn (namely the effect we’ve had on the environment), but it’s not all doom and gloom.

      Sure we can’t run down the street and buy a vacuum tube to fix our own tv within a half hour of it breaking anymore, but at the same time I can by a $5 chip (sure it wont arrive immediately) that has millions of transistors in it and within half an hour program it to do some non-trivial task that just a few decades prior would’ve required a computer the size of a room. I can dream up an idea and using parts in my junk drawer and pretty advanced CAD software throw together a working prototype/proof of concept in short order. I have cnc tools in my home that were pretty affordable, that once would only exist in some advanced research lab or multi-million dollar manufacturing environment.

      So yeah things aren’t perfect but they aren’t the end of the world either … at least yet. Now don’t get me wrong, I’m not content with accepting everything that’s wrong just so I can have what I want, we really do need to do better in many areas but at the same time we cant do that by throwing everything out the window and giving up on the world.

    2. if i understand the criticisms correctly, i worry about the same thing. i’m more serious about software (my hardware skills are poor, but i keep playing!), and i often despair, how will kids learn these days?? the one path i took, through GWBASIC, DEBUG.EXE, ASIC, Borland Turbo C++, microcontrollers, hacked devices hanging off of LPT ports, the whole bit…it’s all obsolete, there’s no way for a kid to get the kind of exposure to the high level and low level of it at the same time the way i did. and i really don’t know how kids these days learn anything.

      but in hardware, it’s easier for me to see, maybe because i’m seeing from the outside. like i bought a cheap oscope, even though i’m not really that serious about it…and i wound up setting up a transistor+resistor+capacitor to try to get a certain signal curve for interfacing with a dallas 1-wire bus. it was eye opening to me to be able to actually produce on the oscope the same curve as in the dallas datasheet. i’m still a noob at this…don’t have any of the skills of my grandpa (radio technician) or father (designs lab equipment for chemists). but because it was dead simple to spend $300 on a piece of quality test equipment that i hardly understand, i am now much less naive about signals than i was a couple years ago. this path really is educational.

      i was just at the local electronics store…so depressing. the guys there are great, but anymore their value is they tell you how to get anything done even though they don’t have the part you wanted. i wanted to buy a spool of fine stranded wire and the guy pointed out i can just use old computer cables. i mean, it’s good advice but i still would love to have 100′ of uniform wire that i don’t have to think about. it’s definitely gone downhill from 20 years ago! but as great as it was 20 years ago, it still rarely had exactly what i wanted. in fact, a lot of times, what i wanted was unobtainable. reprogrammable microcontrollers used to be almost unheard of! and it used to be a lot harder and more expensive to get a custom pcb made…now the path is well travelled. i can almost never get what i want locally, but the variety of things i can order online has become unbelievable.

      so there are still ways to learn a lot of things in electronics, and a ton of opportunities for a hobbyist to get their feet wet. we aren’t learning the same things that our parents learned, but we are learning, and when we are faced with a problem outside of our pampered world, we’re not completely helpless. i assume it’s the same way with kids learning software…they may not know about bare metal programming but i bet when they do have cause to do it, even that background in jquery.net++ turns out to prepare them to learn what they need to.

    3. This is a little like saying, how can you understand art if you don’t make your own paintbrushes and grind your own pigments? Having an oscilloscope – even one that came out of a box – is a great way of exploring electronics.

      If anything, I’m more worried about the “put it through an ADC and do everything else in the digital domain” attitude. Sure, there are many advantages to digital, but simplicity is not one of them. When learning, it’s more useful to see how an inexpensive analog oscilloscope works than to study a digital device that emulates one.

    4. Being an opinionated, ornery old git myself I see the end of the road looming and reflect on the changes, both good and bad, I have flowed through. I often exchange walls of vent with like minded folk – usually verbally as writing is too hard :-)
      But, on good days I try to take a positive view on what we have now. I used to have to wait until the weekend for my pocket money and a lift into town where I could get the parts for my latest project from the town Tandy (UKs Radio Shack). Now it takes a similar time to get 100 of the same things for the same price online.
      WIth my eyes long past being able to read even through hole resistors without help I have little love for the grains of sand that have replaced them in todays ever more compact stuff – but I do appreciate I live in a time where these things are available – even if I can’t repair them myself.
      I also appreciate that I live in a time where I can fairly easily and quickly source the kit I was using and repairing back in the 70s – my man cave is full of it – and still get joy out of using, modifying and repairing it. Every project brings problems to solve and things to learn as I try to minimise my personal entropy before I collapse into chaos.

  2. Thanks for the write-up! I’m excited to put this scope out for anyone into hardware to freely use and tinker with. I’m also happy to hear that people are reading about how it was designed and learning from my mistakes along the way. Please keep following along though, as I’m only about halfway through documenting this project as it stands today!

  3. I’m worried about that ‘we’ll take care of triggering in software”. Jitter, aperture uncertainty in track/hold ships for the analog sample: all require precise repeatable timing. Muxing 4 channels: doable. But catching the right moment in the rise of the trigger channel is best left to a bit of analog hardware.

    1. i was concerned about that too…i’m not sure i understand correctly. are they really going to sample continuously at full speed and stream every sample into some processor/fpga capable of doing the trigger comparison? if so, it seems to me like it should work ‘well enough’, and actually would solve the windowing problems you were talking about. you would know the trigger event in the context of the same sample stream as the data you’re going to display to the user. it won’t have to somehow correlate a trigger input that is separate from the buffer.

      i do know my cheap siglent has some flaws in its triggering…i didn’t fully characterize it but i got the impression that at some time resolutions and trigger modes, it samples little windows rather than full time, so it sees maybe 100ms out of every second. or maybe it’s aliasing at low speeds…i really don’t remember. but i do know, if the trigger is part of an oscillating waveform it does a good job but if i’m trying to catch a single event, it can be almost unusable, i have to play a game with the instrument to get it to work at all. but it does show that even with all those flaws, it still is a useful tool so i’m optimistic for this project!

      1. When the data stream is not sync’d with the clock in this digital scope, you’ll see aliasing and this will cause smearing of the moment of trigger. If you’re watching this on the screen what you’ll see is a span of time larger than a sample interval in variation of the detection of the rising/falling edge. Weird effects when the clocks are near not not sync’d: moire patterns, hard time actually ‘seeing’ this signal clearly.

    2. HaD seems to have a very low bar on what they would call a scope.

      Proper scopes have a very precise triggering and low jitter sampling clock so that they can do undersampling, allow for overlaying multiple samples for things like eye diagrams or measure cycle to cycle jittering.

  4. This design seems about like a Rigol DS1054Z, which you can buy for <$400. You're not doing this to save money.

    Surely you don't need to create your own oscilloscope to call yourself a circuit designer. I didn't design my laptop or voltmeter or soldering iron either.

    It sounds like the sort of thing I should get paid to do, but it's a free country, so if that's your passion, knock yourself out.

    Personally, if I'm going to create an electronic design as a hobby, I prefer something that somebody else can't buy a better version of on Amazon.

    1. A Rigol DS1054Z has 50 MHz BW. Aleksa seems to be going for something like 350 MHz on one channel and less using 4 channels. I’d say it is close to impossible to find a new scope with 350 MHz BW for <$400. Of course, with 1 Gsps there is not much waveform being captured at 350 MHz, but that could be said for other scopes as well.

      Personally, if I'm going to create an electronic design as a hobby, I prefer something that I like to design and create myself, not necessarily something somebody else can buy a better version of on Amazon.

      1. Nitpick: the 1054Z has 100MHz available bandwidth, but is limited to 50MHz in software. It’s trivial to generate a license code that unlocks the full hardware capacity of the scope using a site like “riglol”.

  5. He should turn it into a cheap spectrum analyzer, TRD, add a precision frequency reference or something that isn’t a commodity ( a scope). I never thought I’d say that in 1970.
    Nice first try, why not combine all the above with a scope, Seems like the oomph is there.

  6. I think the trigger-in-software at 100 MHz bandwidth will work fine at 1 GSps, but I’m not sure how well it will work when all four channels are in use and there is only 250 MSps per channel. That will cause quite a bit of jitter.

    But if it becomes a problem, one can probably develop a module with a DAC to set trigger level and feed the output of a fast comparator to the FPGA.

    1. Or much simpler have the trigger word DAC value in the FPGA and gate the samples being passed through off that.

      You could then develop further trigger registers to do neat things like sequence triggering, pre and post delays, etc, etc. Although some of that might require adding some RAM.

      1. Aren’t you basically describing trigger-in-software. Even if done on FPGA, it operates on the same samples and cannot change the time at which they were captured, or measure it relative to the actual trigger point.

        As far as I understand, hardware trigger circuit on most digital oscilloscopes measures the trigger timing to a greater accuracy than the sample interval. They cannot alter the sample timing, because a lot of samples have been captured before the trigger already, but the time delta is taken into account when displaying the waveform on screen. With no hardware timing for the trigger, the waveform would jitter around by +- 0.5 sample intervals.

Leave a Reply to Nath Cancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.