HVAC Click Board
HVAC Click Board
The HVAC Click Board™ is a compact add-on board that contains Sensirion’s next-generation miniature CO2 sensor. This board features the SCD41, a carbon dioxide sensor build on the photoacoustic sensing principle, and Sensirion’s patented PASens® and CMOSens® technology to offer high accuracy at a minor form factor. On-chip signal compensation is realized with the build-in humidity and temperature sensor. It operates within a specified range from 400 to 5,000 ppm, configurable through the I2C interface with a single shot mode supported.
The HVAC Click Board™ is also suitable for indoor air quality applications using an additional SPS30 that allows smart ventilation systems to regulate ventilation in the most energy-efficient and human-friendly way, maintaining low CO2 concentration for a healthy, productive environment.
Software Support
We provide a library for the HVAC Click Board™ on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control the HVAC Click board. A library performs the communication with the SCD40 Sensor via the I2C interface and with the SPS30 via the I2C or UART interface.
Key Functions
void hvac_scd40_read_measurement ( measuremen_data_t *m_data )
- SCD40 read measurement function.void hvac_sps30_start_measurement ( void )
- SPS30 start measurement command function.void hvac_sps30_read_measured_data ( mass_and_num_cnt_data_t *m_n_c_data )
- SPS30 read measured data function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C or UART and start to write log.
- Application Initialization - Initialization driver enables - I2C or UART, SCD40: perform a factory reset, serial number, features, product type platform type, product version and SPS30: perform start measurement mode, also write log.
- Application Task - (code snippet) This is an example that demonstrates the use of the HVAC Click board. HVAC Click board can be used to measure : Concentration of CO2 in air, Temperature ( degree Celsius ), Relative Humidity ( % ), Mass Concentration of PM1.0, PM2.5, PM4.0, PM10 and Number Concentration of PM0.5, PM1.0, PM2.5, PM4.0 and PM10. All data logs write on USB uart changes.
void application_task ( ) { if ( select_communication == I2C_COMMUNICATION ) { hvac_scd40_send_cmd( HVAC_MEASURE_SINGLE_SHOT ); Delay_ms( 5000 ); hvac_scd40_read_measurement( &hvac_data ); Delay_ms( 100 ); WordToStr( hvac_data.co2_concent, log_text ); mikrobus_logWrite( " CO2 Concent = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_LINE ); FloatToStr( hvac_data.temperature, log_text ); mikrobus_logWrite( " Temperature = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " C", _LOG_LINE ); FloatToStr( hvac_data.r_humidity, log_text ); mikrobus_logWrite( " R. Humidity = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " %", _LOG_LINE ); mikrobus_logWrite( "- - - - - - - - - - - - - ", _LOG_LINE ); while ( hvac_sps30_get_ready_flag( ) != HVAC_SPS30_NEW_DATA_IS_READY ); } mikrobus_logWrite( " Mass Concentration : ", _LOG_LINE ); hvac_sps30_read_measured_data( &sps30_data ); Delay_ms( 100 ); FloatToStr( sps30_data.mass_pm_1_0, log_text ); mikrobus_logWrite( " PM 1.0 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " ug/m3", _LOG_LINE ); FloatToStr( sps30_data.mass_pm_2_5, log_text ); mikrobus_logWrite( " PM 2.5 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " ug/m3", _LOG_LINE ); FloatToStr( sps30_data.mass_pm_4_0, log_text ); mikrobus_logWrite( " PM 4.0 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " ug/m3", _LOG_LINE ); FloatToStr( sps30_data.mass_pm_10, log_text ); mikrobus_logWrite( " PM 10 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " ug/m3", _LOG_LINE ); mikrobus_logWrite( "- - - - - - - ", _LOG_LINE ); mikrobus_logWrite( " Number Concentration : ", _LOG_LINE ); FloatToStr( sps30_data.num_pm_0_5, log_text ); mikrobus_logWrite( " PM 0.5 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " n/cm3", _LOG_LINE ); FloatToStr( sps30_data.num_pm_1_0, log_text ); mikrobus_logWrite( " PM 1.0 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " n/cm3", _LOG_LINE ); FloatToStr( sps30_data.num_pm_2_5, log_text ); mikrobus_logWrite( " PM 2.5 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " n/cm3", _LOG_LINE ); FloatToStr( sps30_data.num_pm_4_0, log_text ); mikrobus_logWrite( " PM 4.0 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " n/cm3", _LOG_LINE ); FloatToStr( sps30_data.num_pm_10, log_text ); mikrobus_logWrite( " PM 10 = ", _LOG_TEXT ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " n/cm3", _LOG_LINE ); mikrobus_logWrite( "--------------------------", _LOG_LINE ); Delay_ms( 2000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
HVAC Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.