Honeywell MPR pressure sensor (MPRLS0001PG0000SA)

Hi guys,

I am fairly new to this programming thing. I`m just a humble chemical engineer that did some C++ programming during undergrad.

I am currently trying to program a sketch to read a pressure from one of Honeywells MPR series sesnors. The specific sensor ID is in the title and I have also attached the data sheet from Honeywell.

Before I go crazy searching for a problem that is none existent with my physical wiring of the sensor; I just want to confirm that the sketch I am using is coded correct to read the pressure.

The output I get in the serial monitor is the main reason I am thinking I am doing something wrong. The serial output reads as follows:

127 ; 255 ; 255
126
(Repeated over and over)

Problem is the pressure value bytes (127, 255, 255) coverts to quite a big pressure number even though the sensor is at atmospheric conditions. Now, I understand that stressing the sensor during mounting can result in some drift, but surely not as much as those values suggest.

My code is also attached.

What am I doing wrong?? Due to my inexperience I must be reading the sensor incorrectly…

Thanks guys
P.S. This is my first post on the forum

MPRSensor_SimpleRead_v1.ino (1.11 KB)

honeywell-sensing-micropressure-board-mount-pressure-mpr-series-datasheet-32332628-f-en.pdf (1.11 MB)

What am I doing wrong?? Due to my inexperience I must be reading the sensor incorrectly...

The only thing I see that's at the limit is the SPI clock frequency. You might try lowering it to about 500kHz. But I guess you did something wrong in the wiring. If you connected the sensor directly, the sensor might be damaged as the 5V signals of your UNO are over the maximum voltage allowed for the SPI bus. You must use level converters. If you plan to connect other devices to the bus take care to use a level converter that allows to set the outputs to tri-state if CS is HIGH.