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

Discussion: Look into improved curve fits for ms5611 Baro temp calibration #9266

Closed
Antiheavy opened this issue Apr 8, 2018 · 7 comments
Closed

Comments

@Antiheavy
Copy link
Contributor

Antiheavy commented Apr 8, 2018

The 5th order curve fit for the ms5611 Baro sensor sometimes does a poor job at cold temperatures.

We've been performing the offline temp calibration process on a few handfuls of autopilots and they all look fairly similar to this plot:

image

Our concern is the diverging curve fit at the cold temps.

Also, the ms5611 has a recommended temp compensation scheme which may be implemented somehow either inside the ms5611 or inside the PX4 drivers (not clear to me). There may be some confusion or conflicts with the off-board calibration and the chip/driver level compensation.
image

Improvements might involve:

  • better handling of temperatures outside the calibrated limits. what should be done here? better/safer curve fits or extrapolations? warnings to the user? prevent arming until within calibrated limits? ( I'm not sure preventing operation outside calibration limits makes sense as it may force users to have expensive temp chambers to do wide temp calibrations.)
  • better coordination between the ms5611 recommended temp compensation and the actual raw data calibration curves generated by PX4 (onboard and/or offline).

Thoughts?
@dagar @priseborough @M-Skelton

@M-Skelton
Copy link

M-Skelton commented Apr 8, 2018

Here are a few more examples for reference:

SN0077:
image

SN0075:
image

SN0072:
image

Another custom FMUv4 board:
image

A pixracer:
image

These calibrations were all done using the exact same method to perform the off-board calibration.

  1. set calibration parameters
  2. cold soak for 1 hr.
  3. remove from freezer and connect usb cable
  4. place into cooler
  5. seal cooler
  6. connect usb cable to the computer
  7. let the calibration run for 30 min
  8. run the off board python scripts

I think it's interesting that we see similar curves for 0075, 0072, and the developer FMUv4 board, but very different curves for the pixracer and 0077.

I think there's also something to address with:
#9054

I posted in the forums about the same issue a while ago for reference:
http://discuss.px4.io/t/mpu9250-internal-temperature-reading-seems-to-be-incorrect/5542/2

I think before we can roll this calibration into a production standard we need to ensure the sensors are reading correctly in the first place. As well as getting more consistent results.

As for how the firmware/autopilot should interpret past the calibrated range, I think reverting back to using the raw sensor reading might be a good idea for now. The curves that I posted hint at another inflection at the lower range that is shown. So I don't a linear interpolation out past the calibrated range would be of much use or a good idea.

If we could come up with a clever way to try and merge the raw and calibration data that would be neat, but as for the mechanics of how to implement that in a useful way, I don't have much of an instinct for at this moment.

@priseborough
Copy link
Contributor

priseborough commented Apr 8, 2018

The manufacturers recommended compensation scheme is supposedly being implemented inside the Baro driver. This needs to be checked.

I agree that If we are doing our own serial number specific sensor calibration downstream of the driver then we are likely better off not doing the model number specific calibration provided by the manufacturer.

@dagar
Copy link
Member

dagar commented Apr 8, 2018

Pull request for testing #9267.

@stale
Copy link

stale bot commented Jan 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

1 similar comment
@stale
Copy link

stale bot commented Jun 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Jul 8, 2019

Closing as stale.

@stale stale bot closed this as completed Jul 8, 2019
@julianoes
Copy link
Contributor

@dagar re-open if this is still going to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants