Trouble adding an ADS1115


#1

Hi All
I am having trouble adding an ADS1115. When I try to add it using “add new device” the system, the program sits “pending, waiting for data”.
I have double checked my wiring and have also attempted to attach a BMP180 I couldn’t get this to work either. I have turned the I2C off and on in the device settings with no change.
Is there something else I need to do?
Or is there a check I can do on the I2C system?
Everything else works fine
Cheers
Mike


#2

Pending, waiting for data usually means that Cayenne can’t recognize the specified device on the Pi. Have you successfully added any sensors to the Pi yet?

What’s your agent version? Should be 1.0.0.19003.

Here’s some tutorials on ADS1115 / BMP180 , just in case.

https://cayenne.mydevices.com/cayenne/tutorial/ads1115
https://cayenne.mydevices.com/cayenne/tutorial/bmp180

You can see if the Pi detects your I2C sensors with the followoing command in the Pi terminal:
sudo i2cdetect -y 1

If the ADS1115 / BMP180 show on the Pi, then there might be issue with Cayenne detecting them, which we’ll need to investigate. I use ADS1115 and BMP180 a lot over here and had no issues.

Hoping we can figure this out!

-B


#3

Thanks for the help
Version is the correct one
sudo i2cdetect -y 1 gives the reply “command not found” , so that would indicate a problem with the pi ??
I have done a complete reinstall of everything with no success, perhaps I have let the “smoke out” of the I2C circuit ???
Cheers Mike


#4

Sorry yes several DS18B20 and relays, as well as events.
Everything else works very well
Mike


#5

Do the commands below and it will install i2cdetect for you.

sudo apt-get update
sudo apt-get install i2c-tools


#6

Thanks
Got this script
sudo apt-get install i2c-tools
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
libi2c-dev python-smbus
The following NEW packages will be installed:
i2c-tools
0 upgraded, 1 newly installed, 0 to remove and 78 not upgraded.
Need to get 51.3 kB of archives.
After this operation, 227 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian/ jessie/main i2c-tools armhf 3.1.1+svn-2 [51.3 kB]
Fetched 51.3 kB in 1s (41.8 kB/s)
Selecting previously unselected package i2c-tools.
(Reading database … 126925 files and directories currently installed.)
Preparing to unpack …/i2c-tools_3.1.1+svn-2_armhf.deb …
Unpacking i2c-tools (3.1.1+svn-2) …
Processing triggers for man-db (2.7.0.2-5) …
Setting up i2c-tools (3.1.1+svn-2) …
/run/udev or .udevdb or .udev presence implies active udev. Aborting MAKEDEV invocation.

Does that look right ??
Cheers Mike


#7

Yeah, that looks right. You should be able to use the command “sudo i2cdetect -y 1” now


#8

Keep us updated. I just added the ADS 1015 with no trouble. I’ll see if I have a 1115 laying around here somewhere.

-B


#9

Hi
Thanks for this help ! The BMP180 now works :smile:
the 1115 didn’t want to play ball, I’ll try to get a few minutes today to do some more testing
mike


#10

Hi Again
Ok I have got the 1115 up and running, I have the Adafruit model with adjustable gain.
So… My next question is is there a simple way to write to the register the way i need to config my sensor?
I want to read the exhaust gas temperature on my boiler, it has a voltage output of aprox. 1.8 to 3 volts, so i need to configure the 1115 to take continuous readings of between 1.8 - 3 volts, this represents 8 to 165 degrees C and so would like to scale the output to match (approximately) the tue temp. This voltage is to be measured between AIN0 and AIN1. From the 1115 data sheet I understand I need to write to the config. pointer and conversion registers. All help appreciated
Cheers Mike


#11

It would probably be better to just go with a MAX6675 or MAX31855 and a T type thermocouple. There are plenty of libraries for these already made.


#12

Well,
I guess I can be added to the list of folks having troubles with the ADS1115. I get the ‘Pending…’ screen forever. i2cdetect is showing the proper installed address, there is no other hardware attached to the RPi. I have tried several reboots, update/upgrade. I’ll wipe the SD and try a fresh install when I get home from work.

-Ian

pi@fish:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --


#13

I burned a new SD for the Pi3 with current Jessie and once I got Cayenne loaded the ADS1115 loaded without problem. I hooked up a TMP36 on AØ and a photoresistor on A1. Thats when things went a little flaky.

A quick look and things seem ok-

And then the numbers get a little weird-

And a look at the extension page doesn’t seem to indicate anything is going on even though some of the time the sensors appear to indicate accurately -

I’m getting ready to jumper in the ADS1015 onto the same RPi to see how it behaves, the 1015 seemed very stable in my previous experience.

Ian


#14

@Ian @ats1080s @mwintm1 We’re going to look into the ADS1115. Multiple people have reported issues so we’ll add one on our side and try to reproduce the ‘weirdness’ and get a fix out. We use the ADS1015 often so pretty sure that works consistently. Keep you guys updated!

-B


#15

@bestes, the problem is most likely in the conversion delay.

For instance, the time for a conversion on the ADS1015 is only 0.3ms while the ADS1115 takes 1.2ms.

Considering the response time to update Cayenne, I suggest maintaining a delay of 2ms or more for both would be just fine, with some averaging even.

Does the driver implement continuous conversion or single shot?

Cheers,

Craig


#16

@eptak See @kreggly 's post above, question for you :slight_smile:

-B