MPL3115A2 only reading -999

Hello SparkFun team,

I am having problems with the MPL3115A2: https://www.sparkfun.com/products/11084

I believe the 5 digit code is: 11084

I am trying to use it measure altitude.

I am running the test code from the website and it is hooked up using the instruction from this guide: https://media.digikey.com/pdf/Data%20Sh … pGuide.pdf

I have been working with an Arduino Uno so I have hooked VCC up to 3.3v and added 1k resistor between SCL and A5 and SDA and A4 as instructed. Even without the resistors or connecting to 5V like some comments below the product page have suggested, it did not work.

I have previously asked on the Arduino Forum and I was told I might have broken the sensor. Following this advice I ordered a new one. When I first connected it, it worked fine for about 2 minutes until, after I moved the board slightly across the table, it went back to -999 readings. I then fiddled with the wires a bit (moved them around a bit) and it worked for another 20 seconds. Funnily enough, while the new board was working I also tried attaching the old one which started giving me proper readings again. Since then I haven’t been able to get either one to work.

Here are some things I have tried:

  1. Soldered pins to the board to ensure there is not physical connection error

  2. Changed the resistor strength (According to different sources)

  3. Run a I2C connection test code (Result: Not found)

  4. Swapped out the Arduino Uno board for a different one

  5. Tested the GY-521 (which also uses I2C) to check whether the I2C is worked (It worked)

Arduino Forum Post:

https://forum.arduino.cc/t/sparkfun-mpl … 99/1034493

False readings (-999):

Is there anything you can think of?

Thanks in advance

Nick

I don’t have this sensor, but I am very surprised about the hookup guide . They mention the need to have serial resistors on SCL and SDA lines “to limit the 5V signal going into the sensor and prevent damage to the sensor”.

That is NOT how I2C works.

An UNO (or any other board) does not output a (5V) signal. I2c works in tri-state connections. To send a 0-bit, it will pull the SCL or SDA line to GND, to send a 1-bit it will leave the line floating. Hence you always need pullup resistors to bring the line high. I have checked the schematics and these pull-up resistors (1k) are already on the MPL3115A2 board and connect the VCC ( 3v3).

Try to connect the board GND- GND, VCC -3V3, SCL to SCL, SDA to SDA ( NO resistors needed).

Some things that come to mind:

  • - Soldering not done good enough (clear photo can help other here check your work).
  • - Sounds like you have a loose connection (could be soldering or iffy breadboard connections).
  • - Could try using a proper logic level converter instead of the resisters as described in SparkFun's hookup guide.
  • Thank you so much.

    paulvha:
    Try to connect the board GND- GND, VCC -3V3, SCL to SCL, SDA to SDA ( NO resistors needed).

    This works!

    Hi,

    I was just wondering what the connections should be when connecting to a Arduino Nano?

    paulvha:
    An UNO (or any other board) does not output a (5V) signal.

    Thanks again

    Nick

    look for UNO pinout on internet and you will get many links. A5 = SCL, A4 = SDA.

    I was just wondering what the connections should be when connecting to a Arduino Nano?

    Which nano? There are a bunch of different versions.

    These ones:

    https://www.amazon.de/AZDelivery-Atmega … 125&sr=8-3

    A4 and A5, just like an uno.

    Thanks!