Skip to content

Temperature Sensor

Updated: 6/28/2025 Words: 0 words Reading time: 0 minutes

A temperature sensor is a sensor that can sense temperature and convert it into usable output signals. It is the core component of temperature measurement instruments and is widely used in various fields, including weather monitoring, HVAC systems, industrial processes, medical equipment, and consumer electronics, providing convenience for people's production and daily life.

Preparation

Hardware

HardwareDescriptionImage
Creative Box PlatformMy Image
Environmental Monitoring ModuleIncluded with Creative Box purchaseMy Image

Software

SoftwareLinkDescription
Environmental Monitoring ApplicationLinkOfficial frontend application, can be directly loaded and used through the console.

Connection

My Image
Connection
Connect the environmental monitoring module to any header group on the platform, the connection shown above uses pins 12-15

Usage

Read Current Temperature

Open the Creative Box console and load the Environmental Monitoring Board application from the sensor applications. Enter the application, select the pin number where the Creative Box connects to the environmental monitoring module. The webpage will automatically display the current temperature information.

Creative Box ConsoleLoad ApplicationSelect Pin Number and Display Current Environmental Data

Principle

Types

Temperature sensors are divided into three types, each with unique working principles:

  • Thermocouples use two conductors made of different metals, connected at the end to form a junction. When this junction is heated, it produces a voltage proportional to the temperature input. They can be used in various scenarios because different metal combinations can achieve different measurement ranges; however, their accuracy is the lowest among the three types.

  • Thermistors can be very small. They consist of a sensing element, which can be glass or epoxy-encased, and have 2 wires for connection to circuits. They measure temperature by measuring the resistance change of current. Thermistors can exist as negative temperature coefficient (NTC) or positive temperature coefficient (PTC) forms and are usually lower in cost.

  • Resistance Temperature Detectors (RTDs) work similarly to thermistors, measuring temperature by measuring ohmic resistance. They connect to circuits similarly to thermistors, but have a wider temperature range and can measure extreme temperatures.

The choice of temperature sensor type depends on accuracy, range, response time, and specific application requirements.

Different temperature sensors have different accuracies. Thermocouples have lower accuracy, while glass-encased NTC thermistors have the highest accuracy. Additionally, different temperature sensors can measure different temperature ranges and may be more accurate within certain ranges. Furthermore, the size and packaging of the sensor must be considered. If space is limited, smaller devices are needed.

MTS01 Temperature Sensor

The temperature sensor on the environmental monitoring module is the MTS01 from Mysentech, with the following parameters:

Parameter NameMTS01
Temperature Range-70°C to +150°C
AccuracyError typically between 0.1°C to 0.2°C
Control InterfaceI2C Interface
I2C Address0x45
Interface Speed Support0-100kHz
Operating Voltage3.3V
Power ConsumptionStandby current 0.1µA, measurement current 0.45mA

Reference Datasheet Download

Datasheet DownloadLink
MTS01Link

Reading Temperature Values

Temperature sensors typically provide two temperature measurement modes: single measurement and continuous measurement.

  • Single measurement: The main controller needs to send I2C commands to trigger the temperature sensor to perform temperature measurement. When the sensor finishes temperature measurement, the result is saved on the sensor, and the main controller needs another I2C command to read the temperature.
  • Continuous measurement: In continuous measurement mode, the temperature sensor continuously measures temperature at given intervals. First, the main controller sends I2C commands to set the temperature sensor to continuous measurement mode, then the main controller only needs to continuously send I2C temperature reading commands.

The diagram below shows how to perform single measurement (MTS01 datasheet 12.8).

My Image
  • The main controller needs to send the I2C address, command high byte, and command low byte sequentially to the temperature sensor. Each time the temperature sensor receives a byte of data, it sends an acknowledgment bit to notify the main controller. If the temperature sensor does not send an acknowledgment bit, the platform will return a failure code. In this case, please check if your I2C address is set correctly and if the pin number connecting the platform to the temperature sensor is set correctly.
  • After the main controller sends the single measurement command, wait for the temperature sensor to finish measurement (about 1ms) and then read the measurement data. The main controller also needs to first send the I2C address, followed by three bytes that are the temperature value and CRC check byte sent by the temperature sensor to the main controller.

Temperature Calculation

Different temperature sensors have different temperature calculation formulas to convert the binary data read from the sensor into understandable Celsius or Fahrenheit degrees.

For MTS01, the calculation formula is in section 9.1 of the datasheet:

My Image