Go Down

Topic: scc.h for honeywell HSC pressure sensor (Read 174 times) previous topic - next topic

orenLV

Hi all,
I am trying to use the SSC library to connect an HSC pressure sensor with no success.
the sensor is an I2C with the address 0x28.
I connected the HSC as in the datasheet (Ground, Vin, SDA and SCL to pins 1,2,3 and 4) and fixed the address in the example code (https://github.com/gcargile/arduino-ssc)
in the SSC definition it shows a power pin 8 and I could not find what it is
"SSC ssc(0x28, 8)"
any ideas?
Thanks,
Oren

hammy


orenLV

#2
Jul 17, 2019, 05:02 pm Last Edit: Jul 17, 2019, 05:04 pm by orenLV
I use ardui o ino.
Circuit is:.
Pin 1  goes to ground
Pin 2 goes to 3.3v
Pin 3 goes to SDA in the arduino
Pin 4 goes to SCL
Nothing more is connected to the board and i use the example as it is (except for the i2c address)

Idahowalker

Have you run the I2C to see if your device is detected on the I2C buss?

orenLV

Yes.
Other sensors work on the same arduino

Idahowalker

What sensor, a link to the datasheet would be wonderful.

A look at you code in code tags would be nice.

A schematic would be swell!

orenLV

Idahowalker, Thanks for the directions.

item number is HSCDANN001BA2A3
can be shown at:
https://www.mouser.co.il/ProductDetail/Honeywell/HSCDANN001BA2A3?qs=%2Fha2pyFaduhdezggRMgbn28HjqbpULj0bxHQRQX8il0oif1xec5s6H4un88aldtB

main specs are:
High Accuracy, Compensated/Amplified, DIP (Dual Inline Pin), Single axial barbed port,
Dry gases only, no diagnostics, 0 bar to 1 bar, I2C, Address 0x28,
10% to 90% of V supply (analog), 214 counts (digital),   3.3 Vdc

datasheet can be found here:
https://sensing.honeywell.com/honeywell-sensing-trustability-hsc-series-high-accuracy-board-mount-pressure-sensors-50099148-a-en.pdf

the example code is:
#include <Wire.h>
#include <SSC.h>

//  create an SSC sensor with I2C address 0x28 and power pin 8.
SSC ssc(0x28, 8);

void setup()
{
  Serial.begin(115200);
  Wire.begin();
 
  //  set min / max reading and pressure, see datasheet for the values for your
  //  sensor
  ssc.setMinRaw(0);
  ssc.setMaxRaw(16383);
  ssc.setMinPressure(0.0);
  ssc.setMaxPressure(1.6);
 
  //  start the sensor
  Serial.print("start()\t\t");
  Serial.println(ssc.start());
}

void loop()
{
  //  update pressure / temperature
  Serial.print("update()\t");
  Serial.println(ssc.update());
 
  // print pressure
  Serial.print("pressure()\t");
  Serial.println(ssc.pressure());
 
  // print temperature
  Serial.print("temperature()\t");
  Serial.println(ssc.temperature());

  while(1) {
    // use Serial as a command stream
    while(Serial.available()) {
      ssc.commandRequest(Serial);
    }
    delay(100);
  }
}

and schematic

Idahowalker

Code tags make you code show up like this:
Code: [Select]

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

//  create an SSC sensor with I2C address 0x28 and power pin 8.
SSC ssc(0x28, ;

void setup()
{
  Serial.begin(115200);
  Wire.begin();
 
  //  set min / max reading and pressure, see datasheet for the values for your
  //  sensor
  ssc.setMinRaw(0);
  ssc.setMaxRaw(16383);
  ssc.setMinPressure(0.0);
  ssc.setMaxPressure(1.6);
 
  //  start the sensor
  Serial.print("start()\t\t");
  Serial.println(ssc.start());
}

void loop()
{
  //  update pressure / temperature
  Serial.print("update()\t");
  Serial.println(ssc.update());
 
  // print pressure
  Serial.print("pressure()\t");
  Serial.println(ssc.pressure());
 
  // print temperature
  Serial.print("temperature()\t");
  Serial.println(ssc.temperature());

  while(1) {
    // use Serial as a command stream
    while(Serial.available()) {
      ssc.commandRequest(Serial);
    }
    delay(100);
  }
}
Helps with readability and copying to my Arduino IDE as well as nicely delineates code from other cht.

I notice there lines of code
Code: [Select]
/  start the sensor
  Serial.print("start()\t\t");
  Serial.println(ssc.start());
What message do you get?

I notice that the device is a 3.3V device connected to a 5V device, could be a problem.

Next, do an internet search, using your favorite search engine, on the words "connecting arduino uno to i2c" to see how other connected the Arduino Uno and the I2C buss.


orenLV

Thanks very much for the reply.
I am now on a 5 days vacation.
I will update when i return. :-)

Go Up