Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added driver for MLX90614 Temperature sensor #26886

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

rahulOCR
Copy link
Contributor

Hey everyone,
I am resubmitting this PR as per code of conduct of Ardupilot after closing #26644
I am submitting this PR to merge into master. I have added MLX90614 temperature sensor into AP_TemperatureSensor library.
Using data-sheet provided [Link of data-sheet]](https://www.melexis.com/en/documents/documentation/datasheets/datasheet-mlx90614). I have used this to get ambient temperature of cabin of battery.

WIKI:

Hi I am attaching datasheet, wiki and photos for interfacing. MLX90614 sensor is an infrared thermometer for non-contact temperature measurements. Both the IR sensitive thermopile detector chip and the signal conditioning ASIC are integrated in the same TO-39 can. Integrated into the MLX90614 are a low noise amplifier, 17-bit ADC and powerful DSP unit thus achieving high accuracy and resolution of the thermometer.

set (examples shown for first sensor):

TEMP1_TYPE = 0:Disabled, 1:TSYS01, 2:MCP9600, 3:MAX31865, 4:TSYS03, 5:Analog, 6:DroneCAN, 7:MLX90614 Sensor type

TEMP1_BUS = 0-3 Board’s I2C port on which the sensor is attached

TEMP1_ADDR = the sensor’s I2C address (0-127). For this sensor, 90

TEMP1_SRC = which other temperature reporting device type should have its temperature report replaced with this sensor’s.

TEMP1_SRC_ID = this identifies which individual device, of the above type, should have its report replaced.

318392511-4a5c6cde-a86b-47e0-a5c3-8bec4d2a5e01

MLX90614-Datasheet-Melexis.pdf

@rahulOCR rahulOCR changed the title added driver for MLX90614 added driver for MLX90614 Temperature sensor Apr 25, 2024
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a single commit prefixed with AP_TemperatureSensor:

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahulOCR still working on this one? There's a couple of reviews outstanding

@rahulOCR
Copy link
Contributor Author

hey @peterbarker I am waiting for some dev call or similar to review and should I squash all commits into one single commit ?

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good. Couple of basically whitespace change requests.

I'll mark it for discussion at DevCallEU tonight

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs build_options.py and extract_features.py files....should be squashed

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase on master.

SHould be two commits, one Tools:, the other AP_TemperatureSensor:.

You will need to change new to NEW_NOTHROW when allocating the backend - do what we do for the other backends.

@rahulOCR
Copy link
Contributor Author

@peterbarker I think this NEW_NOTHROW was recently added. will do that

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still needs extract_features.py

@rahulOCR
Copy link
Contributor Author

Hey @Hwurzburg can you help me out what needs to be changed in extract_featues.py

@Hwurzburg
Copy link
Collaborator

@peterbarker would be better at that

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this rebased against master (#28143) and it seems to work as expected.

Maybe reading a bit low?

Very long time constants?

Merging, thanks!

@peterbarker peterbarker merged commit 1038b45 into ArduPilot:master Sep 18, 2024
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants