Very small noise when measuring small current with ADS1115

Hi,

Yes, but that's uV.
What do you get if you short out the resistor, so the analog input is at gnd?

Tom... :smiley: :+1: :coffee: :australia:

@TomGeorge

I checked, and it's indeed ยตV. The image I posted earlier showed noise even with the "rough" gain mode, so it may not be thermal noise.

Do you mean a circuit like the one below?

Hi,
Like this;
connection1
A0 to the 1115 gnd.

Tom... :smiley: :+1: :coffee: :australia:

Can you print a set of RAW readings from the ADC, rather than a pic of the graph please?
I'm interested to see the actual jitter in readings and do some stats on it to see if the fluctuation is cyclical.

so the orange line is showing "noise" at about 50uV?
.. and can you take successive readings at timed intervals so we have an idea of frequency?

@TomGeorge
@johnerrington

I bought the one made by Adafruit. Here are the results of using it.

Here are the results I got.
The vertical axis is mV and the horizontal axis is the number of measurements.

There is noise. There seems to be a problem with the ADC reading, wiring, or power supply.

That's right. It has a noise of roughly +-50ยตV.

In order to do this, I also need to add a column for the measurement time to the RAW data, right?
Is it useful to record time using millis()? A sample file is attached below.

record csv

With the library I'm using, the SPS of ADS1115 does not seem to be unadjustable.
In another library, for example, ADS1115_WE, various settings can be made.

Let me share one more thing.

When I used this library to modify SPS, a strange thing happened.
If you refer to the designer's website or the sample code, you will see that you can set the SPS by changing the following function,

/* Set the conversion rate in SPS (samples per second)
   * Options should be self-explaining: 
   * 
   *  ADS1115_8_SPS 
   *  ADS1115_16_SPS  
   *  ADS1115_32_SPS 
   *  ADS1115_64_SPS  
   *  ADS1115_128_SPS (default)
   *  ADS1115_250_SPS 
   *  ADS1115_475_SPS 
   *  ADS1115_860_SPS 
   */
  //adc.setConvRate(ADS1115_128_SPS); //uncomment if you want to change the default

I followed this and ran the test with the SPS settings changed to 860, 128, and 8.
The raw data of time and voltage up to 5000msec recorded by mills() is attached.

record_ads1115_me

Looking at this, it seems that the lower the SPS, the less noise there is.

By the way, the same thing does not happen when I reduce the number of trials by interposing delay() in the code and library I used before.

It may depend on the developer's settings or the source code, but I thought that the SPS may be related to the accuracy of the ADC. Does this give us a clue?

For reference, here is the datasheet for ADS1115. In addition, the code used in this project is attached.

#include<ADS1115_WE.h> 
#include<Wire.h>
#define I2C_ADDRESS 0x48


ADS1115_WE adc = ADS1115_WE(I2C_ADDRESS);

void setup() {
  Wire.begin();
  Serial.begin(9600);
  if(!adc.init()){
    Serial.println("ADS1115 not connected!");
  }

  /* Set the voltage range of the ADC to adjust the gain
   * Please note that you must not apply more than VDD + 0.3V to the input pins!
   * 
   * ADS1115_RANGE_6144  ->  +/- 6144 mV
   * ADS1115_RANGE_4096  ->  +/- 4096 mV
   * ADS1115_RANGE_2048  ->  +/- 2048 mV (default)
   * ADS1115_RANGE_1024  ->  +/- 1024 mV
   * ADS1115_RANGE_0512  ->  +/- 512 mV
   * ADS1115_RANGE_0256  ->  +/- 256 mV
   */
  adc.setVoltageRange_mV(ADS1115_RANGE_0256); //comment line/change parameter to change range


  /* Set the inputs to be compared
   *  
   *  ADS1115_COMP_0_1    ->  compares 0 with 1 (default)
   *  ADS1115_COMP_0_3    ->  compares 0 with 3
   *  ADS1115_COMP_1_3    ->  compares 1 with 3
   *  ADS1115_COMP_2_3    ->  compares 2 with 3
   *  ADS1115_COMP_0_GND  ->  compares 0 with GND
   *  ADS1115_COMP_1_GND  ->  compares 1 with GND
   *  ADS1115_COMP_2_GND  ->  compares 2 with GND
   *  ADS1115_COMP_3_GND  ->  compares 3 with GND
   */
  adc.setCompareChannels(ADS1115_COMP_0_GND); //comment line/change parameter to change channel


  /* Set the conversion rate in SPS (samples per second)
   * Options should be self-explaining: 
   * 
   *  ADS1115_8_SPS 
   *  ADS1115_16_SPS  
   *  ADS1115_32_SPS 
   *  ADS1115_64_SPS  
   *  ADS1115_128_SPS (default)
   *  ADS1115_250_SPS 
   *  ADS1115_475_SPS 
   *  ADS1115_860_SPS 
   */
  adc.setConvRate(ADS1115_8_SPS); //uncomment if you want to change the default

  /* Set continuous or single shot mode:
   * 
   *  ADS1115_CONTINUOUS  ->  continuous mode
   *  ADS1115_SINGLE     ->  single shot mode (default)
   */
  adc.setMeasureMode(ADS1115_CONTINUOUS); //comment line/change parameter to change mode

}


void loop() {
  float voltage = 0.0;

  Serial.print(";");
  Serial.print(millis());
  Serial.print(";");
  voltage = readChannel(ADS1115_COMP_0_GND);
  Serial.println(voltage*1000,5);

}

float readChannel(ADS1115_MUX channel) {
  float voltage = 0.0;
  adc.setCompareChannels(channel);
  voltage = adc.getResult_V(); // alternative: getResult_mV for Millivolt
  return voltage;
}

Can you change

voltage = adc.getResult_V();

to
voltage = adc.getRawResult();

to get the actual numbers please?

I'll share the data below.
Change to "voltage = adc.getRawResult();", and the number of measurements I get has been reduced (the number of rows in the data file), I don't know why...

result_we_raw

Here are the raw readings when using the ADS 1X15 library.

result_1x15_raw

This corresponds to the results I sent you earlier;

In your circuit for this test A0 ahould be connected to the ADC ground at the chip, as in @TomGeorge reply #24

Can you edit your code so as to collect the sample readings into an array and print them out when all the readings have been taken?
Then we can eliminate the serial print as the source of the noise.

That is because the S_D coonversion process acts as a filter - as shown in the dasta sheet.

Thanks for the reply!

To eliminate circuit-derived noise, right? I got it.

I'm sorry, but I don't know how to add elements to an array with Arduino programming language. For example, is it ok to assign the measurement results to different variables and then put them into an array at the end?

I'm not familiar with the S_D conversion process, so if you could tell me more about it, that would be great.
Looking at chapter 8 of the datasheet, it seems like the lower SPS has better performance, is this correct?

A few seconds with google found this: