Our intent is to create our own PCB with an array of the MPL115A2 barometric sensors. We followed the documentation and set up the correct circuit support, but upon attaching the sensors to our board and supplying a voltage of 5V we have bricked through the majority of our sensors. We think that they are bricked because the power source senses a short and will not supply anything. We have had only one success and I am able to ping the sensor for I2C communications.
Those of you who have created your own PCB with these sensors, have you had a similar problem. I know the issue could be anything from our physical circuit, our attachment of the sensors to how we are initially power cycling them. Any insight that you can provide would be greatly appreciated.
Attached is our schematic, we have only gotten as far as what is highlighted in blue (no ATtiny or AVR header attached); right now we are just attaching a sensor and having them powered and communicate through their own I2C lines through the 4 pins on the side. Essentially, our current board is just mimicking that of the Adafruit MPL115A2 breakout board (https://www.adafruit.com/product/992 ). We need a smaller footprint with more of the sensors, that is why we are creating our own board.
We have been testing with only one sensor on the board, so we are not trying to swap between multiple of the same addressed sensors yet, we are just testing a singular sensor.
The new issue, is upon freshly made boards, without powering it on with a voltage supply of 5V ( this might be causing a voltage spike that bricked our other boards) we are testing right away with an Arduino Mega, knowing that it has circuit protection against such power spikes. We are able to ping the sensors (to sense that there is a sensor at address of 0x60) but upon reading any of the registers (pressure, temperature or hard coded coefficients) the readings return 0. I have been using Adafruit_MPL115A2 library and getpressure.ino code. Most people ( when searching for only reading 0 from registers) associate this issue to code rather than poor circuitry.
Thank you for the help,
Thanks for the clarification about why you are using the MPL115A instead of the MPL3115A.
About the issue, there is a need on the MPL311A2 to make a dummy read which is not a true read of the I2C bus, but is a read of the IICD register in the IIC block., more details about this can be seen in section 2.1 of the Application note AN4481: https://www.nxp.com/docs/en/application-note/AN4481.pdf
Let’s check if this solves the problem you are seen.
I also recommend you to set a delay (about 3ms delay) before trying to read, if you check Table 10 on page 13 of the datasheet, you will find it as “Conversion Time”, which is the delay needed between start convert command and data available in the Pressure and Temperature registers.
The typical wait time is 3 ms associated with each conversion type, otherwise you may have some errors in your reads or read 0s as in your case.
MPL115A2 datasheet: https://www.nxp.com/docs/en/data-sheet/MPL115A2.pdf
Sorry for the long delay, life hit and I was distracted.
So, right off the bat I changed the delay time from 5ms to your specified 3ms. That did not change anything. But thanks for the tip anyways.
I implemented ( or tried to) the dummy read sequence specified, and now all the registers are reading FFFFFFFF which I know is the max hex for a 16 bit number so still no real success. The code that I used just to read two bytes (the first coefficient) can be seen below:
_wire->beginTransmission(_i2caddr); // start
i2cwrite(_wire, (uint8_t)MPL115A2_REGISTER_A0_COEFF_MSB); // write address and register
_wire->endTransmission(); // does not work with or without this line
_wire->beginTransmission(_i2caddr); // repeat start
// Wait a bit for the conversion to complete (3ms max)
dummy_b = (((uint8_t)i2cread(_wire) << 4) | i2cread(_wire)); // IIC "read address dummy read
a0coeff= (((uint16_t)i2cread(_wire) << 8) | i2cread(_wire));
Serial.print("A0= "); Serial.println(a0coeff, HEX);
When I did the above code for specifically reading the pressure register, I was able to read a number, not 0 or FFFF.F but that number did not fluctuate with applied finger pressure or increased air pressure. That leads me to think that this is a board hardware problem. Would that be correct?
Glad to know that now you can read values different from 0 or FFFF.
I’m confused about your comment “number did not fluctuate with applied finger pressure or increased air pressure”, I’m not sure how you bare applying the pressure here, finger pressure should not be a determinant test to read pressure from this device.
However, you are correct, if number does not fluctuate with applied pressure, then most likely, board have a hardware problem.
I have never heard of a similar problem.
In the part of the schematic you sent, you did not included the source of the voltage rail VDD where the 5V are originated. Do you have any protection circuit for the VDD voltage rail to avoid spikes?
You have 4 MPL115A in your system, and you mentioned that you can only communicate with one, did you swap the sensor, try to use a failing one with a good one and check if you can communicate with it.