Page 1 of 1

ADS1115 I2c Read trouble

Posted: Tue Aug 19, 2025 6:18 am
by seokgi
Hello.

I have a question.
I'm reading nine analog values using three ADS1115s.
The ADS1115 inputs are connected correctly and the voltage output is accurate.
I'm reading them using I2C, but the values aren't being written to the correct variables.
I've tried reading them using both the voltage and raw options.
The values are read into different variables. The values are read from different variables, but they're correct.
Is there a way to fix this?

I'm reading the values via SPI, as shown in the attached project.
It's too complicated. I tried modifying it as you suggested.
This also doesn't read the values correctly.
The current method reads the values correctly.

Is there an easier way to handle this?

Thank you.

Re: ADS1115 I2c Read trouble

Posted: Tue Aug 19, 2025 2:21 pm
by chipfryer27
Hi

This may or may not relate to you.

Today I had need to use external ADCs and having some ADS1115 modules to hand thought to use them. I only need three channels so I thought it would be a good use.

Connected up using the FC component and tested.

The ADS1115 module has four inputs labelled A0 - A3 and the FC component has four inputs labelled An0 - An3. All good so far.....

When tesing I discovered that instead of:-

ADS / FC
A0 - An0
A1 - An1
A2 - An2
A3 - An3

On all my boards I have the following relationship

ADS / FC
A0 - An3
A1 - An0
A2 - An1
A3 - An2

I don't know if this is somehing astray within FC, or more likely the cheapo boards I have are silkscreened incorrectly. It caused a bit of a headache until I discovered....

Once connected up and I knew pin order, I found the module to be very accurate. Power at 3.3v I was out by a couple of mV against a scope/meter. Close enough for me :)

Regards

Re: ADS1115 I2c Read trouble

Posted: Tue Aug 19, 2025 4:06 pm
by chipfryer27
Hi

Further to above if the input signal goes slightly negative, when using the FC command SampleSglVolts, FC returns 8.xx volts which suggests 2's compliment in use in reading, but a possible bug in converting?

Regads