Git Product home page Git Product logo

Comments (15)

RobTillaart avatar RobTillaart commented on June 18, 2024 1

(updated your code tags)

From the datasheet
image

One should expect up to 10% variation, but not a factor 2.
So what you see when you set the value to 7 is within specification of the datasheet.

However when you set the value to 4 one should expect 128 +- 13 sps.

I cannot explain it right away and will check the code to see if it has an error.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024 1

If you set the datasheet to 0 I expect you will also get ~275 sps.

IN the datasheet there is a section DUTY CYCLING FOR LOW POWER
If I understand it right the internal ADC does not lower the sampling rate but does oversampling at lower speeds.
Check if I can get that confirmed.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024 1

https://www.best-microcontroller-projects.com/ads1115.html

search Low Speed averaging
f you run the ADS1115 at low speed the internal sampling rate is not lowered, since this is how delta sigma converter operates, by oversampling. The internal oscillator is set at 1MHz, and reduced to 250kHz for the ADC clock.

So it might be that you hit upon some behavior which is the combination of CONTINUOUS mode with LOW data rate.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024

Code does not show strange things - just looked quickly - compared mapping of the register with page18 datasheet.
All fields seem to go to the right bits in the config register (table 9)

Can you check the effective data rate when using 3 and 5 ?
(or better the whole range? but lets start with 3 & 5)

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

All right, I tested it again, for the rate value 5 it gives around 244, for the rate 7 it gives 817~830 SPS, which are correct for 10% variation, I will test it for the value 3.

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

All right, I tested it again, for the rate value 5 it gives around 244, for the rate 7 it gives 817~830 SPS, which are correct for 10% variation, I will test it for the value 3.

For the Rate value 3 it returns 280~290 SPS.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024

So data rate 5 is OK and 7 is OK (we may assume that 6 will be in the middle)

4 and 3 both are too high (even higher than 5) and they are almost equal. mmmm....

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

For the data rate 6 it gives 450~475 SPS which is also correct taking into consideration the variation of +- 10%

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

Yes I checked the section too, thank you, when I set the data rate to 0 it returns around 320~340 SPS.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024

What kind of signal are you sampling?
If it is stable voltage it might be that the DeltaSigma converter takes less time...(just thinking out loud)

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

What kind of signal are you sampling? If it is stable voltage it might be that the DeltaSigma converter takes less time...(just thinking out loud)

No it is not a stable voltage, I think I may use the 860SPS and then apply a downsampling method to lower it to the wanted SPS.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024

Just take 4 samples at 860SPS and average them would take 5 milliseconds. and dividing by 4 is fast (shift)

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

I was wrong about the voltage I thought you mean the source voltage, which is normally stable, yes I will use 860SPS.

from ads1x15.

RobTillaart avatar RobTillaart commented on June 18, 2024

@sghirsst
Is this issue still a problem?

from ads1x15.

sghirsst avatar sghirsst commented on June 18, 2024

@RobTillaart , no the problem is solved and everything is working fine, thank you very much.

from ads1x15.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.