Two pressure sensors on one UNO

I need to connect two of these sensors to an UNO and record the readings on an SD card for a project:

http://www.mouser.com/ProductDetail/Honeywell/SSCDANN015PAAA5/?qs=QmEuDp8986T81PX8ujjt9Q%3D%3D

I don’t have very much experience with this, so I’m running into some problems. The two primary things are:

  • How do I connect/wire both sensors to the Arduino?

  • I’m not sure where to go with the code from here. I don’t see an I2C address on the datasheet. I also don’t know how to give the sensors different addresses.

I essentially want the end result to be a datafile that has 2 kinds of pressure readings and their timestamps.

Here is what I have so far:

#include <Wire.h>
#include <SSC.h>
#include <SD.h>

File dataFile

// create an SSC sensor with I2C address ____ and power pin 8.
SSC ssc1(_____, 8);

// create an SSC sensor with I2C address ______ and power pin 7.
SSC ssc2(____, 7);

void setup()
{
Serial.begin(115200);
Wire.begin();

// set min / max reading and pressure, see datasheet for the values for your sensor
ssc1.setMinRaw(???);
ssc1.setMaxRaw(???);
ssc1.setMinPressure(???);
ssc1.setMaxPressure(???);

ssc2.setMinRaw(???);
ssc2.setMaxRaw(???);
ssc2.setMinPressure(???);
ssc2.setMaxPressure(???);

// start the sensor
Serial.print(“start()\t\t”);
Serial.println(ssc1.start());
Serial.println(ssc2.start());

Serial.print(“Initializing SD card…”);
// make sure that the default chip select pin is set to
// output, even if you don’t use it:
pinMode(SS, OUTPUT);

// see if the card is present and can be initialized:
if (!SD.begin(10,11,12,13)) {
Serial.println(“Card failed, or not present”);
// don’t do anything more:
while (1) ;
}

Serial.println(“card initialized.”);
// Open up the file we’re going to log to!
dataFile = SD.open(“datalog2.txt”, FILE_WRITE);
if (! dataFile) {
Serial.println(“error opening datalog.txt”);
// Wait forever since we cant write data
while (1) ;
}
dataFile.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
dataFile.println("%%%%%%%%%%%NEW DATASET%%%%%%%%%%%");
dataFile.println("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
}

void loop()
{
dataFile.print("Time: ");
dataFile.println(millis());

// update static pressure
dataFile.print(“update()\t”);
dataFile.println(ssc1.update());
// print static pressure
dataFile.print(“pressure()\t”);
dataFile.println(ssc1.pressure());

// update dynamic pressure
dataFile.print(“update()\t”);
dataFile.println(ssc2.update());
// print dynamic pressure
dataFile.print(“pressure()\t”);
dataFile.println(ssc2.pressure());

delay(10);
}

msilezin:
I don't see an I2C address on the datasheet.

The sensors are analogue according to the datasheet. Not I2C.
Unless I'm looking at the wrong datasheet.

The sensor produces a ratiometric output voltage that can be read with an analogue input.
Exactly the same as reading a pot.
The A/D will return 0-1023 (actually ~25 to ~1098), depending on pressure.
That can be converted into a human-understandable value.
Try to print that (psi) value to the serial monitor before you even think of adding sensors and storing on an SD card.
Leo..

I'm confused. The way I interpreted it was analog output and I2C communication. Then again, I'm an amateur at this.

https://playground.arduino.cc/Main/HoneywellTruStabilitySSC-HSCPressureSensors

The link above says the sensor's on an I2C bus

msilezin:
I'm confused. The way I interpreted it was analog output and I2C communication. Then again, I'm an amateur at this.

Arduino Playground - HoneywellTruStabilitySSC-HSCPressureSensors

The link above says the sensor's on an I2C bus

I see it now. That actually makes it a lot easier. Thank you!

SSCDANN015PAAA5

The Mouser link you gave in post#0 links to an analogue sensor.

Seems those sensors also come in I2C and SPI.
Leo…