ADS1115 input pin good practice

Perhaps you are confusing the ADS1115 with the Arduino's on-chip ADC which does require the first reading to be ignored (as explained in the datasheet section 23.5.2, every time the analogReference is set or changed the next reading should be discarded.

Unless the ADS1115 datasheet has a similar restriction you don't need to worry - the datasheet is always the document to refer to for how a particular chip behaves.

@MarkT
I knew I was not crazy! This is certainly where I got the idea.

@johnerrington
I am working on the program to make it available here although I tend to think that my problem is related to the PCB and things like this:

Here is a picture of the whole system. Every aspect of it work except this ADS/Methane thing. I draw a red box around the part involve in this specific measurement.

There is different voltage involve. All connected on a common PCB ground plane. The relay are mosfet. There is solenoid valve and pump (small sized but still inductors).

If it is a sensor problem then I guess I will have to live with it. There is few alternative for this sensor on the market. The numerous test I did in the lab with the sensor and minimal part and program never return this kind of weird readings. It happen while the system was installed over long unattended monitoring.
IMO, there is two aspects that I can work on.
1- The program. Maybe I can use a different approach/configuration with respect to the ADS. Give more time between readings etc.
2- Making sure I took every precaution around the ADS IC and analog pin to decrease noise and increase signal stability. PCB layout or something arund the input pin.

In the ADS1115 datasheet they recomment to add a ground plane separation:
ADS_layout

This is not the case of my system. I can try to implement this but it's hard to figure out what should be on which side of the split. For example, where should be the 3V LDO (from my red box above)?

I wasnt explicitly meaning a faulty sensor, but rather someting interfering with the readings. For example - is your 3V line stable? And decoupled at the ADS?
What is the part number fopr the LDO?
Is the sensor ground connected directly to the analog ground and nowhere else?

From https://www.ti.com/lit/gpn/ads1114
A good design can be ruined with a bad circuit layout.
• Separate analog and digital signals. To start, partition the board into analog and digital sections where the layout permits. Route digital lines away from analog lines. This prevents digital noise from coupling back into analog signals .... etc

Also - are you also seeing these anomalies on the temperature readings? If not that would likely eliminate supply and grounding issues as the source of the problem.

As you have two spare inputs I'd suggest you connect them to the 3V and 0V lines, to check stability.

Looking at your graph you have at least two different kinds of errors, based on an expected value of about 1400; A systematic (repeatable) error at maybe 1800, which COULD indicate a real change in methane concentration; I dont know how you create a fixed methane concentration stable over 2 months for testing.

.. and a "random" error - isolated dots - between 200 & 400.
Its interesting that you have not observed those at any other time, and I'd be wondering why that is. Could your test system have been getting disturbed?

Here is a schematic including the LDO, datasheet and the analog part of the signal. The ADS1115 is always powered using the 3.3v ESP32 powerline (not shown on the schematic). It's also important to mention that the methane sensor is not on the PCB. There is 4 wires (+3v, ground, CH4_mv and temp_mv) going from the sensor to a connector on the PCB (about 10 cm long). This connector is few mm beside the ADS input pin (my attempt to minimize signal travel). I know that floating wires are not good specially for this purpose but there is nothing I can do about this. Sometime physically coupling the PCB and the sensor and sensing system is just not possible. I will shield the wire but for now, to be honest, I took zero precaution about this aspect If I use a shield, I assume I should connect it only to the ground plane and leave it disconnected on the sensor side?

In my last program version, I did include a monitoring of the vRef (1.5v) to have info about the LDO stability. I will include ground. Good point! Unfortunatelly It was not implemented during the longterm monitoring. So I can not tell for this specific data set.

Yes but not systematically timed with the methane problem. See below:
TEmp_CH4
Around data 900, temperature mV move to 4095 and returned to a new and different value (around 1000mV). When converting to temperaure, those data don't make sense nor before or after datapoint 900. edit: "but variation make sense. It correspond to hot day/ cold night variation)". I expect and usually measured about 600 to 700 mV. I did not bother at first because I take the temperature reading from a BMP680 elsewhere on my system. I guess this is a good indication of a analog read issu here?

The data I presented are direct reading in air before I inject methane on the sensor. There is no methane involve except atmospheric concentration which is fairly constant in normal situation. There is no reason for the signal to move since this sensor cannot detected ambient concentration. Furthermore, based on the datasheet, the wheatstone bridge should not move by more than 70-80 mV. If mV in 0% methane is 1400 mV just like I read here. It cannot go much higher than 1480 mV in 100% methane gas. 1800 is not possible unless there is a sensor offset in 0% methane. In this case, it could move between 1800 mv (0%) to 1880 mv (100%).

I agree that data around datapoint 700 can be real. Maybe the sensor surrounding was contaminated even when doing measurement in air (or there is a zero offset due to porr grounding of voltage reference movement?). This system include a pump to flush the gas chamber after every measurement. Maybe I did not allow enough time for the chamber to reset properly? Meanwhile, the system return to 1400mV and remain there after some time.
The system is installed on a floating platform on a very remote lake. There is no one around to disturb the system except weather. Outdoor methane is fairly constant in this situation.

In case I did not mention yet, thank you all for your help and time.

Can someone explained me how a ground plane can accomodate "separation" of analog and digital signal? Does it mean I should have 2 side by side ground plane that only join using traces ending on a common ground pad? Like this?
SPlit_ground

ANYTHING you dont show - such as (above) the ground connection to the ADS - will prevent us making usefully INFORMED suggestions.

That is not what is meant by "floating"

You can not generate a useful Vref from a pot as shown; nor can you monitor it by measureing against Vref.

your "random" error - isolated dots - between 200 & 400 appears on both charts.

YES; the ground line carries currents. You need to ensure those currents have a different path to ground from you analog signals where ideally there should be no significant current flow.

Are you aware that rotting vegetation releases bubbles of methane?

I understand. Sometime it's difficult to find a compromise between showing everything in a super long post that nobody read and simplifying to what we think is relevant for our problem. I will try to present everything. I was thinking that since I have common ground plane with ALL sensor ground connected, it's was not relevant to show it. I draw the split ground as an example.

Yes I am a biologist and study just that: GHG from aquatic system.

ok good to know. I don't use this in my program, calculation or anything else. It is there because I add it in case I change my mind on how I measured the wheatstone bridge. It's connected to nothing except the ADS at the moment. I based this on the Methane sensor datasheet. This is what they suggest (see R1 and R2 in post #14).

thank you

When we talk about digital "ground" vs analog "ground", we are talking about the return current path. You don't want digital return currents in the analog return path.

The higher the frequency, the more the return path follows the path going out.