Python library for MLX90632
Project description
mlx90632-driver
Validation
Interface | Win PC | Linux PC | Raspberry Pi (linux) | Nvidia Jetson Nano (linux) |
---|---|---|---|---|
EVB90632(usb) | 1.2.0 | 1.1.0 | 1.1.0 | 1.1.0 |
FTDI(FT2232H) | 1.1.0 | 1.1.0 | 1.1.0 | 1.1.0 |
I2C-bus(40pin) | N/A | N/A | 1.1.0 | 1.1.0 |
Intro
This python driver for MLX90632 aims to facilitate the interfacing on a PC.
Currently this driver supports 3 type of interfaces:
- EVB90632 on WinPC, LinuxPC, Raspberry Pi ==> https://www.melexis.com/en/product/EVB90632/EVB90632
- Raspberry Pi on built-in hardware I2C bus ==> https://www.raspberrypi.org/.
- FTDI FT2232H on WinPC, LinuxPC, Raspberry Pi ==> https://www.mikroe.com/click-usb-adapter.
Getting started
See below for installation instructions
Running the driver demo
- Connect the EVB to your PC.
- Open a terminal and run following command:
mlx90632-dump
This program takes 1 optional argument.
mlx90632-dump <interface> <reading_count>
<interface>
can be:
auto
(default) search for the first port available with EVB90632 hardware as interface to MLX90632.I2C-1
on raspberry pi use the I2C hardware; it requires raspi-config to enable i2c hardware.mlx://evb:90632/1
use first EVB90632 on USB.mlx://evb:90632/2
use second EVB90632 on USB.ftdi://ftdi:2232/1
use first FT2232 port on USB.
Usage
Below you can find an example on how to read a sample of the MLX90632 senor with I2C address 0x3A. Please look into mlx90632.py for more advanced features.
from mlx90632.mlx90632 import Mlx90632
dev = Mlx90632('mlx://evb:90632/1') # establish communication between EVB90632 and PC
dev.init() # read EEPROM and pre-compute calibration parameters.
dev.wait_new_data() # wait until there is new data.
raw_data = dev.read_measurement_data() # read new measurement data.
ta, to = dev.do_compensation(raw_data) # compute the temperature.
print ("TA: {} -- TO: {} DegC".format (ta, to)) # print the results
Issues and new Features
In case you have any problems with usage of the plugin, please open an issue on GitHub.
Provide as many valid information as possible, as this will help us to resolve Issues faster.
We would also like to hear your suggestions about new features which would help your user experience.
Installation
pip install mlx90632-driver
https://pypi.org/project/mlx90632-driver/
https://pypistats.org/packages/mlx90632-driver
Windows + FTDI I2C interface
In order to use the FTDI chip, FT2232H or FT232H, an alternative driver needs to be installed.
Procedure:
- Plug your FT232H or FT2232H into the usb port of your PC, and let windows install the default drivers.
- download the zadig tool https://zadig.akeo.ie/.
- download the libusb https://libusb.info/ => Downloads menu => Latest Windows Binaries.
- run zadig tool as admin.
- menu => options => list all devices.
- Select Dual RS232.
- Select with the up-down arrows
libusb0 (v1.2.6.0)
. - Click re-install driver button.
Linux + EVB90632 interface
- Install libhid library.
sudo apt update
sudo apt install libhidapi-libusb0
- Add these udev-rules to the file:
/etc/udev/rules.d/20-melexis-evb.rules
# EVB90632
SUBSYSTEM=="usb", ATTR{manufacturer}=="Melexis", ATTR{product}=="EVB90632", GROUP="plugdev", MODE="0666"
- Now reboot to make the new udev rules active.
Linux + FTDI I2C interface
- Add these udev-rules to the file:
/etc/udev/rules.d/21-ftdi.rules
# FTDI rules
ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", MODE="666", GROUP="dialout"
ATTR{idVendor}=="0403", ATTR{idProduct}=="6014", MODE="666", GROUP="dialout"
- Now reboot to make the new udev rules active.
Linux + Raspberry Pi & Nvidia Jetson Nano + 40 pin HW I2C bus
Enable the I2C interface
sudo raspi-config
- 'enable i2c' in interface; in case you want to connect MLX9064x on the I2C bus of RPi.
- optional: 'enable ssh' in interface; now you can login remotely over the network.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mlx90632-driver-1.3.0.tar.gz
.
File metadata
- Download URL: mlx90632-driver-1.3.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6672f6b5a0278d467e28240d8a9276f69f1e2968dd88235721e5317aa4dbf5c2 |
|
MD5 | 21f35d8268d41e7ed0dea6a00fbb50aa |
|
BLAKE2b-256 | 3d5ccf8a2e4ec8bc5f6d075af84f70a6d7be389ecbc3b6a13ff7bef8c7ce8f79 |
File details
Details for the file mlx90632_driver-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: mlx90632_driver-1.3.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a6b9769216a784181c1732eaacc0b99e5d0f9b394a80a63a7072f2a08e96c80 |
|
MD5 | 818514863f80f5f41d6ce192f93c7589 |
|
BLAKE2b-256 | cbc379d0c340bd187630447226e0ea12233ea0676f74efd5086c2740ec620f47 |