HS300x(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

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 )

Return value
Parameter IN
Parameter OUT

etSTS
etCMD cmd
stHS300X_O* rlt

OSS-ECAL status code
OSS-ECAL command code
Receive data from HS300x

etCMD
eCMD_READ_TEMP_HUMI


Feature :
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.

Process :
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.

Command API function :
etSTS oHS300X_READ_TEMP_HUMI( stHS300X_O* rlt )

Return value :
eSTS_FIN
eSTS_EXE
eSTS_ERR_DATA_STALE
eSTS_ERR_MIN
eSTS_ERR_MAX
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


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_HUMI

Feature :
Command to transition from Sleep Mode to Measurement Mode, read the Humidity Register value, convert it to humidity, and save the humidity in rlt.humidity.

Process :
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.

Command API function :
etSTS oHS300X_READ_HUMI( stHS300X_O* rlt )

Return value:
eSTS_FIN
eSTS_EXE
eSTS_ERR_DATA_STALE
eSTS_ERR_MIN
eSTS_ERR_MAX
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


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_MOD

Feature :
Command to transition from Sleep Mode to Programming Mode.

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

Command API function :
etSTS oHS300X_ENTER_PROG_MOD( void )

Return value :
eSTS_FIN
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


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

eCMD_WRITE_CFG_HUMI

Feature :
Command to set Humidity Sensor resolution (8bit, 10bit, 12bit, 14bit).

Process :
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.

Command API function :
etSTS oHS300X_WRITE_CFG_HUMI( void )

Return value :
eSTS_FIN
eSTS_ERR_MODE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


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_TEMP

Feature :
Command to set Temperature Sensor resolution (8bit, 10bit, 12bit, 14bit).

Process :
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.

Command API function :
etSTS oHS300X_WRITE_CFG_TEMP( void )

Return value:
eSTS_FIN
eSTS_ERR_MODE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


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_ID

Feature :
Command to read Sensor ID and save it to rlt.id

Process :
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.

Command API function :
etSTS oHS300X_READ_ID( stHS300X_O* rlt )

Return value :
eSTS_FIN
eSTS_ERR_MODE
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


Note :
Please execute this API function during Programming Mode.

eCMD_EXIT_PROG_MOD

Feature :
Command to transition from Programming Mode to Sleep Mode.

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

Command API function :
etSTS oHS300X_EXIT_PROG_MOD( void )

Return value :
eSTS_FIN
eSTS_ERR_HAL_I2C
eSTS_ERR_COMMAND_CODE
eSTS_ERR_OTHERS_RUN
eSTS_ERR_I2C_OBJECT


Note :

stHS300X_O
float32 temperature
float32 humidity
uint32 id


HS300x Register Temperature to float TEMPERATURE[degrees Celsius]
HS300x Register Humidity to float HUMIDITY[%RH]
HS300x Register Sensor ID

Files
Folder*Filesummary
HS300X_HALNAME/samplesample.c (.cpp)Sample Application Program
sample.hSample Application Header
HS300X_HALNAMEoHS300X.c (.cpp)OSS-ECAL Program for HS300X
oHS300X.hOSS-ECAL Header for HS300X
oss_ecal.hOSS-ECAL Common Header (Ver 01.01.00 or later)
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.0STM32F401RETxSTM32 Nucleo-64 boardsMBED
InfineonModusToolbox HAL Cat1 2.4.3CYBLE-416045-02CY8CPROTO-063-BLE PSoC 6 BLE Prototyping KitModusToolbox
NXPMCUXpresso SDK
iMXRT1051B_1052B
ksdk2_0
CYBLE-416045-02IMXRT1050-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.

“ABC.zip was blocked because this type of file can harm your device.” in Microsoft Edge.

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 !!