Code Monkey home page Code Monkey logo

mlx90621-spin's Introduction

mlx90621-spin


This is a P8X32A/Propeller, P2X8C4M64P/Propeller 2 driver object for Melexis's MLX90621 16x4 IR sensing array

IMPORTANT: This software is meant to be used with the spin-standard-library (P8X32A) or p2-spin-standard-library (P2X8C4M64P). Please install the applicable library first before attempting to use this code, otherwise you will be missing several files required to build the project.

Videos

Salient Features

  • I2C connection at up to 1MHz (P2/SPIN2: TBD)
  • Single Pixel, Line, Column or whole frame retrieval to buffer
  • Continuous or step measure mode
  • Set sensor ADC resolution (15..18 bits)
  • Set sensor framerate (0.5..512Hz)

Requirements

P1/SPIN1:

  • spin-standard-library
  • P1/SPIN1: 1 extra core/cog for the PASM I2C engine

P2/SPIN2:

  • p2-spin-standard-library

Compiler Compatibility

Processor Language Compiler Backend Status
P1 SPIN1 FlexSpin (6.8.0) Bytecode OK
P1 SPIN1 FlexSpin (6.8.0) Native/PASM OK
P2 SPIN2 FlexSpin (6.8.0) NuCode Build OK
P2 SPIN2 FlexSpin (6.8.0) Native/PASM2 OK

Limitations

  • Very early in development - may malfunction, or outright fail to build
  • The sensor has a built-in EEPROM, which unfortunately has the same (fixed) slave address as the EEPROM on most any Propeller 1-based board, so the sensor must be connected to pins other than the "standard" Propeller I2C pins 28 & 29, or the Propeller must be booted by some method other than EEPROM (doesn't apply to P2)
  • No correction is performed on the sensor data (i.e., Ta and To; ambient temperature and object temperature). Only the raw image data is collected and returned

mlx90621-spin's People

Contributors

avsa242 avatar

Watchers

 avatar  avatar  avatar

mlx90621-spin's Issues

No correction performed

Currently, no calculations/compensation/corrections are applied to the readings from the thermal sensor. Only the raw data is output.
Implement calculation of To per Melexis datasheet sec 7.3.3

  • calculate Ta
  • calculate To

Add interpolation to demos

The available demos currently just display pixels onscreen 1:1 with the sensor pixels. Add some interpolation to the display to fill "in-between" pixels with averages of their neighboring pixels.

Pre-calculated offsets are imprecise

...and possibly inaccurate.
PTAT calculation, as well as probably other pre-calculated values, are currently calculated using integer only math because SPIN has no floating point support, so things like offsets are imprecise, and possibly inaccurate. For reference, the example calculations in the Melexis datasheet have 8 decimal places!!!

Using fixed-point math would normally be an option, by scaling everything up by some static factor, but some numbers involved end up overflowing even the largest storage size (long). Kt1 is a good example of this, when using a scaling factor of 1000. 100 is within bounds, but offers no precision when used on, for example, Kt2.

I'm reluctant to integrate something like Float32 into the driver/object, as it just seems too much of a burden (here's wishing SPIN had better support for fractional numbers).

Redefine I2CFM() as PRI

The user needn't worry about this. Redefine as a private method and maybe call it on driver startup with a parameter appropriate to the I2C bus speed chosen.

Add EVE3-based demo

Leverage some of EVE's accelerated graphics primitives to create a better, faster demo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.