-
-
Notifications
You must be signed in to change notification settings - Fork 13
Adjust for self-heating errors with temperature offset calibration [HC-1478] #430
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
Merged
seaxwi
merged 6 commits into
main
from
Adjust-for-self-heating-errors-with-temperature-offset-calibration
Oct 9, 2024
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0a7a8e9
draft
gorillagripcore 1f6a006
Merge branch 'main' into Adjust-for-self-heating-errors-with-temperat…
seaxwi bf02ea1
Apply suggestions from code review
gorillagripcore ef3a228
lint
gorillagripcore dedad92
moved file
gorillagripcore a50bfec
Add arduino style for code block
seaxwi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 0 additions & 30 deletions
30
...hields and Carriers/How-to-calibrate-the-MKR-IoT-Carriers-temperature-sensor.md
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
...upport/Shields and Carriers/How-to-calibrate-the-internal-temperature-sensor.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "How to calibrate the internal temperature sensor" | ||
id: 4411202645778 | ||
--- | ||
|
||
When working with internal temperature sensors, such as those found on boards like the Arduino MKR IoT Carrier or the Nicla Sense ME, one common issue is inaccurate temperature readings due to self-heating. Self-heating occurs because components on the board generate heat, which can lead to temperature readings higher than the actual environmental temperature. Factors like power usage, board positioning, and the running code can increase the impact of this effect. | ||
gorillagripcore marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Steps to calibrate the temperature sensor | ||
|
||
### Measure the required offset | ||
|
||
1. Turn on your board and let it operate for some time to allow the components to reach their normal operating temperature, ensuring any heat-related offset becomes noticeable. | ||
|
||
1. Use a reliable external source to measure the room temperature, like a digital thermostat. | ||
|
||
1. Compare the temperature reading from your sensor with the reading from the external source. | ||
|
||
1. Subtract the sensor's reading from the external source's reading to calculate the offset. | ||
|
||
### Implement the offset in your sketch | ||
|
||
Once you have determined the offset, you can adjust the temperature readings in your sketch. Locate the part of the code that retrieves the temperature value and apply the offset by either adding or subtracting it based on whether your sensor reads higher or lower than the actual temperature. | ||
gorillagripcore marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
``` | ||
float temperature = sensor.readTemperature(); // Function to get temperature from the sensor | ||
|
||
float offset = 5; // Your calculated offset | ||
|
||
float calibratedTemperature = temperature - offset; | ||
gorillagripcore marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.