Is it possible to rise up the sampling frequency of the ADS1115 to 1 or 10kHz ?

Hello everyone,

I would like to know if it is possible to get a higher sampling frequency with my ADS1115 (ADC 16 bits).
I’m reading the 3V3 on the ESP8266 card and I’m doing a for loop over N=10000 samplings to look how many time it takes to fill an array. This is what I get:

t(µs) t (s) fe (Hz)
N=10000 89797293 89.8 111.4

T1 (µs) 49526 (start)
T2 (µs) 89846819 (end)

So currently I have about 111Hz but I need to get at least 1kHz or the best would be 10kHz.
I tried the function Wire.setClock() but it didn’t work (maybe I used it the wrong way…).

Wiring for the ADS1115: VDD → 3V3
GND → GND
SCL → D0
SDA → D1
ADDR → GND

If you have any advices or any help for my problem, please comment.

Thank you in advance for your answer.

Certia

ADS1115_Mesure_Fe_V3.ino (603 Bytes)

1 Like

call Wire.setClock after ads.begin(). (ads.begin calls Wire.begin and it sets the default frequency. ) setClock(400000) should work.

From the datasheet:

Programmable Data Rate: 8 SPS to 860 SPS

So it seems your hardware doesn't support 1kHz or even higher frequencies. The change Juraj suggested just increases the speed of the communication between the Arduino and the ADC chip.

Hi,

Thanks for your replies. I tried the function Wire.setClock() and it increased the frequency from 111Hz to 120Hz above 400kHz. So it is working but not enough.

What should I do to have at least the 860 sps, please?

Certia

try to read it without the library. see the datasheet for the registers. I use ADC121C021 in my project

The library waits 8ms for the conversion to finish. That’s because the configuration is set to 128 samples per second.

You will have to change the library:

On line 154 replace ADS1015_REG_CONFIG_DR_1600SPS by ADS1015_REG_CONFIG_DR_3300SPS.
On line 104 replace ADS1115_CONVERSIONDELAY by 1.

So you might get up to 860 Hz.

Thanks both of you,

I tried to do without the library but it was too difficult for me so I tried one more time to do the settings pylon said and found out that the files did not saved my changes so I replace the files with the correct settings and I finally got 770Hz!!

So thanks a lot guys!!

Certia