Results of Testing ADS1115 Data Rate

Hi there

It's been a while since i last posted as i finished my dissertation so wasn't using arduinos much and have recently bought a raspberry pi and am annoying that forum. However i could do with some help regarding the results of a little experiment i ran.

As the title suggests i have been testing an ADS1115 ADC to see how fast i can get results back to the serial monitor (is data rate the right phrase? sample speed?). I was looking at implementing this on the raspberry pi, but used an arduino as the interface is a bit easier with the libraries etc. So to test this i set up a an experiment. I set up the ADC to an UNO and a DUE, played with the ADS1115 sample speed and the baud rate. I did 4 tests as follows;

Connections:

VCC - VCC
GND - GND
SCL - SCL
SDA - SDA

Settings:

Tested one ADC input (will do more another day)
Tested in continuous mode, did not use ALERT/RDY pin
Tested at two ADC sample rates - 128 & 860 SPS
Tested at two baud rates - 9600 & 115200 baud
Tested two boards - Uno and Due

Test 1:
Board - UNO
BAUD - 9600
SPS - 128

Test 1:
Board - UNO
BAUD - 9600
SPS - 860

Test 1:
Board - UNO
BAUD - 115200
SPS - 860

Test 1:
Board - DUE
BAUD - 115200
SPS - 860

The results for the rate the data appeared on the serial monitors is as follows;

Test 1 - 48.52 Hz
Test 2 - 48.52 Hz
Test 3 - 468.94 Hz
Test 4 - 555.89 Hz

So my questions are as follows. I expected the sample rate to increase with increasing SPS, is this not the case as it only changes how many samples the ADC takes, not how fast it delivers them?

If i use the ALERT/RDY pin, could i detect a new conversion and read it faster?

The biggest effect seems to be increasing the baud rate, which is around 10x larger in tests 3 &4, and the sample rate is around 10x larger aswell. Is this what you guys would expect?

The DUE has a processor that is over 5x faster than the UNO, but the sample rate is only ~ 20% faster. Is this down to the program needing time to run? Or other factors?

Any input is welcome, and i have attached the code I used and the results in Excel.

Many Thanks

Ross

ADS1115_Arduino_w_Registers.ino (2.16 KB)

Hi,
At 115200 baud, each character sent takes approx 100uS. At 860 SPS conversion speed is 1000/860mS = approx 1.16mS. So if you send more than 11 characters over serial then you will slow the apparent sample rate. Try counting the sample rate over a one second period, with no serial and you should see 860. I use this ADC at its maximum rate using the alert pin and interrupts. Hope his helps.