Products > Test Equipment
Building my own scope
tggzzz:
--- Quote from: balnazzar on October 20, 2022, 07:04:33 pm ---
--- Quote from: tggzzz 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.
--- End quote ---
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 ::)
--- End quote ---
"The art of research [is] the art of making difficult problems soluble by devising means of getting at them."
https://www.azquotes.com/quote/777283
"No scientist is admired for failing in the attempt to solve problems that lie beyond his competence. ... Good scientists study the most important problems they think they can solve. It is, after all, their professional business to solve problems, not merely to grapple with them."
https://www.azquotes.com/quote/905059
--- Quote ---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.
--- End quote ---
You need to capture samples at a regular defined rate without missing samples. Ideally you also do a little real-time processing to identify when to start/stop capturing them, i.e. a trigger.
Whether or not you need an FPGA depends on the sample rate and sample depth, and the degree to which you can/cannot rely on a computer to keep up. The latter depends on what other things the computer is doing and the guarantees about the computer instruction timing. I know of only one computer that guarantees instruction timing: the XMOS xCORE family. With all others you have to guess and test and hope that you have spotted the worst case. The guesswork and testing can be minimised by careful use of peripherals and by having the computer sitting around doing "nothing important". That is sufficient for many purposes.
Where a computer cannot guarantee to keep up with the input samples all the time, you have two choices: reduce the sample rate until it can keep up, or have buffers to match the peak/mean processing rates to the fixed input rate.
An FPGA has two things a computer (xCORE excepted) cannot have: guaranteed timing/latency and many independent operations occurring in parallel. The penalty is that the conceptual design and implementation technologies are completely different.
balnazzar:
--- Quote from: tautech on October 20, 2022, 07:20:30 pm ---Where did balnazzar go ?
I think he fell in here:
--- End quote ---
It's the story of my life. I always end up down in there.
balnazzar:
--- Quote from: tggzzz on October 20, 2022, 07:55:22 pm ---
You need to capture samples at a regular defined rate without missing samples. Ideally you also do a little real-time processing to identify when to start/stop capturing them, i.e. a trigger.
Whether or not you need an FPGA depends on the sample rate and sample depth, and the degree to which you can/cannot rely on a computer to keep up. The latter depends on what other things the computer is doing and the guarantees about the computer instruction timing. I know of only one computer that guarantees instruction timing: the XMOS xCORE family. With all others you have to guess and test and hope that you have spotted the worst case. The guesswork and testing can be minimised by careful use of peripherals and by having the computer sitting around doing "nothing important". That is sufficient for many purposes.
Where a computer cannot guarantee to keep up with the input samples all the time, you have two choices: reduce the sample rate until it can keep up, or have buffers to match the peak/mean processing rates to the fixed input rate.
An FPGA has two things a computer (xCORE excepted) cannot have: guaranteed timing/latency and many independent operations occurring in parallel. The penalty is that the conceptual design and implementation technologies are completely different.
--- End quote ---
Good information. Mhhh, so I guess the answer is "yes, USB scopes do have a FPGA inside them".
Suppose we allocate a PC to do only oscilloscope related things. There will still be plenty of OS processes competing for CPU cycles. I wonder if something like this: https://en.wikipedia.org/wiki/RTLinux could be helpful in attaining a decent sampling rate (e.g. 1 GSa/s with sufficient depth) without missing important signal's details....
rob77:
--- Quote from: balnazzar on October 20, 2022, 07:04:33 pm ---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.
--- End quote ---
it's absolutely crucial to use an FPGA. without FPGA your options are pretty limited.
if you really want to go down the rabbit hole then Cyclone IV + FT602Q usb3 superspeed fifo will get you to the 100+ Msamples/s relatively cheap if you want to run the software on a computer. it's a fifo for 400Mbytes/s - that can yield 400Ms/s at 8bit. but definitely need an FPGA to run the ADC and feed the fifo, there is no microcontroller capable of such IO speeds.
developing a usb connected "scope" would be the preferred way because it's much easier to write a software for a full fledged linux OS than it's for a small embeded system.
and a hint for "cheap" first experiments... there is a product which exactly has the Cyclone IV + FT602Q combo inside.. it even has a unpopulated jtag header for connecting USB blaster and it costs 120 Euro :) Orico HVC-1080 video capture device - solder a 10pin IDC header for JTAG and you can immediately start playing with the FPGA + USB fifo and start writing software for data capture. later on you can desolder the video procesor chip from the device and use the freed up I/O pins on FPGA to interface the ADC and start capturing real data...then you can go even deeper into the rabbit hole and dive into the analog magic for the frontend...
if you bailout at any point, you still can solder the image processor back, flash the original bitstream back to the cyclone and you have very low losses because you still have your hdmi capture card back ;)
tautech:
--- Quote from: balnazzar on October 20, 2022, 08:05:27 pm ---
--- Quote from: tautech on October 20, 2022, 07:20:30 pm ---Where did balnazzar go ?
I think he fell in here:
pic removeed.
--- End quote ---
It's the story of my life. I always end up down in there.
--- End quote ---
The task you plan to undertake will consume you entirely.
To have a glimpse of what's in front of you study this thread by tom66 that pcprorammer linked earlier:
https://www.eevblog.com/forum/testgear/a-high-performance-open-source-oscilloscope-development-log-future-ideas/
Tom got a fair way through with HW but then the fun begins to get anything like replicating or bettering the feature set in a $500 DSO.
Good luck.....maybe you haven't realized how complex the little SDS1104X-E you have actually is ?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version