HS300x series (HS3001 and HS3003)

HS300x (HS3001 and HS3003) is a temperature and humidity sensor IC (-40 to +125°C, 0.0 to 100.0%RH) manufactured by Renesas Electronics. This posting will provide the OSS-ECAL(Open Source Software for Electronic Components Abstraction Layer) for HS300x.
MCU interface : I2C

CAUTION:Please be sure to refer to the latest version of the Datasheet prior to actual design.

HS300x series (HS3001 and HS3003)

General description

The HS300x (HS3001 and HS3003) series is a highly accurate, fully calibrated relative humidity and temperature sensor. The MEMS sensor features a proprietary sensor-level protection, ensuring high reliability and long-term stability.
Integrated calibration and temperature-compensation logic provides fully corrected RH and temperature values via a standard I2C output. No user calibration of the output data is required.
The high accuracy, fast measurement response time, and long-term stability combined with the small package size makes the HS300x series ideal for a wide number of applications ranging from portable devices to products designed for harsh environments.
The HS300x series digital sensor accurately measures relative humidity and temperature levels. The measured data is internally corrected and compensated for accurate operation over a wide range of temperature and humidity levels – user calibration is not required.

Feature

  • Humidity range: 0% to 100% RH
  • Humidity accuracy: ±1.5% RH, typical (HS3001, 10 to 90% RH, 25°C)
  • 14-bit resolution: 0.01% RH, typical
  • Independent programmable resolution settings: 8, 10, 12, 14 bits
  • Fast RH response time: 1 second time constant, typical (with 1m/sec air flow), 4 seconds time constant, typical (in still air)
  • Temperature sensor accuracy: ±0.2°C, typical (HS3001, -10 to +80°C)
  • Low current consumption: 1.0μA average (8-bit resolution, 1.8V supply), 24.4μA average (14-bit resolution, 3.3V supply), one RH and temperature measurement per second
  • Excellent stability against aging
  • Highly robust protection from harsh environmental conditions and mechanical shock
  • Very low power consumption

Application

  • Climate control systems
  • Home appliances
  • Weather stations
  • Industrial automation
  • Medical equipment
  • Automotive cabin climate control

OSS-ECAL specification

API Function

etSTS oHS300X( etCMD cmd, stHS300X_O* rlt )

The oHS300X function is an API function that executes HS300x series (HS3001 and HS3003) processing according to the command in the argument.

NOTE:
The iHS300X_CNV_TIME_TEMP_HUMI[ms] elapsed measurement is calculated from the Thread period that calls this function, so set the Thread period to THREAD_OSS_ECAL_PERIOD [ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_MINMinimum temperature error (rlt.temperature is minimum temperature)
or
Minimum humidity error (rlt.humidity is minimum humidity)
eSTS_ERR_MAXMaximum temperature error (rlt.temperature is maximum temperature)
or
Maximum humidity error (rlt.humidity is maximum humidity)
eSTS_ERR_COMMAND_CODECommand selection error
eSTS_ERR_MODEIf the following commands are performed outside of Programming Mode.
eCMD_WRITE_CFG_HUMI
eCMD_WRITE_CFG_TEMP
eCMD_READ_ID
eSTS_ERR_DATA_STALEData stale error
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter INetCMD cmdOSS-ECAL command code
eCMD_READ_TEMP_HUMIThis command transitions from Sleep Mode to Command that transitions from Sleep Mode to Measurement Mode, reads the Temperature Register and Humidity Register values, converts them into Temperature and Humidity, and saves the Temperature and Humidity in rlt.temperature and rlt.humidity.

1. Write Measurement Requests (0x88) to Slave address.
2. Wait until measurement time iHS300X_CNV_TIME_TEMP_HUMI[ms] has elapsed (return value eSTS_EXE while waiting).
3. Read the Temperature Register value and Humidity Register value.
4. Convert Temperature Register reading value to Temperature.
Temperature = (Temperature Register value/Temperature Gain) + Temperature Offset Value (Min, Max Limit)
5. Convert Humidity Register reading to Humidity.
Humidity = Humidity Register value/Humidity Gain (Min, Max Limit)
6. Store Temperature in rlt.temperature.
7. Store Humidity in rlt.humidity.

NOTE :
iHS300X_CNV_TIME_TEMP_HUMI[ms] Progress measurement is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].
eCMD_READ_HUMICommand to transition from Sleep Mode to Measurement Mode, read the Humidity Register value, convert it to humidity, and save the humidity in rlt.humidity.

1. Write Measurement Requests (0x88) to Slave address.
2. Wait until measurement time
iHS300X_CNV_TIME_HUMI [ms] has elapsed (return value eSTS_EXE while waiting).
3. Read the value of the Humidity Register.
4. Convert Humidity Register value to Humidity.
Humidity = Humidity Register value/Humidity Gain
(Min, Max Limit)
5. Store Humidity in rlt.humidity.

NOTE :
iHS300X_CNV_TIME_HUMI[ms] Progress measurement is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].
eCMD_ENTER_PROG_MODCommand to transition from Sleep Mode to Programming Mode.

1. Write Programming mode command (0xA0, 0x00, 0x00).
2. Wait 120μs inside the function.

NOTE :
Please execute this API function within 10ms after powering on the HS300x.
eCMD_WRITE_CFG_HUMICommand to set Humidity Sensor resolution (8bit, 10bit, 12bit, 14bit).

1. Write Humidity Sensor resolution setting command (0xA0, 0x06, 0x00 ).
2. Wait 120μs inside the function.
3. Read the value of the Humidity Register.
4. Write resolution setting value (RESOL_HUMI) to Humidity Register.

NOTE :
Please execute this API function during Programming Mode. After this API function ends, it takes 14ms for it to be reflected in the Register.
eCMD_WRITE_CFG_TEMPCommand to set Temperature Sensor resolution (8bit, 10bit, 12bit, 14bit).

1. Write Temperature Sensor resolution setting command (0xA0, 0x11, 0x00 ).
2. Wait 120μs inside the function.
3. Reads the value of the Temperature Register.
4. Write resolution setting value (RESOL_TEMP) to Temperature Register.

NOTE :
Please execute this API function during Programming Mode. After this API function ends, it takes 14ms for it to be reflected in the Register.
eCMD_READ_IDCommand to read Sensor ID and save it to rlt.id.

1. Write Sensor ID-Upper command (0x80, 0x1E, 0x00).
2. Wait 120μs inside the function.
3. Reads the value of Sensor ID-Upper.
4. Write Sensor ID-Lower command (0x80, 0x1F, 0x00).
5. Wait 120μs inside the function.
6. Read the value of Sensor ID-Lower.
7. Store Sensor ID in rlt.id.

NOTE :
Please execute this API function during Programming Mode.
eCMD_EXIT_PROG_MODCommand to transition from Programming Mode to Sleep Mode.

1. Write Sleep mode command (0x80, 0x00, 0x00).
2. Wait 120μs inside the function.
Parameter OUTstHS300X_O* rltReceive data from HS300X
float32 temperatureTemperature [°C]
float32 humidityHumidity [%RH]
uint32 idHS300x Register Sensor ID

HAL別関数対応表

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_READ_TEMP_HUMI( stHS300X_O* rlt )

The oHS300X_READ_TEMP_HUMI function reads the values of the Humidity Register and Temperature Register of the HS300X, converts them to temperature and humidity, and stores the temperature and humidity in rlt.temperature and rlt. temperature and rlt. humidity.

  1. Write Measurement Requests (0x88) to Slave address.
  2. Wait until measurement time iHS300X_CNV_TIME_TEMP_HUMI[ms] has elapsed (return value eSTS_EXE while waiting).
  3. Read the Temperature Register value and Humidity Register value.
  4. Convert Temperature Register reading value to Temperature.
    Temperature = (Temperature Register value/Temperature Gain) + Temperature Offset Value (Min, Max Limit)
  5. Convert Humidity Register reading to Humidity.
    Humidity = Humidity Register value/Humidity Gain (Min, Max Limit)
  6. Store Temperature in rlt.temperature.
  7. Store Humidity in rlt.humidity.

NOTE :
iHS300X_CNV_TIME_TEMP_HUMI[ms] Progress measurement is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_MINMinimum temperature error (rlt.temperature is minimum temperature)
or
Minimum humidity error (rlt.humidity is minimum humidity)
eSTS_ERR_MAXMaximum temperature error (rlt.temperature is maximum temperature)
or
Maximum humidity error (rlt.humidity is maximum humidity)
eSTS_ERR_DATA_STALEData stale error
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstHS300X_O* rltReceive data from HS300X
float32 temperatureTemperature [°C]
float32 humidityHumidity [%RH]
uint32 idHS300x Register Sensor ID (not updated)

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_READ_HUMI( stHS300X_O* rlt )

The oHS300X_READ_HUMI function is an API function that reads the value of the Humidity Register of the HS300x series (HS3001 and HS3003), converts that value to humidity, and stores that humidity in rlt.humidity.

  1. Write Measurement Requests (0x88) to Slave address.
  2. Wait until measurement time iHS300X_CNV_TIME_HUMI[ms] has elapsed (return value eSTS_EXE while waiting).
  3. Read the value of the Humidity Register.
  4. Convert Humidity Register value to Humidity.
    Humidity = Humidity Register value/Humidity Gain (Min, Max Limit)
  5. Store Humidity in rlt.humidity.

NOTE :
iHS300X_CNV_TIME_HUMI[ms] Progress measurement is calculated from the Thread cycle that calls this API function, so please set the Thread cycle to THREAD_OSS_ECAL_PERIOD[ms].

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_EXEDuring execution
eSTS_ERR_MINMinimum humidity error (rlt.humidity is minimum humidity)
eSTS_ERR_MAXMaximum humidity error (rlt.humidity is maximum humidity)
eSTS_ERR_DATA_STALEData stale error
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstHS300X_O* rltReceive data from HS300X
float32 temperatureTemperature [°C] (not updated)
float32 humidityHumidity [%RH]
uint32 idHS300x Register Sensor ID (not updated)

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_ENTER_PROG_MOD( void )

The oHS300X_ENTER_PROG_MOD function is an API function that transitions the HS300x series (HS3001 and HS3003) from Sleep Mode to Programming Mode.

  1. Write Programming mode command (0xA0, 0x00, 0x00).
  2. Wait 120μs inside the function.

NOTE :
Please execute this API function within 10ms after powering on the HS300x.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_WRITE_CFG_HUMI( void )

The oHS300X_WRITE_CFG_HUMI function is an API function to set Humidity Sensor resolution (8bit, 10bit, 12bit, 14bit) of the HS300x series (HS3001 and HS3003).

  1. Write Humidity Sensor resolution setting command (0xA0, 0x06, 0x00 ).
  2. Wait 120μs inside the function.
  3. Read the value of the Humidity Register.
  4. Write resolution setting value (RESOL_HUMI) to Humidity Register.

NOTE :
Please execute this API function during Programming Mode.
After this API function ends, it takes 14ms for it to be reflected in the Register.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_WRITE_CFG_TEMP( void )

The oHS300X_WRITE_CFG_TEMP function is an API function to set Temperature Sensor resolution (8bit, 10bit, 12bit, 14bit) of the HS300x series (HS3001 and HS3003).

  1. Write Temperature Sensor resolution setting command (0xA0, 0x11, 0x00 ).
  2. Wait 120μs inside the function.
  3. Reads the value of the Temperature Register.
  4. Write resolution setting value (RESOL_TEMP) to Temperature Register.

Note :
Please execute this API function during Programming Mode.
After this API function ends, it takes 14ms for it to be reflected in the Register.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_READ_ID( stHS300X_O* rlt )

The oHS300X_READ_ID function is an API function to read Sensor ID of HS300x series (HS3001 and HS3003) and store the value in rlt.id.

  1. Write Sensor ID-Upper command (0x80, 0x1E, 0x00).
  2. Wait 120μs inside the function.
  3. Reads the value of Sensor ID-Upper.
  4. Write Sensor ID-Lower command (0x80, 0x1F, 0x00).
  5. Wait 120μs inside the function.
  6. Read the value of Sensor ID-Lower.
  7. Store Sensor ID in rlt.id.

Note :
Please execute this API function during Programming Mode.

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error
Parameter OUTstHS300X_O* rltReceive data from HS300X
float32 temperatureTemperature [°C] (not updated)
float32 humidityHumidity [%RH] (not updated)
uint32 idHS300x Register Sensor ID

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX
etSTS oHS300X_EXIT_PROG_MOD( void )

The oHS300X_ENTER_PROG_MOD function is an API function that transitions the HS300x series (HS3001 and HS3003) from Programming Mode to Sleep Mode.

  1. Write Sleep mode command (0x80, 0x00, 0x00).
  2. Wait 120μs inside the function.

Note :

Return valueetSTSOSS-ECAL status code
eSTS_FINCompleted successfully
eSTS_ERR_I2C_OBJECTI2C object selection error
eSTS_ERR_OTHERS_RUNOther components are executing the process
eSTS_ERR_HAL_OTHERS_RUNOther application is running HAL
eSTS_ERR_HAL_I2CHAL I2C error

Function Correspondence Table by HAL

ArduinoArduinoX
ARMMbedX
InfineonModusToolbox X
NXPMCUXpresso MXRT1051B_1052BX
RenesasSSPX

Files

Folder*Filesummary
HS300X_HALNAME_VERSION/samplesample.c (.cpp)Sample Application Program
sample.hSample Application Header
HS300X_HALNAME_VERSIONoHS300X.c (.cpp)OSS-ECAL Program for HS300X
oHS300X.hOSS-ECAL Header for HS300X
HS300X_ARDUINO.inoSample application programs for Arduino
oss_ecal.hOSS-ECAL Common Header (Ver 01.01.00 or later, AUTOSAR is Ver 01.01.07 or later)
oTypes.hTypedef header file for AUTOSAR
user_setting.c (.cpp)Const and Table of User setting
user_setting.hHeader of User setting
readme.mdReadme
OSS-ECAL Terms of Use.txtOSS-ECAL Terms of Use

* For HALNAME, please refer to HAL Support.

HAL Support List

MCU/Board
manufacturer
HALMCU*Development environment*HALNAME
ArduinoArduino 1.8.6ATmega2560
ATmega328P
Mega 2560 Rev3
Arduino Pro Mini 3.3V
ARDUINO
ARMMbed 6.17.0STM32F401RESTM32 Nucleo-64 boardsMBED
InfineonModusToolbox HAL Cat1 2.4.3CYBLE-416045-02CY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitModusToolbox
NXPMCUXpresso SDK
iMXRT1051B_1052B
ksdk2_0
MIMXRT1052DVL6AIMXRT1050-EVKBiMXRT1051B1052B
RenesasSSP 2.4.0R7FS7G27H3A01CFCS7G2 SKSSP

* MCU and development environment at the time of development. Even if the same HAL is used, different MCUs and development environments may not work together.

OSS-ECAL Download

Please login before downloading. To register as a new user, please click here.
This OSS-ECAL is a sample version and can be downloaded without user registration, but please accept the OSS-ECAL Terms of Use before downloading.

If you are unable to download the File, please contact us and let us know the model number and HAL type. We will send you the file as an email attachment.

Built-in How to

Please refer to the following to incorporate API functions into your user program.

Set temperature and humidity resolution (8bit, 10bit, 12bit, 14bit) in user_setting.h

// Resolution bit setting bit8 8U, bit10 10U, bit12 12U, bit14 14U
#define RESOL_HUMI              8U      // Humidity measurement Resolution bit setting
#define RESOL_TEMP              12U     // Temperature measurement

How to incorporate OSS-ECAL into user programs

How to incorporate multiple OSS-ECALs in a user program (same MCU function)

How to incorporate multiple OSS-ECALs in a user program (different MCU function)

How to incorporate multiple identical electronic components into a user program

How to reduce the impact on user programs by replacing electronic components

OSS-ECAL English
error: Content is protected !!