User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 1:49 pm

At our local Model Town we have a project that is using a number of Pi Zeros to control the measurement of various values associated with control of the water in the model river. This system has been operational (albeit with a subset of the final number of monitoring sites) for around 12 months now and has worked extremely well. All of the Pis are communicating via Ethernet and at one location, (the Master Pi), the Pi Zero acts as a time source using a RASClock to set the time and date, all of the other Pis update their system clocks using rdate.

We are now preparing to upgrade the system using an improved type of Level Probe. The currently installed ones each use 10 GPIO inputs to determine the level and the new ones use an Adafruit ADS1115 A/D Board to measure a voltage that represents the level. This has been working fine here in my workshop, but I've now hit a snag trying to use the RASClock and the ADS1115 at the same time on the Master Pi.

The problem is that if I connect the RASClock and not the ADS1115, the RASClock works fine. I can also get the ADS1115 to work if I don't connect the RASClock.

To get them both to work together, I have soldered a couple of Header Pins to the SDA and SCL pads on the RASClock, to which I've connected the corresponding pins of the ADS1115, but I simply get an error when I try to run my code to read the voltage. The error is:

Code: Select all

No I2C device at address 48

The hwclock works.

I believe that it should be possible to use the two devices together from reading the comments on the Afterthought Software website. However, will my method work?

I have a couple of theories:
  1. My RASClock is damaged. This is entirely possible, because I've had it for several years and when I found it (after a long search) it had fallen out of its ESSD bag and was sculling around at the bottom of my drawer. :x
  2. I cannot read continuity between pin 3 on the header connector and the SCL pad and likewise between pin 2 on the header and the SDA pad. (I wouldn't necessarily expect this, since it may not have been intended that this device be used in this way or the signals are buffered in the chip.)
  3. I need to mount the RASClock on it's own set of sixer header pins, on a piece of Veroboard somewhere, and connect the two devices to these pins.
  4. There is a special configuration needed to allow me to do this.
Any thoughts on this?
Last edited by TerryC65 on Tue Jan 29, 2019 10:26 am, edited 1 time in total.

User avatar
DougieLawson
Posts: 39169
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 2:08 pm

As long as they both have unique I²C addresses then a three wire (SDA, SCL & GND) daisy chain from RPi to ADS, ADS to RTC should just work.

I'm daisy chaining I²C devices all the time.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 3:17 pm

DougieLawson wrote:
Sun Jan 27, 2019 2:08 pm
As long as they both have unique I²C addresses then a three wire (SDA, SCL & GND) daisy chain from RPi to ADS, ADS to RTC should just work.
Assuming that the RAS Clock does do a pass-through of SDA and SCL, then that is what I'm doing.
However, I'm not sure what you mean by 'daisy chain'. If I have two devices, I can connect them thus if the RAS Clock does pass-through:

RPI: SDA ---------------------------------------------------- RASClock: SDA ---------------------------------------- ADS1115: SDA
RPI: SCL ---------------------------------------------------- RASClock: SCL ---------------------------------------- ADS1115: SCL

That to me is a 'daisy chain'.

If the RASClock doesn't do pass-through, I can only connect them thus:

RPI: SDA ---------------------------------------------------- RASClock: SDA
I_______________________________ ADS1115: SDA

RPI: SCL ---------------------------------------------------- RASClock: SCL
I_______________________________ ADS1115: SCL

Which is connecting them in parallel to me.

User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 3:56 pm

TerryC65 wrote:
Sun Jan 27, 2019 3:17 pm
However, I'm not sure what you mean by 'daisy chain'.
Answering myself, I've just found this among many similar pictures:
I2C.png
I2C.png (28.16 KiB) Viewed 1139 times
How critical are the two 1.5 k resistors? Are the lack of them likely to be the cause of my problem?

User avatar
DougieLawson
Posts: 39169
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 7:58 pm

There's resistors on the Raspberry already on GPIO02 & GPIO03.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Sun Jan 27, 2019 8:38 pm

Thanks.

JohnsUPS
Posts: 172
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Tue Jan 29, 2019 3:27 am

Did you verify that the RASclock and the ADS1115 are at different I2C addresses?

User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Tue Jan 29, 2019 6:49 am

JohnsUPS wrote:
Tue Jan 29, 2019 3:27 am
Did you verify that the RASclock and the ADS1115 are at different I2C addresses?
Yes. I did that before I even tried the method.

User avatar
TerryC65
Posts: 178
Joined: Sat May 09, 2015 7:50 am
Location: Wimborne, Dorset, UK

Re: Using RASClock and an Adafruit ADS1115 Simultaneously

Tue Jan 29, 2019 10:23 am

For closure on this, I have now confirmed that the original RASClock that I was using was damaged (not sure how, but general abuse in the bottom of my bits drawer comes to mind). The good news is that it still works as a clock, so I can use it on one of our other projects which uses this device.

So for anyone else wishing to use a RASClock in conjunction with another I2C device; it can be done simply by soldering two header pins to SDA and SCL on the underside of the RASClock PCB so they are pointing upwards when the RASClock is installed on the Pi.

Thanks everyone for your help and suggestions.

Return to “Interfacing (DSI, CSI, I2C, etc.)”