Lab Report
Course Name : Embedded Systems and IoT Lab
Course Code : CSE-234
Experiment No : 06
Experiment Name : Arduino Interface with Humidity &
Temperature Sensor with LCD Display
Submitted To:
Name : Mr. Avizit Nandi
Designation : Lecturer
Department : Department of Computer Science & Engineering
Submitted By:
Name : Md. Tanvir Ahmed
ID : 221-15-5307
Department : Department of Computer Science & Engineering
Section : 61_C
Date of Submission: 11/08/2025
Objective:
To successfully build a circuit connecting an Arduino Uno to a TMP36 temperature
sensor and an I2C LCD display.
To write an Arduino program that reads the analog voltage from the TMP36 sensor and
converts it into temperature values in both Celsius and Fahrenheit.
To display the real-time temperature readings on the I2C LCD display.
Introduction: This report details the construction and operation of a simple electronic system
that measures and displays ambient temperature. The system uses an Arduino Uno as its central
control unit. A TMP36 analog temperature sensor is used to sense the temperature, and an I2C
LCD display is used to show the measured values. The project provides a practical application
of microcontroller programming, analog-to-digital conversion, and serial communication
protocols. Arduino Uno, a versatile microcontroller platform that serves as the central
processing unit. The system is designed to acquire ambient temperature data from a TMP36
analog temperature sensor and display the results on an I2C LCD display. This experiment
serves as a practical demonstration of several key concepts in electronics and programming,
including sensor interfacing, analog-to-digital conversion, and serial communication protocols.
The project's success hinges on the accurate conversion of the sensor's analog voltage output
into a digital temperature reading and the efficient use of the I2C protocol to simplify the
display's integration with the microcontroller. By successfully building and programming this
system, we can observe the interplay between hardware and software in creating a functional
electronic device
Theory:
Arduino Uno: The Arduino Uno is a popular open-source microcontroller board based
on the ATmega328P. It is programmed using the Arduino IDE and is capable of reading
various inputs (like the analog sensor) and controlling outputs (like the LCD display).
TMP36 Temperature Sensor: The TMP36 is an analog integrated circuit temperature
sensor. Its output voltage is directly proportional to the ambient temperature. It operates
on a linear scale of 10mV per degree Celsius. At 25°C, its output voltage is 750mV.
The Arduino's analog input pin measures this voltage and converts it into a digital value
through its built-in Analog-to-Digital Converter (ADC).
I2C LCD Display: A standard 16x2 LCD display requires multiple digital pins to
operate in parallel mode. By using an I2C (Inter-Integrated Circuit) module, the display
can be controlled with just two data lines (SDA and SCL), which simplifies wiring and
conserves the Arduino's digital pins. I2C is a two-wire serial communication protocol
that allows multiple devices to communicate with a master controller over a shared bus.
Equipment:
Arduino Uno: A microcontroller board used to process the sensor data and control
the LCD.
TMP36 Temperature Sensor: An analog sensor that outputs a voltage directly
proportional to the temperature in Celsius.
I2C LCD Display: A display module that uses the I2C protocol to show the
temperature readings.
©Tanvir Ahmed 2|Page
Breadboard: A solderless board used for prototyping the circuit.
Jumper Wires: Wires used to connect the components on the breadboard and to
the Arduino.
USB Cable: Used to connect the Arduino to a computer for programming and
power
Circuit Diagram:
Figure 1: Circuit diagram of Temperature sensor interface with Arduino
Code:
©Tanvir Ahmed 3|Page
Discussion:
Component Selection: The use of an Arduino Uno provided a versatile platform for
both reading the analog sensor data and controlling the I2C LCD display. The TMP36
analog temperature sensor was chosen for its simple interface and direct output of
voltage proportional to temperature, which is easy to convert with a straightforward
formula. The I2C LCD display was a key choice for this project, as it significantly
reduced the number of wiring connections to the Arduino (from ~12 to 4), simplifying
the circuit and freeing up digital pins for other potential uses. This demonstrates the
trade-off between simplicity and speed, as I2C communication is generally slower than
parallel communication.
Error and Calibration: The accuracy of the temperature readings depends on several
factors, including the precision of the TMP36 sensor itself and the stability of the
Arduino's 5V power supply. For more precise measurements, a voltage reference could
be used, or the sensor could be calibrated against a known standard. Minor fluctuations
in the analog reading can be smoothed using techniques like averaging multiple
readings.
Conclusion:
The project successfully demonstrated the integration of an Arduino Uno, a TMP36
temperature sensor, and an I2C LCD display to create a functional temperature
monitoring system.
The system accurately measures and displays the ambient temperature in both Celsius
and Fahrenheit, validating the principles of analog sensor data acquisition and
microcontroller-based output.
The use of an I2C LCD proved to be an efficient method for displaying data,
significantly simplifying the circuit design compared to a standard parallel LCD.
The experiment confirmed the practical application of basic electronics and
programming concepts for building a real-world device.
©Tanvir Ahmed 4|Page