💾 Archived View for dioskouroi.xyz › thread › 24917550 captured on 2020-10-31 at 00:52:46. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

ADS1115: Analog-to-Digital Converter for Arduino

Author: Gedxx

Score: 15

Comments: 5

Date: 2020-10-28 11:30:52

Web Link

________________________________________________________________________________

jws wrote at 2020-10-29 23:35:43:

Just something that needs to be said from time to time…

If you are interested in accurate analog to digital converters (which you are, since you went to get a 16 converter instead of the 10 bit ones already included), and there is _any_ possibility that your signal will be changing faster or really anywhere near your sample rate (which is at most 860 samples/second here, remember to include all that nasty digital switching noise polluting your pristine analog signal) then you _really_ want to put a little RC filter on the way from your pristine analog signal to your A/D converter.

It's only two components, one takes the place of a wire or a crossover on the circuit board if you are working through hole, so it's really only one extra component.

Design of the RC filter is left to the reader and the thousand web pages which will tell you how. Further reading: "aliasing" in the context of signal processing.

Once you've leveled up to preventing aliasing, then you can spend a little bit of time thinking about reducing the impedance of your analog signal circuit, let some current flow so the electrical noise doesn't change the voltage so much. But not too much.

dragontamer wrote at 2020-10-30 00:03:01:

> It's only two components, one takes the place of a wire or a crossover on the circuit board if you are working through hole, so it's really only one extra component.

You describe only an order 1 passive filter, which is only 20db / decade attenuation. To reach 16-bits of accuracy (or 100db attenuation), you'll need 2.5 decades of buffer (1Hz to 500 Hz)

If you are seriously trying to tackle the aliasing problem, you'll need a high-order antialiasing filter, most likely built by opamps and capacitors. Its not an easy calculation or design, but its something that's basically taught to most EE majors. Butterworth Filters, or whatever. Tons of methodologies with tons of tradeoffs depending on what you want exactly. (Linear phase? Or sharpest cutoff? )

elcritch wrote at 2020-10-30 01:04:56:

At that point though most DIY'ers would be better served just buying a faster ADC. Many ADC's nowadays also have built in anti-aliasing filters, and can be quite cheap. Likely the easier and cheaper option with better results for most basic applications.

Still a basic RC filter as the op mentioned can quiet the higher frequency pops from Arduino circuits. Many applications benefit from a 16bit ADC if only to get a clean 14bits out. For those curious about the problem, here's a short write-up on aliasing:

https://e2e.ti.com/blogs_/archives/b/precisionhub/archive/20...

GeorgeTirebiter wrote at 2020-10-30 01:34:22:

Yes. If you're trying to get all the performance you can out of an A/D -- that's tricky business. Far easier to use a faster A/D with a simpler front-end filter. Getting really high-performance A/D subsystems is... not trivial. There is a reason 'standard' Industrial systems are usually 12 bits. The other issue is of course: what's the unwanted noise on the input signal? If that is not controlled, you'll be wasting some of your LSBs to noise anyway. Here is a good reference book:

https://www.analog.com/en/education/education-library/data-c...

Analog Devices has much more, too:

https://www.analog.com/en/products/analog-to-digital-convert...

dragontamer wrote at 2020-10-30 06:36:04:

A 4th order butterworth is just 4 capacitors and 2 opamps (probably a double opamp package).

If your adc was 1msps, your 1st degree capacitor design gives you 2kHz bandwidth to 16 bit accuracy.

Replace it with a 4th order butterworth (4 caps, some resistors, and two opamps) and you now have a 80 db/ decade slope, and your bandwidth is now 50kHz to 16 bits.

That's 25x more bandwidth from the same hardware. If you are going for 8bit accuracy, the numbers would be higher but the 25x difference remains.

---------

Most likely, you will be using the ADC onboard your microcontroller as a hobbyist. Too much effort to wire on another ADC and read up on it's documentation.

But a hobbyist will almost always have capacitors, resistors, and opamps laying around to make a butterworth or whatever you need.