How to make a temperature sensor using LM35 and LCD Display.
Here's a step-by-step guide to make a thermometer using an LM35 temperature sensor and displaying the value on an I2C LCD
Description:
In this project, we will create a simple thermometer using the LM35 temperature sensor and display the temperature readings on an I2C LCD. The LM35 is a precision temperature sensor that provides an analog output proportional to the temperature in Celsius. The I2C LCD simplifies wiring and coding by using only two data lines. Follow the steps below to build your thermometer.
Materials Needed
- LM35 Temperature Sensor
- Arduino (Uno, Nano, etc.)
- I2C LCD Display
- Breadboard
- Jumper wires
Step 1: Connect the LM35 Sensor
1. Place the LM35 on the breadboard:
- Ensure the flat side faces you for easy identification of pins.
2. Wire the LM35 to the Arduino:
- Vcc (Pin 1): Connect to 5V on the Arduino.
- Vout (Pin 2): Connect to A0 (analog pin) on the Arduino.
- GND (Pin 3): Connect to GND on the Arduino.
Step 2: Connect the I2C LCD Display
1. Identify the I2C Pins on the LCD:
- Typically labeled as GND, VCC, SDA, and SCL.
2. Wire the I2C LCD to the Arduino:
- GND: Connect to GND on the Arduino.
- VCC: Connect to 5V on the Arduino.
- SDA: Connect to A4 (on Uno) or corresponding SDA pin on your Arduino model.
- SCL: Connect to A5 (on Uno) or corresponding SCL pin on your Arduino model.
Step 3: Install Required Libraries
1. Open the Arduino IDE.
2. Install the LiquidCrystal_I2C library:
- Go to Sketch > Include Library > Manage Libraries.
- Search for "LiquidCrystal_I2C" and install it.
Step 4: Write the Arduino Code
Here is a sample code to read the temperature from the LM35 sensor and display it on the I2C LCD:
Step 5: Upload the Code and Test
1. Connect your Arduino to the computer using a USB cable.
2. Open the Arduino IDE, select the appropriate board and port.
3. Upload the code to your Arduino.
4. Observe the temperature readings displayed on the I2C LCD.
Project Gallery
Video Tutorial :
Conclusion :
You've successfully created a thermometer using an LM35 temperature sensor and an I2C LCD display. This project is a great introduction to working with analog sensors and I2C communication in Arduino. Explore further by calibrating your sensor or integrating additional features like data logging. For more exciting projects and tutorials, check out our website and explore the Skill-Hub by EmbeddedBrew to enhance your embedded systems knowledge. Happy building!