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
Can Openplotter handle 2 or 3 ADS1115 ?
#1
I need handle 8-10 analog input, it is possible setup 2-3 ADS1115 or only one?

[Image: IMG_20170302_223352.jpg]
Reply
#2
It can be implemented but it isn't so far.
On one I2C bus you can connect up to 4 ads1115. The hardware addresses are 48,49,4A,4B. You have to set the hardware address. You should check that with "i2cdetect -y 1".
A quick and dirty way is to make a copy of the python files with different names for the addresses 49,4A and 4B.

Copy the file ads1115.py to ads1115_49.py
and edit in the new file
line 21 from "class Ads1115():" to "class Ads1115_49():".
line 26 from "self.ADS1115_address = 0x48" to "self.ADS1115_address = 0x49".
line 64 from " ADS1115='ADS1115_' " to " ADS1115='ADS1115_49_' ".

Copy the file analog_ads1115.py to analog_ads1115_49.py
and edit in the new file
line 20 from "from classes.ads1115 import Ads1115" to "from classes.ads1115_49 import Ads1115_49".
line 35 from "ads1115=Ads1115()" to "ads1115=Ads1115_49()".
line 47 from " ADS1115='ADS1115_' " to " ADS1115='ADS1115_49_' ".

In openplotter_analog.conf you have to add the settings [ADS1115_49_0]....
To integrate it into OpenPlotter menu you have to edit openplotter.conf section [TOOLS]
py = py = [['Analog ads1115', 'put analog values to SignalK', 'analog_ads1115.py', '0'], ['Analog ads1115_49', 'put analog values to SignalK', 'analog_ads1115_49.py', '0'], ['Analog Firmata', 'put analog values to SignalK', 'oppymata.py', '0'], ['SignalK Simulator', 'change values with sliders and send values to SignalK', 'SK-simulator.py', '0'], ['Auto Setup', 'configure basic system', 'autosetup_tty.py', '0']]

I haven't test this. But I think it should work.

Tips:
You can also try anykind of Arduino with firmata and you will have many adc inputs with 12 or 16 bits (teensy 3.2 or lc).

Have you thought about isolation?  https://www.elektormagazine.com/labs/uni...ter-150089

A connection example to messure 12V to 3,3V with an mcu can be found on page 3 "Analog1" https://github.com/sarfata/kbox-hardware...x-revC.pdf.
Reply
#3
It works!
But only if all channels are renamed and modified, also 48.
thank you
Reply
#4
after "adding $ to sources in SK deltas" upgrade I modified the file analog_ads1115.py line (3 variants to run 3 ads1115) but that no longer work, if I remove the change work. (?)
Reply
#5
I think is a bug of the last update, the ADS1115 will not work, even with only one using last openplotter files
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)