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

Clean up some old issues #16

Closed
wants to merge 7 commits into from
Closed

Clean up some old issues #16

wants to merge 7 commits into from

Conversation

AnHardt
Copy link
Contributor

@AnHardt AnHardt commented Mar 13, 2020

A collection of a few patches fixing some long standing issues plus some other improvements.
Best reviewed commit by commit.

Disable bias-current after one-shot conversion

Disable bias-current after one-shot conversion to minimize self-heating.
Using code from @drhaney
Resolving #1

Add the possibility to do a 'automatic fault-detection cycle'

Add the possibility to do a 'automatic fault-detection cycle' and use it during begin().
Using code from @dl9sec and fixing #5

MAX31856_* -> MAX31865_*

Replace all occurrences of "MAX31856_" with "MAX31865_"
Here we have a library for the "MAX31865 RTD-to-Digital Converter". Not for the "MAX31856 Precision Thermocouple to Digital Converter
with Linearization"
Fixing my #15

Make use of the 'Fault bit' in the 'RTD Resistance Registers'

Make use of the 'Fault bit' in the 'RTD Resistance Registers' to save some SPI-traffic.
When reading the 'RTD Resistance Registers' we get the information if it makes sense to read the 'Fault Status Register' for free. We don't have to read the register over SPI if the register is empty anyway.

Normalize resistance before calculating positive temperature

Normalize resistance before calculating temperature with the formula for the positive temperatures.
Positive temperature means (when normalized) resistance >= 100 Ohm.
We then can decide what formula to use, before we calculated the positive one.

This should significantly speed up the calculation for negative temperatures.

Even more efficient would be to store the normalized value for Rref in the object - but that would change the API.

@AnHardt AnHardt force-pushed the AIO branch 2 times, most recently from b7ddd19 to 85ee5e8 Compare March 13, 2020 17:49
Disable bias-current after one-shot conversion to minimize self-heating.

Resolving #1
Add the possibility to do a 'automatic fault-detection cycle' and use it during begin().

Using code from and fixing adafruit#5
Replace all occurrences of "MAX31856_*" with "MAX31865_*"
Here we have a library for the "MAX318**65** RTD-to-Digital Converter". Not for the "MAX318**56** Precision Thermocouple to Digital Converter
with Linearization"

Fixing adafruit#15
Make use of the 'Fault bit' in the 'RTD Resistance Registers' to save some SPI-traffic.
When reading the  'RTD Resistance Registers' we get the information if it makes sense to read the 'Fault Status Register' for free. We don't have to read the register over SPI if the register is empty anyway.
Normalize resistance before calculating temperature with the formula for the positive temperatures.
Positive temperature means (when normalized) resistance > 100 Ohm.
We then can decide what formula to use, before we calculated the positive one.

This should significantly speed up the calculation for negative temperatures.

Even more efficient would be to store the normalized value for Rref in the object - but that would change the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants