2023-11-24 09:59 AM - edited 2023-11-24 10:00 AM
Both F407 and H743 ADC input add DC-bias to AC connected inputs, very handy, but I would like to have the specifications for this feature, perhaps even a circuit diagram explaining how the MCU averages the AC input above ground as needed.
I have read the Intro to ADCs AN4861 and the datasheets but must have overlooked the relevant information.
Solved! Go to Solution.
2023-11-25 10:56 AM - edited 2023-11-25 11:05 AM
No, you are the one totally misunderstanding what I wrote and making a bunch of assumptions.
Lets stop wasting each other time on this matter, I think the situation is clear.
As the application note AN2834 for ST ADC's states, the devices have limitations, not all of which can be solved End.
2023-11-25 02:06 PM
I was wrong in assuming that you are not trying to find an inappropriate magic bullet. ;) Anyway, adding an external capacitor increases the allowed driver impedance at the expense of adding an additional charge time, which, of course, decreases the achievable sample rate. Those are not device limitations, but a generic rules of physics. The only thing specific to STM32 is the ADC input capacitance of 4 pF. Even taking the whole sampling period of 2,6 us and calculating the impedance for 12-bit resolution requires no more than 72 kR impedance. That is a number, which is a hard limit and there is no way around it. And even that impedance is far from the one provided by the leakage currents, but the actual sampling time and required impedance will be even smaller.
On the bright side there are plenty of small, cheap, single supply, low voltage, rail-to-rail op-amps out there.
P.S. I do agree about ST's broken bloatware and general negligence towards the software. Probably I'm the hardest and loudest critic for it. But all of it is just a consequence of the prolonged western leftist socialist politics...
2023-11-26 02:56 AM - edited 2023-11-26 02:58 AM
Putting the personal ego away for a moment, you haven't troubled to read the details of our application.
What capacitance do you suggest we add to maximise the design for dual-ADC channel 384 KHz radio signal sampling on an MCU that is controlling two LCDs, serial communications, USB and FFT signal processing? I look forward to being impressed by your design acumen!
PS We already have 47pF on the ADC inputs to ground.
2023-11-26 09:02 AM
Other peripherals and how you are processing the captured signals are irrelevant for this.
It's you, who "suggested" adding an additional capacitor, not me. Your text about the "time gap" is a quote from AN2834 section 4.4.3 part "Workaround for extra high impedance sources". That section talks about a workaround to increase the impedance requirement by adding an additional large capacitor. That text is about that particular workaround, not ADC in general. The fact that now you are wondering what additional capacitor I am talking about, shows that you haven't actually read or understood that particular section of the AN2834. And then it turns out you already have some capacitor... But we don't know the purpose of it. Is it a part of a low-pass anti-aliasing filter? Is it there to increase the allowable impedance?
2023-11-26 01:38 PM
What a pity, and there I was thinking you'd surprise me with an enlightened reply!
The other peripherals and processing tasks are relevant because they eliminate some of the ADC processing options.
I was hoping someone might have experience in >200KHz dual ADC small signal capture as I'd like to increase the resolution, which currently doesn't look possible due to local noise. And yes, we have the usual VADC circuitry, ferrite beads, inductors, ground planes, etc.
2023-11-26 03:29 PM
What ADC options other peripherals and processing tasks eliminate? Do they eat too much of the CPU processing power or is it something else?
Are you implementing software oversampling to increase the resolution? Some STM32 series can do it in a hardware. And some series have a 14/16-bit ADCs plus the oversampling feature.
Maybe the noise is actually a distortion because of an inadequate input driver circuit with a too high impedance?
You are avoiding the question of the driver impedance, an explanation of the 47 pF capacitor's purpose and the input circuit in general. If you actually want some helpful advice, you have to explain what you have, what is the goal and what is the issue stopping you. There is no fundamental difference in capturing 1 kHz or 384 kHz. The rules are the same, one just has to know and understand them.
2023-11-26 11:08 PM
Haha, there is a vast difference between 1KHz capture and 385 KHz, i.e. DMA has to be used at the faster rate else the CPU cannot complete other tasks like FFT in time, extra noise generation at the higher rate, etc. The 47pF is to suppress high frequencies and transients.
16-bit sampling is used, oversampling will not really yield any benefits.
Lets leave it there, unless you have something concrete to add.
2023-11-27 06:56 PM
The necessity of a DMA at such rates is so obvious that I did not even bother mentioning it. It's not some special case, but just a normal thing to do. Only beginners can think of it as some advanced achievement. The same is true for double buffering, asynchronous processing and other common principles.
So the 47 pF capacitor is a part of an anti-aliasing filter - that's how it is called. And, of course, for the best performance, the filtered signal must not contain any frequency above the Nyquist frequency. If that is not the case, then the aliased frequencies will end up in a captured data as a... noise! Couple this analog bandwidth requirement with the impedance requirement and it becomes clear that for a high performance capturing a decent input driver is a necessity.
You still haven't explained your input driver circuit and what exactly stops you from implementing this. It's you, who is asking for a solution, but cannot even explain the problem.
2023-11-28 02:27 AM
Sit back and meditate, I think your ego is inventing it's own story here!
Nowhere did I say "advanced case" etc., I simply said that at higher rates polling could not be used, etc.
I've been designing electronics and software since well before you were born, so why you always assume you know more seems to indicate insecurity.
Frequencies above the Nyquist limit, by the way, show has repeated energy levels in the FFT bin, not as noise".
Now kid, I have work to do, so no more banter please!