Products > Test Equipment
Building my own scope
alm:
--- Quote from: balnazzar on October 20, 2022, 08:14:04 pm ---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....
--- End quote ---
Back in the days of DOS this was feasible using twiddling bits on the parallel port. There were a number of parallel port oscilloscopes back then, with an okay sample rate for that time. The parallel port was a very simple protocol that could easily interface with discrete logic or small micro-controllers. These days IO has gotten a lot faster, but fast IO in PCs is usually serial bulk transfers, like USB, PCI Express or SATA. To connect ADCs to it you'd need something that regularly samples the ADCs, buffers it and sends it in chunks using your desired protocol. If you want high bandwidth, then an FPGA might be a good way to accomplish that ;).
balnazzar:
--- Quote from: tautech on October 20, 2022, 08:16:52 pm ---Good luck.....maybe you haven't realized how complex the little SDS1104X-E you have actually is ?
--- End quote ---
No, indeed. But I'm starting getting an vague idea. There is a video of Eric Quinn being interviewed by Dave. He talks about how insanely difficult was to put together their first scope..
tggzzz:
--- Quote from: balnazzar on October 20, 2022, 08:14:04 pm ---
--- 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".
--- End quote ---
Cheap "toys" won't have an FPGA inside them; a 100kHz (say) scope could be based on an MCU alone.
More complex ones, almost certainly but not necessarily: it depends on what performance you require. I suggest you have a look at the Digilent Analog Discovery and/or the Red Pitaya.
--- Quote ---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....
--- End quote ---
I wouldn't want to use a PC for anything more than the GUI, both because of the lax RT guarantees and because the x86-64 processors have caches and TLBs and lots of other features that increase the mean processing performance without changing the worst case performance. And for hard real time systems the mean performance is irrelevant.
balnazzar:
--- Quote from: alm on October 20, 2022, 08:23:55 pm ---To connect ADCs to it you'd need something that regularly samples the ADCs, buffers it and sends it in chunks using your desired protocol. If you want high bandwidth, then an FPGA might be a good way to accomplish that ;).
--- End quote ---
Mh, I see. I wonder how those Alazartech cards do actually work. Maybe they have a large memory buffer directly on the card, and then they send what they buffered in chunks exactly as you described...
balnazzar:
--- Quote from: tggzzz on October 20, 2022, 08:26:40 pm ---
Cheap "toys" won't have an FPGA inside them; a 100kHz (say) scope could be based on an MCU alone.
More complex ones, almost certainly but not necessarily: it depends on what performance you require. I suggest you have a look at the Digilent Analog Discovery and/or the Red Pitaya.
I wouldn't want to use a PC for anything more than the GUI, both because of the lax RT guarantees and because the x86-64 processors have caches and TLBs and lots of other features that increase the mean processing performance without changing the worst case performance. And for hard real time systems the mean performance is irrelevant.
--- End quote ---
"The Analog Discovery 2 is built on a Spartan 6 FPGA".
Ok, if even a device with 100 MSa/s and shallow memory needs an FPGA, I think the matter is solved.
Thanks. If I venture into it, that will be a very-very-long-term learning project, without expecting to get my actual working scope from it.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version