Contents

Interfacing LM75 Temperature Sensor with Arduino

LM75 Temperature Sensor Features

LM75 is a temperature sensor that can measure temperature range from -25 to +125 degrees Celsius. This sensor support I2C communication protocol and you can communicate with this module using two SDA and SCL pins to read the ambient temperature.

You can download the datasheet of this module here.

LM75 Temperature Sensor Pinout

This sensor has 5 pins:

  •  VCC: Module power supply – 3.3-5 V
  •  GND: Ground
  •  SDA: Data pin for I2C communication
  •  SLC: Clock pin for I2C communication
  •  OS: Over-Temperature Shutdown can be used as an interrupt.

You can see pinout of this module in the image below.

Required Materials

Hardware Components

Arduino UNO R3 × 1
LM75 Temperature Sensor Module I2C Interface × 1
Male to Female jumper wire × 1

Software Apps

Arduino IDE

Interfacing LM75 Temperature Sensor with Arduino

Step 1: Circuit

The following circuit shows how you should connect Arduino to LM75 sensor. Connect wires accordingly.

Step 2: Installing Library

Install the following library on Arduino.

https://github.com/jeremycole/Temperature_LM75_Derived

Tip

If you need more help with installing a library on Arduino, read this tutorial: How to Install an Arduino Library

Step 3: Code

Upload the following code to your Arduino. This code displays the read temperature in the serial monitor.
/*
  LM75 Temperature Sensor
  modified on 19 Sep 2020
  by Mohammad Reza Akbari @ Electropeak
  
Home
*/ #include <Temperature_LM75_Derived.h> Generic_LM75 LM75; void setup() { Serial.begin(9600); Wire.begin(); delay(100); } void loop() { Serial.print("Temperature = "); Serial.print(LM75.readTemperatureC()); Serial.println(" C"); delay(300 ); }
After running the code, you will see the following image in the serial output.
Liked What You See?​
Get Updates And Learn From The Best​

Leave a Reply

Your email address will not be published. Required fields are marked *