ADS1115 noise oscillations based on single shot timings

Hey everyone, I'm trying to do single shot sampling with an ADS1115 at roughly 475 samples per sec. The library I'm using automatically polls for results when the conversion is triggered. Problem is it the readings get out of whack when measuring low voltage signals unless I add arbitrary delays.

Changing those delay periods changes the oscillations I get in frequency and amplitude while certain sweet spots give me much less variance in the oscillations and make the device give at least somewhat usable readings with additional averaging. I attached some pics, one of the oscillating readings in the serial stream, one of more stable data, and the code snippet producing the stable data. The readings on the timing settings where I get oscillations are fine until I measure much lower voltages, thing is I've been able to get a more or less perfect signal before without these delays.

The ADS1115 is configured for 475 sps in single shot mode. Tried using continuous mode but no dice there. Lower sample rates still have the same issues. Again I've had this working before where the resulting data had very little variance and a continuous line could be see on the output.

problemcode.PNG

Here's another example. Got rid of one delay, the data is more stable. WTF?

For informed help, please read and follow the instructions in the How to use this forum post.

Most likely there is external interference. What are you trying to measure, and how? Post a circuit diagram.

It sounds like you have noise in the analog section and or power supply. Ground noise will also cause problems. when measuring at the milivolt levels you may also have power line "HUM" in the circuit. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Hey jremington,

I have ruled out everything except the timing in the program as it is what is causing the issues. Thing is I had this working last night without the noise. Check this screenshot out, using an averaging of 2 I get 2 totally different noise levels on the same channel with different LEDs. I can make the Red LED noisier than the IR and vice versa just with slight delay changes.

Attached a schematic too. Everything connects to a common ground but from totally independent wires/planes. I have been able to get readings without any variance before aside from what would show up with pulse (it's a pulse reader)

Timing issues do not create noise, but sampling artifacts can certainly make existing noise difficult to characterize.

OP's incomplete circuit diagram, properly posted. Image posting guide

What is the circuit supposed to do? Why do the various (presumed) ground connections go nowhere?

Hey Jremington. The planes are on the sensor and attach to the common ground point since there's only one on the Huzzah32. This schematic was thrown together pretty quick.

Okay so should I like touch a piece of wood or something to the ground point on the ADC and see if that works to ground out the noise? I still think it's weird that the higher amplitude signal has more noise. If I take the LEDs off and just have them flash openly the readings are actually quite stable at higher amplitudes so I see how power could be it. Still makes me wonder why it can work on some settings at faster rates...

I could uh, send you one of these, I'm working on an open hardware project and my thing works but it is still finicky.

Oh and to fully explain, it's essentially a "deep tissue" pulse oximeter. So it's just a pulse ox with a wider spacing and a sensitive photodiode allowing us to measure deeper penetrating light.

If you are working with a photodiode, then tiny currents and voltages are involved. Stray, time varying light and varying EM fields are a very serious problem (overhead fluorescent lights, power wiring, etc.).

You will need shielded wires for connections to the sensor and ADC, and good, grounded light proof shielding around the sensor as well.

Look up "aliasing" and "sampling theorem" to see how the sample interval affects the appearance of noise signals.

Fluorescent lights flicker at 100 or 120 Hz, that should show up nicely at OPs sample rate. I'd suspect LED lighting, usually driven by switching power supplies that do much higher frequencies.

OP did also mention "sweet spots" of less interference for specific sampling rates, that's indicating they may be seeing aliasing. Those "sweet spots" would be pretty much at a specific fraction of the interference so it cancels out.

Another potential problem is the voltage source of the photodiode and its amplifier, that must also be particularly clean. Taken from the Arduino there may be all kinds of noise on it. Instabilities will also show up as the ADS1115 uses a fixed voltage reference, it's not ratiometric.

Yes, extra care is required to ensure a stable voltage supply at the sensor. An additional RC filter (100 Ohms, > 100 uF) on the sensor board should help a lot.