Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Code for the Temperature sensor is based on its technical data (Bosch, 2024), where 0v = -30C[NOT VERIFIED]  45C  which linearly scales to 10v = 200C[NOT VERIFIED]80C. This means that linear interpolation is utilized to scale the input voltage too a an output in celsius.


Linear interpolation is performed with the following function (Chapra and Canale, 2015),


This means that the inputs needs to be,

...

The coded implementation looks like this,Image Removed

Image Added


Which gives the following function block,

Image Added


References:


Chapra, S.C. and Canale, R.P. (2015). Numerical Methods for Engineers. 7th ed. New York: McGraw-Hill Education. [pdf] Available at: https://gdcboysang.ac.in/About/Droid/uploads/Numerical%20Methods.pdf (Accessed: 28 May 2024).

Bosch. (2024). BME688: Digital low power gas, pressure, temperature & humidity sensor with AI. [pdf] February 2024, Document revision 1.3. Available at: https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme688-ds000.pdf (Accessed: 28 May 2024).