Module mlx9064x::common[][src]

Expand description

Common functionality between MLX90640 and MLX90641 cameras.

At first glance, the datasheets for these modules can be pretty intimidating, with nearly half the document taken up by pages of formulas. After reading through them though, it becomes pretty clear that the formulas are primarily performing manual conversion to signed integers and other bit twiddling that can be written much more clearly. Here’s a bit of a decoder ring for some of the patterns:

  • If you see a line similar to

    If KFoo > (2n - 1) → KFoo = KFoo - 2n + 1

    It is converting an unsigned integer to a signed one. The italicized portions in the quote are typically expanded, so instead of 27 - 1 and 28</sup you’ll see 127 and 256.

  • Masking a value off with a logical AND, followed by a division by a power of 2. The division can be easier to read as a right-shift by whatever power of two.

  • The datasheets are inconsistent between each other and within themselves whether to write something as “PixFoo(i, j)” or “Foopix(i, j)”.

And a glossary:

Glossary

α, alpha
Sensitivity coefficient
CP
Compensation pixel
ε, emissivity
This is a bit beyond a glossary entry, but basically how much IR radiation a surface emits relative to its temperature.
K
Prefix for constants.
PTAT
Proportional to ambient temperature
Ta
Ambient temperature
Ta0
Ambient temperature reference, 25.0 ℃. If it looks like 0, it's probably "o" as this value is really only used in one place.
To
Object temperature, meaning the temperature an individual pixel has detected for an object.
VDD
Pixel supply voltage
VDD25
Pixel supply voltage reference at 25.0 ℃

Structs

Marker newtype for addresses accessible over I2C.

Traits

This trait provides access to the module-specific calibration data.

Define common addresses accessible within the camera’s RAM.