Author Topic: Building my own scope  (Read 15870 times)

0 Members and 2 Guests are viewing this topic.

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Building my own scope
« on: October 20, 2022, 11:14:36 am »
Ok, that could be way-over-my-head kind of project, but gathering some information won't hurt.

Here is what I'd like to do, in general terms:

1. Buy a Xilinx Zynq board (or something similar).
2. Buy some decent ADCs and attach them to the board.
3. Use something like Scopy as scope software.

Do you think it's doable?

Alternatively, one could just buy a PCIe ADC board with 4 channels and snap it into a common PC.

Again, it this doable in a reasonably non-nightmarish way?
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4243
  • Country: nl
Re: Building my own scope
« Reply #1 on: October 20, 2022, 11:21:19 am »
Depends on your skills of coarse, but it is doable.

Making something really high end and fast is more difficult and expensive though.

It is also the question why. If you need a scope for your hobby it is easier and probably cheaper to just buy one. If it is a hobby to build one then nothing is stopping you to just try. It can be a lot of fun.

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #2 on: October 20, 2022, 11:34:09 am »
It is also the question why. If you need a scope for your hobby it is easier and probably cheaper to just buy one. If it is a hobby to build one then nothing is stopping you to just try. It can be a lot of fun.

I'm motivated by two reasons, essentially:

1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

2. I think I'll learn a lot of things by building my own scope.

That said, I'm having difficulties finding the ADCs, primarily because I don't know exactly where to search, and apart from the main specs (e.g. resolution in bits, etc..), I don't know what to look for... Here is where I need advice.
 

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 7113
  • Country: hr
Re: Building my own scope
« Reply #3 on: October 20, 2022, 11:41:40 am »
It is also the question why. If you need a scope for your hobby it is easier and probably cheaper to just buy one. If it is a hobby to build one then nothing is stopping you to just try. It can be a lot of fun.

I'm motivated by two reasons, essentially:

1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

2. I think I'll learn a lot of things by building my own scope.

That said, I'm having difficulties finding the ADCs, primarily because I don't know exactly where to search, and apart from the main specs (e.g. resolution in bits, etc..), I don't know what to look for... Here is where I need advice.

Only do this if you want to learn. Prices for parts scope manufacturers get are very different from prices you will get for same parts at low quantity. FPGA + 2 ADC might cost you more than twice your budget for scope... Not to mention that it is not a beginners quest. There are dozens of open scope projects on net, and dozens topics here on the forum. Some attempted by pro FPGA designers and whatnot. None of them went to working product. Making a scope is a large, very hard project.
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #4 on: October 20, 2022, 11:57:16 am »
Only do this if you want to learn. Prices for parts scope manufacturers get are very different from prices you will get for same parts at low quantity. FPGA + 2 ADC might cost you more than twice your budget for scope... Not to mention that it is not a beginners quest. There are dozens of open scope projects on net, and dozens topics here on the forum. Some attempted by pro FPGA designers and whatnot. None of them went to working product. Making a scope is a large, very hard project.

I was thinking.. Let's not consider a FPGA-based project for now. It could be very, very interesting from a learning point of view, but I think it's too hard given my current level of competence. So, let's talk about ADCs on a regular desktop PC.

Consider Digilent Waveforms, a fine piece of software. It does all the things I need, essentially.
It works OOB with any soundcard. A soundcard is essentially a low frequency ADC.
It's not unreasonable to assume it'll work with a PCIe ADC.
The problem is that I'm having a hard time finding pci-express ADCs.

Maybe you can point me towards some manufacturers?

The only one I was able to find is this: https://dev.alazartech.com/en/

Prices are nowhere to be found though.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27662
  • Country: nl
    • NCT Developments
Re: Building my own scope
« Reply #5 on: October 20, 2022, 12:05:23 pm »
You might want to start with something that already works and go from there. Maybe the AD2 is suitable. An alternative is to use your existing oscilloscope as an acquisition device and do data processing on a PC.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4243
  • Country: nl
Re: Building my own scope
« Reply #6 on: October 20, 2022, 12:09:52 pm »
I'm motivated by two reasons, essentially:

1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

For that kind of money there are acceptable scopes to be bought, but it depends on your demands on it if you can like it.

2. I think I'll learn a lot of things by building my own scope.

Yes, you can learn a lot by doing it but like 2N3055 wrote it is a large project when you want it to be up to all your demands, which seem to be high going on not being satisfied with what is available on the market.

On the other hand, sticking modules together and throwing some open source software in it, will not be much of a learning experience in my eyes. Writing your own FPGA code for the acquisition bit and the software to process the samples will, but it involves a lot of knowledge.

That said, I'm having difficulties finding the ADCs, primarily because I don't know exactly where to search, and apart from the main specs (e.g. resolution in bits, etc..), I don't know what to look for... Here is where I need advice.

This also depends on what you need. If 1 GSa/s and 8 bit is enough then there are more then enough ADC's out there, but getting a module to stick it to a zynq board becomes much harder.

A four channel ADC board for in the PC with high speed will be expensive too.

I dabble with this kind of things for fun, but on much lower frequencies. Made new software for the FNIRSI-1013D, which was fun and a good learning experience, but it took time.

Offline 2N3055

  • Super Contributor
  • ***
  • Posts: 7113
  • Country: hr
Re: Building my own scope
« Reply #7 on: October 20, 2022, 12:13:38 pm »
Only do this if you want to learn. Prices for parts scope manufacturers get are very different from prices you will get for same parts at low quantity. FPGA + 2 ADC might cost you more than twice your budget for scope... Not to mention that it is not a beginners quest. There are dozens of open scope projects on net, and dozens topics here on the forum. Some attempted by pro FPGA designers and whatnot. None of them went to working product. Making a scope is a large, very hard project.

I was thinking.. Let's not consider a FPGA-based project for now. It could be very, very interesting from a learning point of view, but I think it's too hard given my current level of competence. So, let's talk about ADCs on a regular desktop PC.

Consider Digilent Waveforms, a fine piece of software. It does all the things I need, essentially.
It works OOB with any soundcard. A soundcard is essentially a low frequency ADC.
It's not unreasonable to assume it'll work with a PCIe ADC.
The problem is that I'm having a hard time finding pci-express ADCs.

Maybe you can point me towards some manufacturers?

The only one I was able to find is this: https://dev.alazartech.com/en/

Prices are nowhere to be found though.

You're not listening. As I said, first go and do a search on previous art. What you think, you are the first one that had this idea?
Humanity has been building scopes for 80 something years, and digital scopes for 30 something.

If it were easy and cheaper than buying ready made device, we all would have home made scopes.

Of course you need FPGA. It's hosting triggering, data transfers from ADCs, memory transfers etc. It guarantees scope will sample at regular intervals and will have enough data BW to do so. ADC is only a dummy device doing conversions. Scope is in a FPGA...
And then there is a matter of scope front end before ADC.
Scope is much different than sound card..

Read on the subject first.
And soon enough you will start to realize that even cheapest scopes are marvel of engineering and very sophisticated devices..
 
The following users thanked this post: egonotto, pcprogrammer

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2085
  • Country: sk
Re: Building my own scope
« Reply #8 on: October 20, 2022, 12:19:10 pm »

I'm motivated by two reasons, essentially:

1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

2. I think I'll learn a lot of things by building my own scope.

That said, I'm having difficulties finding the ADCs, primarily because I don't know exactly where to search, and apart from the main specs (e.g. resolution in bits, etc..), I don't know what to look for... Here is where I need advice.

you will not build a better scope with the same money... it doesn't work that way.. people tend to underestimate the effort and overestimate their capabilities  ;) i have a few "long running" projects myself.

if your motivation is to learn, then go ahead full steam ! but expect much higher cost than buying the scope and what's more important, expect a giant investment of your time. 
and just a small piece of advice ... always quadruple your time estimate to get closer to reality  ;D

 
The following users thanked this post: egonotto, pcprogrammer, balnazzar

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 17054
  • Country: 00
Re: Building my own scope
« Reply #9 on: October 20, 2022, 12:35:32 pm »
1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

What don't you like?

Building something better is going to cost much more than $1000 of your time.

(unless you're in prison or something...)
 
The following users thanked this post: balnazzar

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4243
  • Country: nl
Re: Building my own scope
« Reply #10 on: October 20, 2022, 01:17:39 pm »
Here are some threads on this forum

https://www.eevblog.com/forum/testgear/a-high-performance-open-source-oscilloscope-development-log-future-ideas/
https://www.eevblog.com/forum/chat/500-mhz-8b-2gss-oscilloscope/

The first one shows what it takes and it was never finished due to not having the time to work on it anymore.

This kind of development takes a lot of time and money for something better than store bought.

As a learning project I would suggest cheaper modules that do at max 100MSa/s and a simple FPGA connected to a simple MCU.

I started a project to make both a scope and a function generator. Due to shifting interests I left it as is, after finishing the FPGA part for the function generator. Might continue with it someday. https://github.com/pecostm32/Lichee_Nano

Online ledtester

  • Super Contributor
  • ***
  • Posts: 3216
  • Country: us
Re: Building my own scope
« Reply #11 on: October 20, 2022, 01:49:16 pm »
Saw this listing on ebay:

https://www.ebay.com/itm/114051630870

Probably doesn't have the specs you want but still could be interesting because there seems to be rather extensive documentation about how it works here:

https://earthpeopletechnology.com/digital_storage_oscilloscope_dso_100m
 
The following users thanked this post: adam4521, balnazzar

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #12 on: October 20, 2022, 05:42:35 pm »
You might want to start with something that already works and go from there. Maybe the AD2 is suitable. An alternative is to use your existing oscilloscope as an acquisition device and do data processing on a PC.

You mean for building the custom scope?
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #13 on: October 20, 2022, 05:53:52 pm »
Yours was quite an informative reply, thanks.


For that kind of money there are acceptable scopes to be bought, but it depends on your demands on it if you can like it.


Uh, I wrote extensively about that in other threads, for example the one baout bode plotting on a MSO5K. Essentially, I'm bothered by acoustical noise (1104x-e) and front end noise (MSO5000). USB scopes starting with 100 MHz and 1 GSa/s are expensive (the pico is near 1500 eur).

On the other hand, sticking modules together and throwing some open source software in it, will not be much of a learning experience in my eyes. Writing your own FPGA code for the acquisition bit and the software to process the samples will, but it involves a lot of knowledge.


That's the problem. I don't even know where to start. I don't have any experience with the FPGAs, and the discussions here are generally between people who already have a lot of expertise about them.


This also depends on what you need. If 1 GSa/s and 8 bit is enough then there are more then enough ADC's out there, but getting a module to stick it to a zynq board becomes much harder.


Mh, can you give me some links to shops where I can buy the ADCs? TBH, I was hoping to get something a bit better than 8 bit.
Also, what do you mean by saying that it will be hard to stick them to the FPGA board? Aren't there some standards for connection? Pardon my ignorance!


A four channel ADC board for in the PC with high speed will be expensive too.


I see. But expensive like how much? Consider that in going along that way I'll spare the money for the FPGA board...


I dabble with this kind of things for fun

Maybe you can point me towards some learning resources. It's true that there are plenty of threads about such stuff here, but they are a bit over my current level of competence...

Thanks!
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #14 on: October 20, 2022, 05:59:30 pm »

Of course you need FPGA. It's hosting triggering, data transfers from ADCs, memory transfers etc. It guarantees scope will sample at regular intervals and will have enough data BW to do so. ADC is only a dummy device doing conversions. Scope is in a FPGA...
And then there is a matter of scope front end before ADC.
Scope is much different than sound card..

Read on the subject first.
And soon enough you will start to realize that even cheapest scopes are marvel of engineering and very sophisticated devices..

As a matter of fact, I'd like to build one precisely because they are fascinating pieces of engineering.

Anyway.. It's a bit difficult to find the information I need. I'm delving into the forum, but like I said to the other user above, the discussions are a bit over my current level of knowledge.

You said that the heavy lifting is done by the FPGA. Ok, I have two questions then:

1. If I stick a PCIe frontend/ADC card into a desktop computer, can the computer do what the FPGA does in commercial scopes?

2. Do USB scopes have a FPGA board inside??

Thanks.
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #15 on: October 20, 2022, 06:04:14 pm »
1. I'm dissatisfied by commercial scopes within my financial reach (say 1 grand).

What don't you like?

Building something better is going to cost much more than $1000 of your time.

(unless you're in prison or something...)

No I'm not in prison, but building the scope would be a wonderful way to waste my time  ;D

Anyway, about what I don't like, see that long thread of us about bode plotting on the MSO5K..

By having used the AD2 and various bench scopes, I decided I definitely like the usb scopes much more. It's one of those I want to build. A whole lot of hassle removed (screen, knobs, etc...).
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #16 on: October 20, 2022, 06:05:59 pm »
Here are some threads on this forum

https://www.eevblog.com/forum/testgear/a-high-performance-open-source-oscilloscope-development-log-future-ideas/
https://www.eevblog.com/forum/chat/500-mhz-8b-2gss-oscilloscope/

The first one shows what it takes and it was never finished due to not having the time to work on it anymore.

This kind of development takes a lot of time and money for something better than store bought.

As a learning project I would suggest cheaper modules that do at max 100MSa/s and a simple FPGA connected to a simple MCU.

I started a project to make both a scope and a function generator. Due to shifting interests I left it as is, after finishing the FPGA part for the function generator. Might continue with it someday. https://github.com/pecostm32/Lichee_Nano

Thanks! I'll start from there!  :)
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: Building my own scope
« Reply #17 on: October 20, 2022, 06:07:23 pm »
Don't forget the analog front-end. You'll want a 1 MOhm in parallel with 10-25 pF or so input impedance to work with standard 10x probes, and some amplification and/or attenuation to extend the range beyond the native range of the ADC. Especially since you value low noise, which presumably means you want to look at low-level signals.

You also may want some input protection so you don't blow up your expensive ADCs.

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #18 on: October 20, 2022, 06:09:39 pm »

you will not build a better scope with the same money... it doesn't work that way.. people tend to underestimate the effort and overestimate their capabilities  ;) i have a few "long running" projects myself.

if your motivation is to learn, then go ahead full steam ! but expect much higher cost than buying the scope and what's more important, expect a giant investment of your time. 
and just a small piece of advice ... always quadruple your time estimate to get closer to reality  ;D

The idea started from just wanting to have a scope without the issues which bother me. But then I indeed thought that it would be interesting and fun per se. Even if it'll take years. Or a decade. I mean, I can think of worse ways to employ one's time.
Have you talked about your projects here? If yes, could you point me towards the relevant threads? Thanks!
 

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #19 on: October 20, 2022, 06:11:56 pm »
Don't forget the analog front-end. You'll want a 1 MOhm in parallel with 10-25 pF or so input impedance to work with standard 10x probes, and some amplification and/or attenuation to extend the range beyond the native range of the ADC. Especially since you value low noise, which presumably means you want to look at low-level signals.

You also may want some input protection so you don't blow up your expensive ADCs.

Well said. In the end, low noise amounts to a well-thought front end. I don't have the faintest about how to learn concocting good front ends..
 

Online Bud

  • Super Contributor
  • ***
  • Posts: 7062
  • Country: ca
Re: Building my own scope
« Reply #20 on: October 20, 2022, 06:22:20 pm »
TI application note on a high speed front end

https://www.ti.com/tool/TIDA-00826
Facebook-free life and Rigol-free shack.
 
The following users thanked this post: egonotto, balnazzar

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 20350
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: Building my own scope
« Reply #21 on: October 20, 2022, 06:50:15 pm »
There is a fine line between tackling a project that stretches you and one which can't be completed within reasonable time and effort. Engineers ought to be able to distinguish[1]. N.B. it is not for me to define "stretches you", "completed", "reasonable time", "reasonable effort". That's your decision :)

However, there is also nothing wrong with trying something, finding where the pain points are, finding workarounds - and knowing what you would do better next time. Indeed, in some circumstances that can be positively beneficial, e.g. during job interviews being able to demonstrate that you are interested in the subject and in continuously improving your knowledge and judgement. Back in the 70s I built a 6800 computer (similar to an Altair 8080) from scratch. In many ways it was appalling, but I learned a hell of a lot and could discuss things with other people.

I would suggest that learning when and how to use (or to avoid using) FPGAs is a useful skill, just as learning how to programme microcontrollers is useful. I would also suggest that if you are starting from scratch, then the magnitude of learning FPGAs is similar to that of learning MCUs.

Have fun! :)


[1] Eric Laithwaite at Imperial College used to set exams where one question was easy and sufficient get you a pass mark, one was more challenging and couuld get you a good degree, and one could not be answered adequately in the time available. He expected his undergraduate engineers to be able to determine which questions to avoid. If they couldn't, they wouldn't make good engineers anyway.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: 2N3055

Offline balnazzarTopic starter

  • Frequent Contributor
  • **
  • Posts: 417
  • Country: it
Re: Building my own scope
« Reply #22 on: October 20, 2022, 07:04:33 pm »
There is a fine line between tackling a project that stretches you and one which can't be completed within reasonable time and effort. Engineers ought to be able to distinguish[1]. N.B. it is not for me to define "stretches you", "completed", "reasonable time", "reasonable effort". That's your decision :)

However, there is also nothing wrong with trying something, finding where the pain points are, finding workarounds - and knowing what you would do better next time. Indeed, in some circumstances that can be positively beneficial, e.g. during job interviews being able to demonstrate that you are interested in the subject and in continuously improving your knowledge and judgement. Back in the 70s I built a 6800 computer (similar to an Altair 8080) from scratch. In many ways it was appalling, but I learned a hell of a lot and could discuss things with other people.

I would suggest that learning when and how to use (or to avoid using) FPGAs is a useful skill, just as learning how to programme microcontrollers is useful. I would also suggest that if you are starting from scratch, then the magnitude of learning FPGAs is similar to that of learning MCUs.

Have fun! :)

[1] Eric Laithwaite at Imperial College used to set exams where one question was easy and sufficient get you a pass mark, one was more challenging and couuld get you a good degree, and one could not be answered adequately in the time available. He expected his undergraduate engineers to be able to determine which questions to avoid. If they couldn't, they wouldn't make good engineers anyway.

I have to say I'm studying physics, not engineering. We are somewhat supposed to venture even in stuff that cannot be explored in any reasonable stretch of time  ::)

But yours are good advices nonetheless!

One step forward would be establishing if it's absolutely necessary to use a FPGA.
I'm sure it'd be interesting to learn FPGAs per se, but nevertheless I need to know if one can make a functional scope with just a computer, a front end, and an ADC.
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 29189
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Building my own scope
« Reply #23 on: October 20, 2022, 07:20:30 pm »
Where did balnazzar go ?
I think he fell in here:

Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 
The following users thanked this post: pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4243
  • Country: nl
Re: Building my own scope
« Reply #24 on: October 20, 2022, 07:44:54 pm »
A scope without a FPGA is certainly possible, but would not have a high sampling rate. Take a look at these little scopes made with a STM32103 MCU. Just 1MSa/s, but good as a basis to learn about how a scope works.

Schematics of the Wave2 of jyetech can be found here.
https://jyetech.com/wp-content/uploads/105-15800-00M.pdf

For higher sample rates without a FPGA you would need a more powerful processor and an external ADC. Don't have examples on this.

With a FPGA there are many options like for example a zynq board you mentioned but high speed ADC modules need fancy FPGA boards with FMC connectors. It would then be easier to buy for example a Hantek DSO2C10 and make your own FPGA design and software for that. The schematics are reverse engineered by me and can be found here: https://github.com/pecostm32/Hantek_DSO2000/tree/main/Schematics

For a system with less bandwidth and easier to build with modules I already pointed you to my Lichee Nano repository. I refer to a 2 channel 65MSa/s 12 bit ADC module there. For a scope it would need more work on a front end, which is not in my skill set, but for a starting point it is good enough.

As a learning tool the FNIRSI-1013D is also fun. It has all the hardware needed to make a scope, and there is plenty of info about it in my repositories and the thread here on the forum. I'm currently trying to reverse engineer the FPGA design of it. Also as a learning project :)

https://www.eevblog.com/forum/testgear/fnirsi-1013d-100mhz-tablet-oscilloscope/
https://github.com/pecostm32/FNIRSI-1013D-1014D-Hack

A PCIe card that is not even very fast but 16bits can be found here:
https://buy.advantech.eu/Boards-Cards/Data-Acquisition-I-O-Data-Acquisition-I-O-Cards-PCI-Express-Cards/model-PCIE-1840-AE.htm?country=France&token=638018915275564395&f=AUS

It is very expensive.

Hope this helps you make up your mind. Have fun with what ever you choose.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf