Adafruit MPRLS Sensor

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Post Reply
User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Adafruit MPRLS Sensor

Post by NeerajMishra »

I have an Adafruit MPRLS sensor and it is well connected with
Arduino to get some pressure readings but it says there is a wiring problem
after I upload the code to the Serial monitor.
I am using the Adafruit MPRLS library and mprls_simplest code.
I have followed the following page to arrange the circuit and the library
https://learn.adafruit.com/adafruit-mpr ... duino-test

Code: Select all

  #include <Wire.h>
#include "Adafruit_MPRLS.h"

// You dont *need* a reset and EOC pin for most uses, so we set to -1 and don't connect
#define RESET_PIN  2  // set to any GPIO pin # to hard-reset on begin()
#define EOC_PIN    3  // set to any GPIO pin to read end-of-conversion by pin
Adafruit_MPRLS mpr = Adafruit_MPRLS(RESET_PIN, EOC_PIN);

void setup() {
  Serial.begin(9600);
  Serial.println("MPRLS Simple Test");
  if (! mpr.begin()) {
    Serial.println("Failed to communicate with MPRLS sensor, check wiring?");
    while (1) {
      delay(10);
    }
  }
  Serial.println("Found MPRLS sensor");
}


void loop() {
  float pressure_hPa = mpr.readPressure();
  Serial.print("Pressure (hPa): "); Serial.println(pressure_hPa);
  Serial.print("Pressure (PSI): "); Serial.println(pressure_hPa / 68.947572932);
  delay(1000);
}
My serial monitor says:
11:43:46.546 -> MPRLS Simple Test
11:43:46.583 -> Failed to communicate with MPRLS sensor, check wiring?

User avatar
adafruit_support_carter
 
Posts: 24109
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit MPRLS Sensor

Post by adafruit_support_carter »

Please post a photo of your setup showing how everything is connected.

danger-will-robinson
 
Posts: 35
Joined: Fri Dec 06, 2013 1:21 pm

Re: Adafruit MPRLS Sensor

Post by danger-will-robinson »

You've enabled both the reset and EOC pins which is a modification of the "simple" script supplied by Adafruit. Have you tried it with RESET_PIN and EOC_PIN both set to -1 to see if it works that way?

User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Re: Adafruit MPRLS Sensor

Post by NeerajMishra »

I tried with RESET_PIN and EOC_PIN both set to -1 but it still says " Failed to communicate with MPRLS sensor, check wiring?"

User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Re: Adafruit MPRLS Sensor

Post by NeerajMishra »

adafruit_support_carter wrote:Please post a photo of your setup showing how everything is connected.
I have connected the wire arrangement as shown in https://learn.adafruit.com/adafruit-mpr ... duino-test
I am hereby attaching the picture too.
Attachments
IMG_8851(1).jpg
IMG_8851(1).jpg (954.14 KiB) Viewed 67 times

User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Re: Adafruit MPRLS Sensor

Post by NeerajMishra »

The VIN is connected to 5V; SCL TO SCL, SDA TO SDA, GND TO GND

User avatar
adafruit_support_carter
 
Posts: 24109
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit MPRLS Sensor

Post by adafruit_support_carter »

Connections look nominally OK. Try running this I2C scanner sketch:
https://learn.adafruit.com/scanning-i2c ... es/arduino
to see if the MPRLS address can even be detected.

Also please post another photo showing the soldering on the breakout header pins.
soldering.jpg
soldering.jpg (47.12 KiB) Viewed 65 times

User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Re: Adafruit MPRLS Sensor

Post by NeerajMishra »

I have checked it with a multimeter to see if the soldering is okay and it was fine.
Please, have a look at the soldering
Attachments
IMG_8853(1).jpg
IMG_8853(1).jpg (914.52 KiB) Viewed 65 times

User avatar
NeerajMishra
 
Posts: 6
Joined: Fri Jun 17, 2022 1:31 pm

Re: Adafruit MPRLS Sensor

Post by NeerajMishra »

I ran the I2C Scanner code but it says:
Scanning
No, I2C device found

User avatar
adafruit_support_carter
 
Posts: 24109
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit MPRLS Sensor

Post by adafruit_support_carter »

Thanks. This is most likely a soldering issue. The pins are cold soldered and not adequately wetted out on the pads. See here for a general reference:
https://learn.adafruit.com/adafruit-gui ... n-problems

Try reflowing the pins to improve the connections. Then try the I2C scan again as a way to check.

Post Reply
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”