pyupm_rsc module

class pyupm_rsc.RSC(bus, cs_ee_pin, cs_adc_pin)[source]

Bases: object

Description for the RSC TruStability line.

ID: rsc

Name: Honeywell RSC TruStability Pressure and Temperature Sensors

Other Names: Honeywell RSC TruStability Boardmount Pressure Sensors

Category: pressure temp

Manufacturer: honeywell

Connection: spi

Link:https://sensing.honeywell.com/honeywell-sensing-trustability-rsc- series-data-sheet-32321348-b-en.pdf The RSC Series is a piezoresistive silicon pressure sensor offering a digital output for reading pressure over the specified full scale pressure span and temperature range. It is calibrated and temperature compensated for sensor offset, sensitivity, temperature effects, and non-linearity using a 24-bit analog-todigital converter with integrated EEPROM. Pressure data may be acquired at rates between 20 and 2000 samples per second over an SPI interface. It is intended for use with non- corrosive, non-ionic gases, such as air and other dry gases, designed and manufactured according to ISO 9001 standards, and is REACH and RoHS compliant.

Most of the functionality available on this chip has been implemented. The driver calculates the compensated pressure and temperature values based on the information provided in the datasheet. The user must not mess around with the coefficient and adc init value readings from the EEPROM as these are used to calculate the compensated pressure and temperature values.

In order to get the sensor to work properly on an Edison, you would need to turn off the Edison SPI power management, this can be done with the command: echo on > /sys/devices/pci0000:00/0000:00:07.1/power/control

You might have to use external pull up resistors on all the lines. More info about this has been provided in the datasheet with a table and a diagram.

C++ includes: rsc.hpp

getInitialADCState()[source]

uint8_t * getInitialADCState()

Function returns the initial state that the ADC registers need to be set to. This info is retrieved from the EEPROM.

std::string sensor type

getMinimumPressure()[source]

float getMinimumPressure()

This function provides the minimum pressure which the sensor can read out. This will vary for the different kinds of RSC sensors. This value is read from the EEPROM

float Sensor minimum pressure

getPressure()[source]

float getPressure()

Function to get the compensated pressure value

float compensated pressure value

getPressureRange()[source]

float getPressureRange()

This function provides the pressure range which the sensor can read out. This will vary for the different kinds of RSC sensors. This value is read from the EEPROM

float Total sensor pressure range

getPressureType()[source]

string getPressureType()

Function returns the type of RSC pressure sensor being used. This info is available in the EEPROM. Types: Differential

Absolute

Gauge

std::string sensor type

getPressureUnit()[source]

string getPressureUnit()

This function gets the units that the particular RSC sensor being used reads out the pressure data in. Following are the possible units data can be read out in: Pascal

Kilo Pascal

Mega Pascal

PSI

inH2O

Bar

milli Bar

This info can be retrieved from the EEPROM

std::string pressure units

getSensorName()[source]

string getSensorName()

This function provides the sensor name as a string to the user.

std::string sensor name

getSensorSerialNumber()[source]

string getSensorSerialNumber()

This function provides the sensor serial number as a string to the user.

std::string sensor serial number

getTemperature()[source]

float getTemperature()

Function to get the compensated temperature value.

float compensated temperature value

setDataRate(dr)[source]

void setDataRate(RSC_DATA_RATE dr)

Function to set the data rate for the RSC sensor: Following are the different data rates available:

In Normal Mode 20 SPS

45 SPS

90 SPS

175 SPS

330 SPS

600 SPS

1000 SPS

In Fast Mode 40 SPS

90 SPS

180 SPS

350 SPS

660 SPS

1200 SPS

2000 SPS

SPS - Samples per Second

dr enum of type RSC_DATA_RATE

setMode(mode)[source]

void setMode(RSC_MODE mode)

Function to set the mode for the RSC sensor: There are 2 types of modes available:

Normal Mode - 256 KHz

Fast Mode - 512 KHz

mode enum of type RSC_MODE

setupADC(adc_init_values)[source]

void setupADC(uint8_t *adc_init_values)

Function used to set up the ADC with the initial values of the ADC registers read from the EEPROM.

adc_init_values: pointer to uint8_t array containing the initial ADC values

updateCoefficients()[source]

void updateCoefficients()

Function used to update the coefficients. This function doesn’t return the coefficent values. Intstead, it updates the 2-D array with the coefficient values read from the EEPROM. This function is mostly for internal use only.