0

Adafruit MPRLS Sensor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit MPRLS Sensor

by NeerajMishra on Fri Jun 17, 2022 1:35 pm

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 | TOGGLE FULL SIZE
  #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?

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

Re: Adafruit MPRLS Sensor

by adafruit_support_carter on Fri Jun 17, 2022 1:40 pm

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

adafruit_support_carter
 
Posts: 24080
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit MPRLS Sensor

by danger-will-robinson on Mon Jun 20, 2022 3:42 pm

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?
danger-will-robinson
 
Posts: 35
Joined: Fri Dec 06, 2013 1:21 pm

Re: Adafruit MPRLS Sensor

by NeerajMishra on Mon Jun 27, 2022 2:21 pm

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

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

Re: Adafruit MPRLS Sensor

by NeerajMishra on Mon Jun 27, 2022 2:35 pm

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 66 times

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

Re: Adafruit MPRLS Sensor

by NeerajMishra on Mon Jun 27, 2022 2:36 pm

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

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

Re: Adafruit MPRLS Sensor

by adafruit_support_carter on Mon Jun 27, 2022 2:46 pm

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 64 times

adafruit_support_carter
 
Posts: 24080
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit MPRLS Sensor

by NeerajMishra on Mon Jun 27, 2022 2:56 pm

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 64 times

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

Re: Adafruit MPRLS Sensor

by NeerajMishra on Mon Jun 27, 2022 3:05 pm

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

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

Re: Adafruit MPRLS Sensor

by adafruit_support_carter on Mon Jun 27, 2022 3:08 pm

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.

adafruit_support_carter
 
Posts: 24080
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.