Personal tools

Temperature compensation

From Gluonpilot

Jump to: navigation, search

Often marketeers try to promote their products by saying all their sensors are "temperature compensated". While this is important, it not so hard to accomplish this.

Let's do a simple experiment:

  • Plot the temperature's and the accelerometer's value on a figure.
  • At the beginning the temperature will rise (the processor generates some heat).
  • After a while I will blow softly on the module (for a minute or so). This should make the temperature drop.

The code to do this can be found in the "temperature_compensation" example. Using the gluon library, it's only a few lines long! Copy paste the output to excel . The raw accelerometer's output is normalized because the default value is around 22000. This would make it hard to visually compare it with the temperature. This is the result:

The orange line is the temperature: you can clearly see it heating up, and cooling down when I start blowing on it. Also pay attention to the shape of those 2 lines: the temperature seems to be scaled down version of the accelerometer's output!

With some excel tricks, it's easy to scale the accelerometer's output to the temperature. Substracting those 2 values generates our temperature compensated output!

Gluonpilot
Automating your flight!

Contact page

Products Documentation ForumShop
Copyright (C) Gluonpilot.com