This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using ADS1115 in differential mode
#5
Thanks for the update, the lines setting the config word configure the ADS1115 into single ended and differential, I am not familiar with the control word written to the ads1115. I have just used the Adafruit lib where this hidden behind the scenes. While it's simple to set the control word to the ads 1115 is single ended or differential, one might want to keep a single Ads1115 class in the ads1115.py file.

The choice to use single  ended or differential could be selected in the config file. and not as I'm doing make an extra file  differential_ads1115.py and an extra box in the GUI. A line in the config file, something like  active =  N where N is 1 for single ended and 2 for differential, or a bit more intuitive by introducing a new line like differential=0 for single ended and 1 for differential.  The the config word could be set as above.  Some check should be performed so that each ads1115 only can be put in the mode once, like
[ADS1115_1]
differential=0
[ADS1115_2]
differential=1
or things like
[ADS1115_4]
differential=1 # impossible as there are only two inputs in differential mode.

For the different addresses your proposal is fine, it's quite easy to follow for users. It just need to be documented as users need to know which address they need to set on the ads1115 when deviating from the default. I'm not sure if jumping over a range by going from 0,1,2,3 to 12,13,14,15 if the user set up two ads1115 at 0x48 and 0x4b.

I have used linear regression and supply an offset (added to the value from ads1115) and an intercept and a offset. The adjust_points  and adjust cover this as is, the only suggestion is that adjust_points might make polynomial or spline function to interpolate (maybe this a overkill ?).
Reply


Messages In This Thread
Using ADS1115 in differential mode - by olewsaa - 2017-04-30, 08:41 PM
RE: Using ADS1115 in differential mode - by olewsaa - 2017-05-10, 09:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)