How to Use Temperature Sensor Module

Photo of Temperature Sensor Module

This module can measure the temperature of the surroundings. It can also be used to create temperature-dependent switches.

About the Component

The sensor located at the red circle in the photo can detect the ambient temperature and output it as an analog signal (a number from 0 to 1023).

Illustration of the sensor position on the Temperature Sensor Module

Getting Temperature (in Celsius) Readings

The temperature sensor returns 0V for 0℃ and returns a voltage of 10mV per 1℃.
Since SPACEBLOCK's analog signal returns a voltage of 3.3V (3300mV) as a value from 0 to 1023, you can calculate the temperature using the following formula:

330 * Sensor Value / 1023 = Temperature (℃)※Approximately 0.32℃ per analog unit.
※Values may vary due to power supply conditions, part connections, and pin states.

You can also use dedicated blocks for temperature retrieval to obtain the temperature (℃).

Specifications

Voltage5V
Output SignalAnalog
Sensitivity10mV per 1℃
Temperature Range
Size 34 x 20 (mm)

Connection

Connect the Temperature Sensor Module to the SPACEBLOCK microcontroller board using jumper wires (male-female) as follows:

  • Connect the S pin of the temperature sensor to the analog-compatible pin of SPACEBLOCK
  • Connect the G pin of the temperature sensor to the GND pin of SPACEBLOCK
  • Connect the V pin of the temperature sensor to the 5V pin of SPACEBLOCK
Connection method between SPACEBLOCK microcontroller board and Temperature Sensor Module

※The image shows the signal line connected to pin A0. Analog-compatible pins are A0 to A7, B0 to B1.

※5V and GND can also be inserted into the pins with the same notation on the SPACEBLOCK microcontroller board.

Usage

The sensor detects the ambient temperature and returns a value. The higher the temperature, the larger the value.
You can retrieve values from the Temperature Sensor Module using the analog read blocks or temperature retrieval blocks in the 'Input' category of the project.


For detailed usage of the blocks, click here

Analog Reading