Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Sample time delay insufficient for normal tolerance #12

Closed
stur0067 opened this issue Nov 18, 2018 · 5 comments
Closed

Sample time delay insufficient for normal tolerance #12

stur0067 opened this issue Nov 18, 2018 · 5 comments

Comments

@stur0067
Copy link

stur0067 commented Nov 18, 2018

The time delay between i2c write and read operations is insufficient to cover the natural part to part variation of ADS1x15 devices. The consequence of this is that some parts return the previous reading whenever queried. This issue only becomes apparent if the gain value changes between two conversions as the value returned will be correct for the previous gain setting.

Currently a delay of (1.0/data_rate + 0.0001) is used. The datasheet for the ADC states that the sample rate varies up to +/-10%. So, to avoid this potential issue the delay should be changed to (1.0/(0.9*data_rate))

@ladyada
Copy link
Member

ladyada commented Nov 18, 2018

hiya - we'll be deprecating this library soon and replacing it fully with the circuitpython version which will be supported (we're waiting on one more breaking interface change before archiving this library for good)
can you check out https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 and see if that does the right thing?

@stur0067
Copy link
Author

stur0067 commented Nov 21, 2018 via email

@ladyada
Copy link
Member

ladyada commented Nov 21, 2018

ooh do you mind either submitting a PR or adding an issue to that repo? that way we will see it next time we do a sweep thru the librayr! it would be appreciated

@stur0067
Copy link
Author

stur0067 commented Nov 21, 2018 via email

@caternuson
Copy link
Contributor

Hi! We are deprecating this library. This issue is either fixed or may need updating for the new library:
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15

Please see issue summary here:
#13

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants