Building an ESP8266 with multiple pressure sensors (using ADS1115 and ESPHome)

Well done you have i2c set up and it is scanning for a device. It can not find a device.

Since you have not supplied any other information we are guessing but:

  1. You are using GPIO pins which are conflicted on the ESP
  2. You have specified the incorrect pins when setting up i2c
  1. The i2c wires could be switched around
  2. The wiring is broken
  3. The ADS1115 is broken OR
  4. The ADS1115 does not have correct power set up

I would get my multimeter out and quietly work through all the items. It is one of them! I can’t think of anything else.

Good luck again!

Not being a power user I did strike a similar issue.
With the esp8266 nodemcu you need to define the pins you are using to be acceptable to the i2c.
I can’t tell you how as I quickly moved on from 8266 devices to the more powerful and widely accepted esp32 devices.
Most of my deicsion to go this way was guided by the guy with swiss accent. check him out - bit of an esp guru

Since there is very little information for setting up this specific sensors, and I haven’t found any that includes both wiring and yaml setup, I used this solution here for wiring. Since the original user confirmed that it works for him, I have no particular reason to doubt it either, but if someone has experience, you can review it. Useing a pressure sensor in combination with ESP D1 mini /ads1115/level converter

my yaml which should be adapted to this wiring is here but obviously, something must be wrong

esp8266:
  board: d1_mini
i2c:
  sda: D2
  scl: D1
  scan: true
ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A0_GND'
    gain: 4.096
    name: "pressure"
    id: IP
    internal: false
    unit_of_measurement: 'bar'
    accuracy_decimals: 1
    icon: "mdi:volts"
    update_interval: 2s
    filters:
      - median:
          window_size: 5
          send_every: 5
          send_first_at: 5
      - calibrate_linear:
          - 0.51 -> 0
          - 3.38775 -> 3.7
      - lambda: |-
          if (x <= 0){      
            return 0;
          } else {
            return x;}

Hello @catdogmaus I have ADS1115 set up with 8286 and all working fine. I would suggest check with multimeter you have correct supply to ADS1115 Vin. And switch around D1 and D2 wires after you have confirmed you have correct power. I have used different pins because I was short on pin space. Let me know how your error hunting goes.

@billyjack000 I’m looking to build a pressure sensor for my fermenter as well. Would you be willing to share you schematic and config?

The level shifters are digital (on or off). So they won’t work with a device that puts out an analog voltage based on pressure. A simple resistor network will step down the voltage without loss of resolution…

I was able to resolve it in this fall. It was a power issue. Just in case I wrote detailed instructions for anybody who might have same problems here:

Why do you use offset: -0.16895? I would think 0.169x3.3 is roughly the 0.5V the pressure sensor is supposed to give at 0 PSI ?

I found the following pressure sensor, which gives an i2c output apparently. I confirmed it with the seller. Is it preferable over the (admirable) process described on this otherwise very useful thread?

https://www.aliexpress.com/item/1005005514909464.html

1 Like

Nice find!

So I tried to find a cheaper one and found this model which is quite cheaper (around 18€ vs 30€) and supporting multiple protocols including I2C : https://s.click.aliexpress.com/e/_oBhNvet

  • Output signal: 0.5-4.5V / 0-5V / 1-5V / I2C / 0.4-2.4V,Offers multiple output signals including 0.5-4.5V, 0-5V, 1-5V, I2C, and 0.4-2.4V for versatile applications.
  • Measuring range: 0-300bar gauge pressure, High-precision measuring range of 0-300bar gauge pressure for accurate pressure readings.

Description reads:

  • Output signal : Default 0.5-4.5V, other(0-5V, 1-5V, 0.4-2.4V, I2C)

I wonder if there is a user defined parameter or if it’s factory defined.

I can’t find the reference “XDB301” from the XIDIBEI site. The winner should be the XDB303 Aluminum Pressure Transducers, many pressure ranges, input voltages and output signals available for around $19-20.

Looks like I’ll order one to try out

Update 2025-01-31 : I got feedback from seller and purchased the XDB401 which is around 28€. However there are a couple coupons available currently (expire 2025-02-08 08:59 GMT+1) :

  • 25LD30 for 30$ out of 239$
  • 25LD20 for 20 / 159
  • 25LD08 for 8 / 69
  • 25LD03 for 3 / 29 : This is the one I used as I ordered a single sensor a few other unrelated items

So are you going to use I2C rather than analog?

I would prefer I2C but didn’t think they were supported

Yes that’s the plan, using I2C makes it way easier to use multiple sensors.
However I haven’t yet had the time to play around with it (mostly as I need to do the piping work to adapt the sensor).