Temperature Display System with LM35 and Arduino UNO in Proteus
A Temperature Display System with LM35 and Arduino UNO in Proteus is a fundamental project of LM35. the Arduino UNO is the central unit that takes the real-time values from the LM35 sensor and displays them on the LCD.
Temperature Display System with LM35 and Arduino UNO in Proteus
Temperature monitors are a crucial part of home automation and other projects where the user can see the real-time temperature data on the displays, like liquid crystal displays. In this project, we are going to leverage the LM35 temperature sensor in Proteus and show the data on the built-in LCD. The whole project is controlled through an Arduino UNO microcontroller that takes the analog data from the LM35 temperature sensor, processes it according to the code we insert in it, and then displays the output on the liquid crystal display (LCD).
For this project, the users must have two software programs:
Proteus ISIS
Arduino IDE
Proteus deals with the hardware-related part and provides the simulation where the real time components and circuit is shown. The Arduino IDE handles the coding part through C++ code, and the hex file created is utilized to connect the Arduino code with Proteus.
Project Overview
In Proteus, the LM35 linear temperature sensor is attached to the analog pin of the Arduino UNO microcontroller board. Through the Arduino IDE code, the microcontroller is designed to read the analog values from the sensor, convert them into digital values, and output them through the digital output pins where the LCD is attached. The user can change the LCD text through the Arduino IDE code if required. The HEX file generated in the Arduino IDE as a result of compilation is utilized as the program file of the Arduino UNO in the Proteus ISIS. Based on the real-time temperature values, three LEDs connected to the Arduino UNO visually represent the temperature level. These are the red, yellow, and green LEDs that show the high, moderate, and normal temperature levels, respectively.
All the steps and information will be discussed in detail, but first of all, let’s understand the core components:
LM35 Introduction
The LM35 is a precise and popular integrated circuit temperature sensor that is easy to use and provides accurate values, and its working resembles the bipolar junction transistor (BJT). It is designed to work in extreme temperature conditions; therefore, it is a popular choice among beginners and experts. This sensor provides analog voltage signals that are directly proportional to the temperature in Celsius. It is an ideal component for projects related to temperature measurement ranging from -55°C to 150°C. It works on low power consumption and is part of several IoT and other project types.
Arduino UNO Introduction
The Arduino UNO is a powerful microcontroller that is a member of the popular Arduino family, designed for ease of use and interaction with electronic projects and prototyping. It is coded in the simplified version of C++, which includes a USB connector and serial communication and allows easy code upload from the computer.
It features 14 digital input/output pins that include the 6 PWM pins, making it an ideal choice for digital projects, and also has six analog pins, of which one will be utilized in this project. The 16 MHz quartz crystal oscillator of the Arduino UNO makes it a versatile microcontroller board. Arduino UNO has revolutionized embedded systems and has a major role in projects related to fields like the Internet of Things (IoT), wearables, and industrial automation.
Temperature Display System with LM35 and Arduino UNO in Proteus
Here are the components required and the steps to follow to create this project:
Components Required
LM35
Arduino UNO
Potentiometer
LCD
LEDs (green, yellow, red)
Resistor
Ground terminal
Power terminal
Arduino IDE
Procedure
Download the Arduino UNO library for Proteus.
Open the Proteus ISIS.
Go to the Pick device library and get the first six components given in the above list, one after the other.
Arrange the components on the working screen according to the below diagram:
Connect the components through the connecting cables.
Go to the “terminal mode” of Proteus ISIS and select the ground terminal.
Arrange the terminal with the LM35 sensor LCD and LEDs.
Repeat the above two steps for the power terminal.
The LM35 is connected with the analog pin A0 of Arduino UNO.
Now, go to the Arduino IDE.
Create a new project.
Remove the default code.
Paste the code below code:
#include LiquidCrystal lcd(7, 6, 5, 4, 3, 2); // pin definitionconst int LEDGreen = 13;const int LEDYellow = 12;const int LEDRed = 11; const int tempSensor = A0; void setup() { pinMode(LEDGreen, OUTPUT); pinMode(LEDYellow, OUTPUT); pinMode(LEDRed, OUTPUT); // LCD initialization lcd.begin(16, 2); // Welcome message lcd.print("Welcome"); delay(2000); lcd.clear();} void loop() { // Temperature sensor reading int Value = analogRead(tempSensor); // Reading Temperature float V = Value * (5.0 / 1023.0); float T = (V - 0.5) * 100.0; lcd.setCursor(0, 0); lcd.print("T: "); lcd.print (T); lcd.print(" C "); // Extra spaces to clear any leftover characters // LED control if (T < 25) { digitalWrite(LEDGreen, HIGH); digitalWrite(LEDYellow, LOW); digitalWrite(LEDRed, LOW); } else if (T >= 25 && T <= 30) { digitalWrite(LEDGreen, LOW); digitalWrite(LEDYellow, HIGH); digitalWrite(LEDRed, LOW); } else { digitalWrite(LEDGreen, LOW); digitalWrite(LEDYellow, LOW); digitalWrite(LEDRed, HIGH); } delay(1000); // Wait before the next reading}
Compile the code.
Get the HEX code address from the below screen:
Now go to the Proteus ISIS and double-click the Arduino UNO.
Paste the hex file address in the program file section.
Run the project.
At first, it shows the welcome message that lasts for two seconds on the screen.
Change the values of the LM35 nob to check if the temperature values are changing.
During the temperature change, you will observe that the LCD provides the temperature values and the LEDs indicate the temperature level. For values greater than 40C, the red light indicates the high level.
Similarly, the yellow light is for moderate temperature, and green is for the normal temperature range.
Elektor Magazine has been one of the leading sources of information on electronics for engineers, designers, start-ups and companies for 65 years. Our magazine is powered by an active community of electronics engineers – from students to professionals – who are passionate about designing and sharing innovative ideas.
For them, we publish hundreds of items a year, in formats such as articles, videos, webinars, and other learning formats. Our mission is to share knowledge in every possible way and inspire readers with the latest developments within the electrical engineering sector.
Thank you for your vote!
Leave further comments in the fields below.
Thank you for your vote!
If you wish to leave a comment with your rating, please first use the login below. If not, just close this window.
Discussion (0 comments)