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

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

I am using a MPX53DP
(ADS1115 and levelshifter)

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:

But the debug says nothing to me...

image

image

image

pi 4
image

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

What does:

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?

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

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

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

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

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!!

Partly! Since i already have that enabled!

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!!

2 Likes

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

image

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

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

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

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

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

2 Likes

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

image

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

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.

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

You don't need the level shifter!

1 Like

There are level shifters available that are i2c safe.

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:

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

Easy way to let the pi read analog data?