Skip to main content

How to control RGB LED using Arduino Uno

RGB LED is the abbreviation of ‘’Red Green Blue Light Emitting Diode’’. RGB LED is the most amazing type of LED which has the ability to create millions of different shades of light colors using red, green, and blue colors.

How to use temperature sensor with Arduino Uno

The temperature sensor is the most popular measuring device which is capable to sense the intensity of heat generated by the object to which it is connected. These sensors are most frequently used by us through our household devices such as microwaves, refrigerators, air conditioners, and so on. In this tutorial, we will learn about LM35 (LM means linear monolithic) temperature sensor which is an integrated circuit analog temperature sensor.
It is an easily available, less costly, and accurate result providing sensor without any external calibration or trimming. Its output voltage is linearly proportional with Centigrade temperature which is preferred over other temperature sensors calibrated in Kelvin in which extra additional calculation is needed to convert a measured temperature into centigrade.

LM35 operates from -550C to 1500C. Its output voltage increases by 10 mV for every degree Celsius increment in temperature means its scaling factor is 10 mV/0C. LM 35 temperature sensor is an analog temperature sensor that means it provides output in analog signal form. Some of the microcontrollers do not accept analog signals, therefore, they require additional circuitry like analog to digital converter (ADC) to convert the analog signal into digital. in this tutorial, we will use Arduino Uno which has an inbuilt analog to digital converter. Arduino Uno has six analog input pins (A0 to A5). We will use one of these analog pins to convert the analog output of the LM35 sensor into the digital output.

In this tutorial, I will explain to you two projects. In the first project, you will understand, how a temperature sensor can be operated with Arduino Uno with the serial monitor. In the second example, you will learn how to show output temperature on LCD using Arduino Uno. I will show you how to calculate output temperature in Celsius as well as Fahrenheit in both project.

How to use a Temperature sensor with Arduino Uno (with serial monitor):

Required component:

1. 1 x LM35 temperature sensor.............................BUY
2. 1 x USB cable.....................................................BUY
3. 1 x Arduino Uno board.......................................BUY
4. 1 x Breadboard...................................................BUY
5. Jumper wires......................................................BUY

Circuit description:

LM 35 temperature sensor has three terminals power supply (VDD), output analog voltage (Vout), ground (GND). As shown in the connection diagram the middle terminal of the sensor is connected with an analog pin A2 pin of the Arduino Uno board. The first terminal is connected with the 5-volt power supply pin of the Arduino board and the third terminal is connected with GND.

LM35 temperature sensor (flat top view)
LM35 temperature sensor (round top view)

Connection diagram:

Code: Click here



How to use a temperature sensor with Arduino Uno (With LCD):

Required component:

1. 1 x LM35 temperature sensor.
2. 1 x USB cable.
3. 1 x Arduino Uno board.
4. 1 x Breadboard.
5. 1 x LCD (16 x 2).
6. 1 x preset (10 k).
7. Jumper wires

Connection diagram:

Circuit description:

I have used a 16 x 2 LCD compatible with the Hitachi HD44780 driver. The 10 k preset is used with LCD to adjust the brightness of the LCD screen. The RS pin of the LCD is connected with pin 8 of the Arduino board. VEE pin of the LCD module is connected with the middle terminal of the preset. 

GND, RW and LED- pin of the LCD module connected with the ground pin of the Arduino board. VDD and LED+ pin of the LCD module is connected with a 5-volt power supply pin of the Arduino board. Enable pin E of the LCD module is connected with pin 2 of the Arduino board. Data pins D4, D5, D6, and D7 are connected with pins 7, 6, 5, 4 respectively. 

The temperature sensor is a three-terminal device first terminal is connected with a 5-volt power supply pin of the Arduino, the middle terminal is connected with the A2 analog pin of the Arduino board and the third terminal is connected with the GND pin of the Arduino board.

Code: Click here



  1. I am very thankful to you that you have shared this information with us. I got some different kinds of knowledge from your web page, and it is really helpful for everyone. Thanks for sharing it. Read more info about power supply in uae

  2. You have done good work by publishing this article here. I found this article too much informative, and also it is beneficial to enhance our knowledge. Grateful to you for sharing an article like this. characteristics of biosensors


Post a Comment

Popular posts from this blog

Smart Plant Watering System Using ARDUINO UNO

As we all know, plants play an important role in our life, there are countless benefits we get from plants but the most important is fresh air and the pleasant atmosphere on the earth. Hence,   It is not only our social duty as well as the responsibility that we should plant trees as much as we can and also take care of them. But  the biggest challenge we face, is, taking care of them,

How to use LCD with Arduino Uno

Liquid crystal Display 16x2 (LCD) is a widely used electronic device to establish communication between the real world and the electronics-based machine world.

How to operate soil moisture sensor with Arduino

The soil moisture sensor is the most amazing sensor used to measure the quantity of water present in the soil and defines the moisture level of the soil as the output. Because of its amazing operating principle, this sensor is used in applications such as automatic irrigation systems, agriculture research applications, landscape irrigation, indoor planting system, and lawns. I have also made an advanced level project  "Smart Plant Watering System" using a soil moisture sensor.