Skip to content

Commit 0a7a8e9

Browse files
draft
1 parent 9dd1f50 commit 0a7a8e9

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

content/Hardware Support/Shields and Carriers/How-to-calibrate-the-MKR-IoT-Carriers-temperature-sensor.md

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "How to calibrate the internal temperature sensor"
3+
id: 4411202645778
4+
---
5+
6+
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.
7+
8+
## Steps to calibrate the temperature sensor
9+
10+
### Measure the required offset
11+
12+
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.
13+
14+
1. Use a reliable external source to measure the room temperature, like a digital thermostat.
15+
16+
1. Compare the temperature reading from your sensor with the reading from the external source.
17+
18+
1. Subtract the sensor's reading from the external source's reading to calculate the offset.
19+
20+
### Implement the offset in your sketch
21+
22+
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.
23+
24+
```
25+
float temperature = sensor.readTemperature(); // Function to get temperature from the sensor
26+
27+
float offset = 5; // Your calculated offset
28+
29+
float calibratedTemperature = temperature - offset;
30+
```

0 commit comments

Comments
 (0)