Skip to main content
SLee.9
Associate
June 17, 2019
Question

CO Gas Concentration Reading with the board P-Nucleo-IKA02A1.

  • June 17, 2019
  • 2 replies
  • 746 views

Hello, 

​I'm trying to tuning CO​ Gas reading value with the board P-Nucleo-IKA02A1.

By the P-Nucleo-IKA02A1 BSP, Get_Gas_concentration function is belows..

​float Get_Gas_concentration(float gain, float sens){

return ((float)Get_ADC_value(ANALOG_GAS_VALUE_PIN)-Get_ADC_value(ANALOG_REF_VOLT_VALUE_PIN))*805664/gain/sens; }

What's the meaning of the constant, 805664, of above source code?

    This topic has been closed for replies.

    2 replies

    Jiri HLADIK
    ST Employee
    June 18, 2019

    Hello,

    This constant represents conversion from ADC value to voltage. One LSB of 12bit ADC powered from 3,3V represents 805,664uV

    The value is multiplied by 1000 to have correct gas concentration reading in ppm

    Best regards

    ST support

    SLee.9
    SLee.9Author
    Associate
    June 24, 2019

    Thanks for your quick answer.

    Dsaka.686
    Visitor II
    October 29, 2019

    STM32 Nucleo sheets give a moderate and adaptable path for clients to explore different avenues regarding new thoughts and manufacture models with any STM32 microcontroller line.

    Tutuapp 9Apps ShowBox