Post by wmartinAnyone have experience using the a2d in an RP2040? I've heard some
negative opinions, would like to check against actual user experience...
in particular with the Pi Pico hardware. I'm using one as a plug-in
subsystem on a simple controller now, but not using the a2d just yet.
Question is: Use it or put an external a2d on the spi bus?
I've been using one as an audio-frequency receiver for a ham-radio TNC
project. Its quality is... well, meh.
The data sheet acknowledges that there are some very significant
nonlinearities in its transfer curve, at several points in the
range. This will add up to significant distortion, or other forms
of illogical behavior.
Something about the Pi Pico (in particular) seems to cause a
significant difference in ADC signal quality, from one board to the
next. I built two TNCs, with Pico modules from the same tape-strip,
identical PCBs, all other components out of the same packages. One
board's packet-reception rate is a few percent better than the
other's, quite consistently. I'm not sure how much of this is due to
differences in the ADC linearity, and how much might be due to
board-to-board variations in the switching-regulator noise (which
looks as if it's quite significant on all of the Pico boards) or
other factors I haven't identified.
I got significantly-better packet-reception quality (again,
a few percent) on a cousin board I built using an STM32F411
module. How much of this might be due to the '411 having
better ADC linearity, and how much might be due to the fact
that the module uses a linear 3.3-volt regulator rather than
a switcher, I do not know.
I think the answer to your question is going to be "it depends"... on
how critical your measurement needs are, how many Bad Things can
happen as a result of measurement error, and on whether averaging and
calibration can work around the device's limitations. I suggest that
you consider the RP2040's ADC to be a convenience, rather than a
quality peripheral (after all, it's part of a $0.70 chip!).
You can probably get cleaner results from a discrete solution (a
separate ADC, with a dedicated low-noise LDO to power it and provide a
reference).