# Pi, Level shifter, ADS1115, MPX differential sensor wiring questions

**URL:** <https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427>\
**Category:** General\
**Created:** [3 June 2022 15:49 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427 "2022-06-03T15:49:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [3 June 2022 15:49 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/1 "2022-06-03T15:49:45Z")

</div>

I have a question about reading data from a 5V sensor.

I am using a MPX53DP  
(ADS1115 and levelshifter)

> **[MPX 53DP - Pressure sensor, 0 ... 50 kPa, 1.2 mV/kPa](https://www.reichelt.com/nl/en/pressure-sensor-0--50-kpa-1-2-mv-kpa-mpx-53dp-p82335.html?&trstct=pos_0&nbc=1)**
>
> The MPX53 silicon piezoresistive pressure sensor provides a very accurate and linear voltage output directly proportional to the pressure applied.Power supply: 3 - 6 VPressure range: 0 to 50 kPa \[...\]

I got told that this analog signal needs to be digital and lover than 5V so Pi can handle it.

The way I did the wiring is as follows:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/181160d59c3ba69aff506619385bce577a9c65df.jpeg)

But the debug says nothing to me...

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/3/83dceb12c669b4b445630cd3dfcb522b4d33b089.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7990ecf758949735038adb081c497443e2d45b1d.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd5cdfbf9a439596254e3a729a25b1afedbb89bd.png)

pi 4  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/4/9463c45ab113b272363d67789143d9b1f15472d1.png)

Could someone help me with troubleshooting? What did I do wrong?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [3 June 2022 16:18 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/2 "2022-06-03T16:18:02Z")

</div>

What does:

```auto
sudo i2cdetect -y 1

```

report?  
[EDIT] I think your level shifter is the wrong way around, shouldn't the pi be connected to the LV terminals and the ADS1115 connected to the HV terminals?

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [3 June 2022 18:20 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/3 "2022-06-03T18:20:08Z")

</div>

Ah my bad; i wired it that way… drawing is flipped…

The shifter low voltage is connected to pi  
High voltage to ads1115

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [3 June 2022 18:29 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/4 "2022-06-03T18:29:30Z")

</div>

The command should show what device is using i2c if i am not mistaken

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [3 June 2022 18:44 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/5 "2022-06-03T18:44:50Z")

</div>

Hi @WBr yes it is true! this command should show what device is connected in I2C bus on your Pi, and as before step, first you need to enable I2C protocol on your Pi...

[here shows how to enable I2C](https://www.mathworks.com/help/supportpkg/raspberrypiio/ref/enablei2c.html)

i do not know if maybe the "Raspi -config menu interface" will change...  
you can use the **$sudo raspi-config** to access. I hpe this helps you!!

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [3 June 2022 18:45 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/6 "2022-06-03T18:45:36Z")

</div>

Partly! Since i already have that enabled!

---

<div class="post-metadata">

**Author:** ![MecatronicaMADE](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@MecatronicaMADE](https://discourse.nodered.org/u/MecatronicaMADE)\
**Post date:** [3 June 2022 20:10 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/7 "2022-06-03T20:10:58Z")

</div>

Okay, you need put the "ADDR pin" to GND to enable the 0x48 I2C address. try it...

| Conexión ADDR | Dirección |
| --- | --- |
| GND | 0x48 |
| 5V | 0x49 |
| SDA | 0x4A |
| SCL | 0x4B |

I hope it helps you!!

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [4 June 2022 07:23 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/8 "2022-06-04T07:23:16Z")

</div>

Nice adittion, tried it...but didn't work!

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/afd7bb7be00b083e0dbe355994f3f79e1e4a57d8.png)

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [4 June 2022 09:03 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/9 "2022-06-04T09:03:21Z")

</div>

I removed the levelshifter and removed the MPX53

The ADS1115 debug now states values and `sudo i2cdetect -y 1` now shows 0x48 I2C address.

Now the question.... should I even place a levelshifter between the sensor and the pi?

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cf80b2918a73a721401c5e57f78c69615acfcbcf.png)

(The 77 is a device I took just to check if the pin was not damaged)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [4 June 2022 10:17 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/10 "2022-06-04T10:17:03Z")

</div>

According to the datasheet the MPX 53DP should be fine at 3.3V.

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [4 June 2022 10:21 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/11 "2022-06-04T10:21:37Z")

</div>

Strange thing happend:

ADS1115 plugged in: works fine and shows channel 48

BMP280 plugged in: works fine and gives shows 77

Both plugged in and neither work

Nothing connected to the ADS1115

Connect MPX and ADS1115 and channel 48 disappears

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [4 June 2022 10:22 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/12 "2022-06-04T10:22:46Z")

</div>

The ADS1115 should also be OK at 3.3V as the datasheet says 2V to 5.5V

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [4 June 2022 10:35 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/13 "2022-06-04T10:35:20Z")

</div>

Then why on earth all the fuss with a level shifter and the 5V?  
was this a strange recommendation to me?

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [4 June 2022 10:55 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/14 "2022-06-04T10:55:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/0/805242593aa8ae174237972126942c5eff31b018.png)

What is happening to i2C or SDA/SCL when i see this?

---

<div class="post-metadata">

**Author:** ![iiot2k](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@iiot2k](https://discourse.nodered.org/u/iiot2k)\
**Post date:** [4 June 2022 21:01 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/15 "2022-06-04T21:01:52Z")

</div>

Hi,  
i2c works with pullup resistors. All i2c devices are connected parallel. The outputs of devices are open drain. Therefore a pullup resistor are needed for operation. But the level shifter cuts this principle. All modules have this pullups built in. In this case the pullup resistor value is too low when you connects modules parallel.

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [5 June 2022 09:01 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/16 "2022-06-05T09:01:43Z")

</div>

interesting! Thank you for the explenation, what resistor value would you suggest?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [5 June 2022 09:23 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/17 "2022-06-05T09:23:59Z")

</div>

You don't need the level shifter!

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [5 June 2022 09:53 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/18 "2022-06-05T09:53:24Z")

</div>

> [@iiot2k](#):
>
> But the level shifter cuts this principle.

There are level shifters available that are i2c safe.

---

<div class="post-metadata">

**Author:** ![iiot2k](https://avatars.discourse-cdn.com/v4/letter/i/8baadc/32.png) [@iiot2k](https://discourse.nodered.org/u/iiot2k)\
**Post date:** [5 June 2022 11:04 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/19 "2022-06-05T11:04:37Z")

</div>

On the modules the pullup resistors are soldered and connected to scl and sda. Remove (desolder) the resistors on other modules.  
Leave the resistors only on one module.  
You don´t need a level shifter, when you support all modules with 3.3V. The pullup resistor are depends on connected modules and i2c clock frequency. Here are a picture that explain this:

> <https://electronics.stackexchange.com/questions/1849/is-there-a-correct-resistance-value-for-i2c-pull-up-resistors>

 ![fRcgx](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/40a40880c6d1a7f331ba51d7f8dfd499d6fa2acb.png)

---

<div class="post-metadata">

**Author:** ![WBr](https://avatars.discourse-cdn.com/v4/letter/w/b3f665/32.png) [@WBr](https://discourse.nodered.org/u/WBr)\
**Post date:** [5 June 2022 12:52 UTC](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427/20 "2022-06-05T12:52:00Z")

</div>

Is there a way to bypass desoldering and the pullup resistor problem?

Easy way to let the pi read analog data?

[Next page](https://discourse.nodered.org/t/pi-level-shifter-ads1115-mpx-differential-sensor-wiring-questions/63427.md?page=2)
