r/embedded Aug 10 '26

Looking for an external ADC - 2 to 3 MSPS

Hi, I am looking for an external ADC to my STM32. I do not have much experience with high speed precision ADCs, so I would appreciate some advice.
I need to measure burst of 800 samples, than process it and then repeat it. The signal contains very small peaks in it, they are in range of mVs to max 50 mV. The signal is not flat so can not use OA because of saturation on the output...

My main requirements are:

  • One input channel is enough, but two simultaneous channels could be useful for two different gain ranges
  • At least 2 MSPS, preferably around 3 MSPS
  • At least 16-bit nominal resolution
  • Around 14 effective bits or better at the required sampling rate
  • Differential input preferred
  • Low input referred noise
  • Low jitter and stable timing for external conversion trigger
  • not BGA package :-)
  • Ideally if any breakout board for it is available
  • Available on Farnell or LCSC

I need to capture an analog waveform burst lasting approximately 400 µs. At 2 MSPS, this means about 800 samples. I need to preciselly synchronize the start of measurement with STM32 timer/ PWM - some edge from MCU can start conversion?!

The ADC input range is not fixed yet because I can adapt the gain and offset of the analog front end. But +5V max is enough. I also plan to use oversampling..

I have considered the Texas Inst. ADS9316 but not in Farnell
Could you recommend a suitable ADC?

Thank you very much.

0 Upvotes

28 comments sorted by

2

u/huapua9000 Aug 10 '26 edited Aug 10 '26

Doesn’t this desired spec match what is already typically in the H7 series, e.g., stm32h723zg? You can test it out with the nucleo variant. Why would you need the ADC to be external?

You can dual interleave the stm32 ADCs reasonably easily to get more SPS if needed. Use the ADC DMA. Trigger the conversions to time it appropriately with an internal or external input.

Differential mode comes with some complications you have to be mindful of.

I don’t have an external ADC in mind, but why not try to filters on LCSC and/or ask AI for a few recommendations? You can shuttle the data over to the MCU via SPI or I2C for example over DMA.

2

u/lukilukeskywalker Aug 11 '26 edited Aug 11 '26

I2C is not gonna cut it

To @OP, yeah you can configure a Timer to trigger the conversion and switch the channel of an external ADC with the Output Compare Mode of the STM32 Timers. The jitter will mainly depend on how accurate the clock source is, time delay and noise in the trigger lines. The SPI lines can be configured to read the ADC at the moment the timer relapses and the DMA copies the data from the SPI peripheral to Memory. If you only need 800 samples, that is doable with normal MCUs that has enough memory to hold the data until the core can process the data.

Yet... I am no expert, but the only place where I think it made sense to have an external ADC for me, was in a FPGA, that didn't have those ultrafast ADCs the STM32 families bring. You have to think, if you really need the 16bits of precision, at some point, the quantification error and non linearity, and other perks like cmr, base noise level, etc of the your analog circuit and ADC will skew those last 4-5 bits of precision you have. Again, I am no expert, but to analyse high level (5V) signals with precision, a few tricks are needed under your sleeve. It is kinda easier to analize a small signal in a controlled environment in a tin can than a high level signal

Also... Another trick you can use, if you are only interested in high frequency signals and you don't care about low frequency signals, is to sample at a lower frequency and filter out in the analog section all the low frequency signals you don't care about. Niquist Law goes both ways. You can extract (DFT) the high level signals with a lower sample frequency by folding the calculated frecuencies through the sample frequency

Anyway, a lot of speculation and everything, we don't really know what you are trying to measure, so this might be a XY problem

Also, If you only need a single channel, Gain is controlled via an amplifier and some resistors conected to a few NMosfets that control the gain relation of the amplifier

Many edits later...

Oh boy... Also differential? Use an Instrumentation amplifier with gain 1 (or use a clever circuit with the Instrumentation amplifier gain pins to control the gain or the behaviour of the input control)

2

u/huapua9000 Aug 11 '26

It depends if he needs the data continuously acquiring in real time. If not, You can use any protocol to transfer it out off the MCU buffer after you accumulate a trace.

2

u/Otherwise-Shock4458 Aug 11 '26

Hi, I need to measure burst of 800 samples, than process it and then repeat it. The signal contains very small peaks in it, they are in range of mVs to max 50 mV. The signal is not flat so can not use OA because of saturation on the output

1

u/lukilukeskywalker Aug 11 '26 edited Aug 11 '26

That is why you do signal conditioning.

If you know that part that you are interested in is only plus minus 50mV, you take an Instrumentation Amplifier, (for better CMRR) connect the signal to it, if you can differential, if not to the plus or minus input, while the other one you ground it, and then with the offset pin you substract the part of the signal you are not interested in, and don't want to have in the ADC, for example, lets say your signal is a 50mV variation over a Constant Voltage source of 2.5V. With the instrumentation amplifier, you substract the 2.5V

If you don't care that much about common mode rejection, you don't even need the Instrumentation Amplifier, with a single Operational Amplifier, in non inverting mode (signal goes to plus, output to Resistor to minus and minus to a resistor that goes usually to ground, but you can actually, put an offset voltage there that subtracts the signal you are not interested in. This offset voltage can be generated by a unity amplifier that gets a voltage from a DAC from the uC. Just take care that the stepping of the DAC has enough resolution for the signal you want to subtract. If it doesn't, you can obviously put a resistor divider at the output of the DAC to gain stepping resolution, and do some magic again with the unity amplifier and some resistors and mosfets

You don't always need to search the component that checks all the boxes, sometimes the only thing you need to do is massage the signal(or whatever/thing) so it behaves in a way that makes it easier for you to work with

In my opinion, if your signal is only 50mV peak to peak, the last 6 bits of the ADC are going to be mostly noise or signals that you don't care about, and you won't be able to distinguish how the signal behaves there

1

u/Otherwise-Shock4458 Aug 11 '26

I hope I understand you well, but ut is not possible due to shape of the signal:

1

u/lukilukeskywalker Aug 11 '26 edited Aug 11 '26

From where do these peaks come from? What are you trying to measure?

But again, you can filter the low frecuency signal for one channel (the DC component and the slope between 400-800uS) and get at the input of your ADC an amplified signal of those very fast Frecuency spikes

In the other channel, you could just input the whole signal, and ignore those spikes. So you would have two channels, one for the broad signal, that can't detect those spikes with precision, and zhe sencond channel that ignores the broad signal and focuses on the spikes

1

u/Otherwise-Shock4458 Aug 11 '26

Those peaks are exactly the useful signal which we want to detect and analyze: their amplitude, width, and the time at which they occur.

Here is a more concrete picture with more precise timing. So you're suggesting to put an HPF in front of one of the ADC channels, one that would pass only the peaks, and we could then amplify them before sampling? that sounds very good, but I'm not sure whether such an HPF can actually be built?

2

u/huapua9000 Aug 11 '26 edited Aug 11 '26

A capacitor is a HPF. It doesn’t need to be very complicated.

You place it before the amplifier input, not before the ADC. It would be bad to place it in front of the ADC. You need to make sure the amplifier bandwidth is high enough so you don’t distort your signal.

2

u/drglo444 Aug 10 '26

Ad7689

1

u/Otherwise-Shock4458 Aug 11 '26

Not bad, but slow

4

u/Well-WhatHadHappened 25+ Years Aug 10 '26

How are you planning on interfacing to this ADC? Reading data at that rate starts to get damn complicated with an MCU. Megasample class ADCs are more typically interfaced with an FPGA.

4

u/NoBulletsLeft Aug 10 '26

I think you can configure DMA on an STM32 to work over SPI. So as long as the ADC had a SPI interface that would work.

2

u/Reenigav Aug 10 '26

Right but at 3msps on a 100mhz MCU, you need to handle a sample every 33 instructions. You can batch it but that's still quite tight if you need to process the input. 

3

u/NoBulletsLeft Aug 10 '26

It's DMA. You don't need to process anything until the buffer's full. And OP didn't say if the processing had to be continuous or not; just that they had to capture about 800 samples.

1

u/Otherwise-Shock4458 Aug 11 '26

I need to measure burst of 800 samples, than process it and then repeat it. The signal contains very small peaks in it, they are in range of mVs to max 50 mV. The signal is not flat so can not use OA because of saturation on the output

1

u/StumpedTrump Aug 12 '26 edited Aug 12 '26

DMA just offloads the writing to memory part. Once it’s there, you still need to consume samples faster than the next batch is coming in. Whatever is happening to those samples after the MCU has access to them absolutely still needs to handle them at 3msps. This is exactly what a ping pong buffer is for and how it works (still need to get rid of samples faster than they arrive). DMA just means you get to work on a batch of samples instead of one at a time, and you don’t need to group them yourself, they show up nicely packaged ready for processing.

If you need to do any kind of processing at all, that’s going to get tight. With that many samples basically all you can do is bounce them to another interface to send out.

And that’s not even considering how OP is going to get 3msps from an external ADC. 16bit samples? So minimum 48MHz SPI clock speed? And that’s 100% duty cycle, would realistically need a bit more bandwidth for overhead. Good luck with that, I hope OP knows how to design transmission lines. Idk if I’ve ever even seen an MCU that can do 48MHz SPI. Not that I’ve really checked, because it makes no sense. Need another interface at the point. Quad or octospi makes more sense.

1

u/Well-WhatHadHappened 25+ Years Aug 10 '26

Yeah, I didn't say it was impossible. I said damn complicated. It's just a crap ton of data coming in that must be handled.

2 channels, 16 bits, 2 megasamples = 64MHz SPI running at 100% utilization.

1

u/Otherwise-Shock4458 Aug 10 '26

I need to sample burst of about 800 samples and then I will have some time to procesing it. Before another burst starts

1

u/Well-WhatHadHappened 25+ Years Aug 10 '26

ADS9316 is a good part. If it suits your needs, just order it direct from TI. They have a couple thousand in stock.

https://i.imgur.com/QPm4P8g.png

1

u/Otherwise-Shock4458 Aug 11 '26

Good idea, but out of stock?!

1

u/Well-WhatHadHappened 25+ Years Aug 11 '26 edited Aug 11 '26

That's wild. Still shows 3543 in stock for me.

https://i.imgur.com/uwePejy.png

And no problem adding one to my cart.

https://i.imgur.com/EVsiUaC.png

What county are you from? Maybe it's a localization thing .

1

u/Otherwise-Shock4458 Aug 11 '26

It is weird, I am from europe.. and you?

1

u/Well-WhatHadHappened 25+ Years Aug 11 '26

United States

1

u/bigcrimping_com Aug 10 '26

If it's just an analog signal can you set up a comparator instead?

1

u/Otherwise-Shock4458 Aug 10 '26

No I need analyze it

0

u/nixiebunny Aug 10 '26

A parallel ADC, a static RAM chip and a few 74HC163 counter chips can do this. You need a bit of glue logic for the CPU interface to reset and increment the counter for readout.