ADS1115 reporting 0.17 on all channels

Before I get started, I just wanted to say great implementation. Really impressed at the ease of installation, the auto detection of some of the services and the interfaces for both Web/IOS. Really, a great job.

Having said that, I’m having a small issue with the Adafruit ADS1115 (ADS1115 16-Bit ADC - 4 Channel with Programmable Gain Amplifier [STEMMA QT / Qwiic] : ID 1085 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits). This issue is with a Pi1-Rev B and this is a working installation that has been installed for some time (~ 2 years).

Before I installed Cayenne I performed the necessary apt-get update/upgrade, rebooted and tested everything was still working, and then installed Cayenne.

I have two load cells connected to two wheatstone bridges connected to channel 0 and channel 1 of the ADS1115.

I went and added the ADS1115 extension and then added two Genric Analog Inputs and mapped them to Channel 0 and 1 of the ADS. The problem I am seeing is that Cayenne only ever reports a non-changing value of 0.17 for all channels (see below).

If I jump into python and using the Adafruit library make a few calls to the ADS, I see the differentiated results on the different pins.

>>> sys.path.insert(0, '/home/pi/library/Adafruit-Raspberry-Pi-Python-Code/Adafruit_ADS1x15')
>>> from Adafruit_ADS1x15 import ADS1x15
>>> pga = 6144
>>> sps = 8
>>> adc = ADS1x15(ic=0x01)
>>> adc.readADCSingleEnded(0, pga, sps)
1064.4375
>>> adc.readADCSingleEnded(1, pga, sps)
1025.0625
>>> exit()

In fact, my original scripts are still executing periodically (15 mins) and still reporting the correct values/weight.

Device details in case it helps:

Any thoughts to what I may need to tweak to get this working?

Appreciate the help.

I don’t have an ADS1115 to test with right now but I think you might have to make a widget on the dashboard for each channel for it to work properly. Give that a try and let me know if it works. If not I can hook one up later and see if it’s working for me.

Hello,

I have a similar situation. Have tied unused analog inputs to ground?
You can try moving one pin to ground and then to the 3.3v supply to test reponsiveness.
I did that and found the pin mappings between Adafruit and Cayenne did not seem to match.
You might also watch your Cayenne readouts for a couple of minutes for fluctuations that have a low frequency. Every bit of data helps.

Yes, as mentioned in my post I added to Generic Analog widgets mapped to the ADS1115. These can be seen in the first image as Sensor “Gas Bottle 0” and “Gas Bottle 1”.

I have not tied the extra pins to ground, but since the ADS is reporting correct through Python (and has been working fine for 2 years) I don’t think grounding is the issue here.

The suggestion that the Cayenne v Adafruit pin mapping not being the same is an interesting one, but since all 4 pins are showing the same unchanging value, I can exclude this too.

Oops sorry I missed that. I’ll give my sensor a try tomorrow evening unless someone else can post back before then.

Hello,

I remembered having something more similar before but couild not recall the solution.
I just went through the same problem again.
If your wiring is old or much handled, the connections could be loosening up. I just went through that. If your wiring is old or much handled, you might try using fresh wiring.

Sorry, just to be 100% clear. The ADS1115 is reporting the correct values through python app that I wrote using the Adafruit ADS library and this app is running on the same device. It is working fine.

The problem is that Cayenne is not reporting the same results. Its reporting an unchanging value of 0.17 on all channels, even though I can get the correct results from my app. So, hardware is fine. Wiring is fine. I’m just trying to understand why Cayenne is not reporting any values other than 0.17.

Hi @mark2

Thanks for explaining and including pictures, it really helps.

Does the widget themselves (The Gas Bottle 0 / Gas Bottle 1) display a value other than .17? I’m trying to determine if it’s just the extension reading that is off, or the widget as well.

-B

For the purpose of corroberation, I’ve posted the same problem elsewhere. That is, the successful functioning of Adafruit software versus the dysfunctional ads1115 software in Cayenne.

I was going to hook up my ADS1115 this evening to do some testing but I can’t find it anywhere…must have lost it in my recent move. I ordered another one that should be here Tuesday, I’ll hook it up then.

I ordered one also. But I’m cheap, so mine won’t be delivered until the end of the week.

Ian

1 Like

I’m going to build a brand new jessie install and add cayenne and NOT install the adafruit library, as I’ve noticed that the adafruit library is throwing the odd weird result now where it has been stable for close to 2 years, and only since cayenne was installed. I’m guessing there is some weird conflict happening. Hopefully with a fresh install this problem will disappear. Will let you know what I find.

Keep us updated!

I’ve also jumped on the ADS1115 bandwagon. Mine just came so I’ll also hook it up and see.

-B

As my PI is in a locked waterproof enclosure I prepared a replacement RPi2 with latest Jessie and Cayenne. Replaced the existing RPi1 and tested ADS1115 and it is reporting perfectly. Added in the latest rev of the Adafruit ADS115 library and my scripts are reporting fine too. So the root cause is unknown. Could have been that my original PI was a PI1. Could of been that the original Pi was based on wheezy and went through lots of upgrades. Could have been a conflict with the older Adafruit library. Could be a combination of all three :wink:

Interesting…Are you using the same ADS1115 module? I’ll mark this as helped.

Yes, same ADS1115. I just swapped out the PI1 with a PI2 (with fresh install Jessie/Cayenne/Adafruit Library)

I just hooked mine up and I had to reboot for Cayenne to detect it even though it was showing up in i2cdetect. That’s the first time I’ve had that happen. @bestes Do sensors need to be connected at boot to be detected, or did I hit a bug?