Maker Pro
Maker Pro

Using an Arduino to read Honeywell ASDXRRX100PD2A5 I2C Pressure Sensor

I have a Honeywell ASDXRRX100PD2A5 I2C Pressure Sensor that I want to read using an Arduino.

Looking at the datasheet, I know that the I2C address is 0x28, and I have had a play with bits of code I've found on the internet, but none of them make any sense. Numbers do increase as I increase the pressure, but not on the scale shown on the datasheet.

I get it from Kynix. There is a lot of useful blogs on its site, which give me much help. Here I also want to share Kynix Semiconductor Electronic Blog

Here is a link to said datasheet: http://www.farnell.com/datasheets/1676926.pdf

Here is a datasheet that has information about communicating with Honeywell sensors using I2C: http://sensing.honeywell.com/index.php/ci_id/45841/la_id/1/document/1/re_id/0

Without having much experience with I2C in the past it's hard for my to get my head around it.

Also, here is a picture of my setup:



The code I am using to test it out at the moment is as follows:

#include<Wire.h>
#define sensor 0x28 //Unique bus address

void setup()
{
Wire.begin();//Wakes up I2C bus
Serial.begin(9600);
}

void getdata(byte *a, byte *b)
{
//Move register pointer back to first register
//Wire.beginTransmission(sensor);
//Wire.write(1);
//Wire.endTransmission();
Wire.requestFrom(sensor,2);//Sends content of first two registers
*a = Wire.read(); //first byte recieved stored here
*b = Wire.read(); //second byte recieved stored here
}

void showdata()
{
byte aa,bb;
float pressure =0;
getdata(&aa,&bb);
Serial.print("byte 1: ");Serial.println(aa,DEC);
Serial.print("byte 2 ");Serial.println(bb,DEC);
delay(1000);

}

void loop()
{
showdata();
}
I am getting the following results at the following pressures:

0psi byte1: 31
byte2: 246

10psi byte1: 34
byte2: 102

20psi byte1: 32
byte2: 30

30psi byte1: 39
byte2: 167
Any help pointing me in the right direction would be much appreciated.
 
Top