by beachy · 1y ago · 0 comments
On the current project we started with an MCP3208 via SPI. It did the job but only has 8 channels and it's slow (100K samples per sec).
To get something faster we switched to ADS7953. It has 16 channels and runs 10 times faster. It's somewhat more complex to code, and you can only get the highest sample rate if you scan the inputs in a predictable order. But it sure flies.
To me, these chips feel like cars. The ADS7953 is somewhat of a ferrari, whereas the MCP3208 feels like a Toyota, simple to use, unimpressive performance.
I'd love to know the industry background about how these varieties of ADC chips came to be and carved their own space in the world, and how widely they are used (millions? billions?).
I recall reading about a project at CERN to design a 12bit ADC chip that could sample at tens of GHz, maybe 50 or more.
I was perplexed at how they could achieve this.
Turned out it was the same we programmers do. Parallel processing.
They had taken a 12bit SAR unit which ran at like MHz rates, and just cloned it many times. They then had a large analog multiplexer in front to route the signal to the active ADC unit in a round-robin fashion.
That takes a lot of chip real-estate, and the analog muxer had to be carefully designed.
For a simpler approach to speed there is Flash ADCs[1], which kinda brute-force it.
For precision I know multi-slope ADCs[2] are often used.
Sadly I don't know much about the history, and would also love to learn more about it. Bound to be some fascinating stories there.
[1]: https://en.wikipedia.org/wiki/Flash_ADC
[2]: https://www.analog.com/media/en/training-seminars/tutorials/...
Unfortunately this isn't the case - the company designing the plastic case and buttons gets the lions share of the money.
What is the challenge in scope design is that you need to protect the ADC and often user's life!
So the scope has 1Mohm || 15pF input impedance. You need to buffer it. So you first have to attenuate the signal by tapping this input impedance e.g. at 1/10, attenuating the signal. Then you selectively boost it back up for the ADC.
Or you selectively tap it at different ratios.
In any case, you have to protect whatever there is after the tap(s) by diodes that inherently bring parasitic capacitance.
Some scopes avoid expensive buffer ICs and go with split DC path (with gain) using opamp and then AC path (with gain) using e.g. JFET and BJT RF amps and combine those later.
The whole path from input to ADC must have flat frequency response in both magnitude and phase on all gain settings. This is non-trivial, especially with split DC/AC paths.
Sure, HMCAD ADC series help immensely nowadays with their builtin gain, but you still have to give them something flat to digitize as they output 8b streams and thus you won't be able to "fix it up digitally".
And then you also have to be able to inject bias to move the signal up/down.
And some scopes now can toggle between this and just 50 ohm impedance.
So, yeah, it's kinda non-trivial to condition signal somewhere between millivolts and mains to get to the ADC safely.
It's sort of like saying CPUs are the were all the hard work for computers is, so they should get all the money (not the motherboards, GPU and especially not software). That's just not how the economics of these things go.
Oscilloscopes also have a significant amount of additional front end conditioning, probe control, channel timing, and analysis software built into them. Most of the math functions on oscilloscopes use custom ASICs that work off the raw bits coming from the 120GHz digitizer which is non-trivial even just to receive. Calling it a plastic case around a digitizer is disingenuous.
What about the AD9226? It only has a single channel but can do up to 65 MSa/s at 12 bits. I bought one as a module for around $12 on AliExpress to experiment with software decoding of analog video. I only run it at 20 MSa/s and only use 8 bits because, funnily enough, the limiting factor is the speed at which I could get the data into my laptop. I connected it to a Raspberry Pi Zero and use the SMI peripheral as described here: https://iosoft.blog/2020/07/16/raspberry-pi-smi/
They need a lot of pins to be toggled. Otherwise they spit out no data.
And a lot of manual stuff means it's super DMA unfriendly. And you need DMA for high-speed stuff.
I'm currently working on a PLC program, replacing the PLC's basic cyclic input sampling (max 2K samples/sec) with a harder-to-use mechanism that lets you access the raw data off its 12-bit ADC at 10K samples/sec, which we consider unusually speedy.
We have another project that measures levels in water tanks. A sample rate of 1 sample per minute is plenty.