Table of Contents Example
Table of Contents Example
1 Introduction 2
1.1 Brief Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 Circuit Connection 2
3.1 Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3.2 Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4 Arduino Code 4
4.1 Code Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . 4
6 Conclusion 7
6.1 Summary of Key Points . . . . . . . . . . . . . . . . . . . . . . . 7
7 Future Enhancements 7
8 References 7
1
1 Introduction
1.1 Brief Overview
This assignment demonstrates the interfacing of a TMP36 temperature sensor
with an Arduino microcontroller. The TMP36 sensor provides analog voltage
output proportional to temperature, which is converted and displayed on the
Serial Monitor using Arduino.
1.2 Objectives
To interface a temperature sensor with an Arduino board and measure temper-
ature readings accurately.
3 Circuit Connection
3.1 Diagram
2
Figure 1: Circuit Diagram
3
3.2 Explanation
The circuit connection involves connecting the TMP36 temperature sensor to
the Arduino as follows:
• Connect the TMP36’s left pin (VCC) to the Arduino’s 5V.
• Connect the TMP36’s middle pin (Vout) to an analog pin on the Arduino,
e.g., A0.
• Connect the TMP36’s right pin (GND) to the Arduino’s GND.
The Arduino is powered via USB connection to a computer.
4 Arduino Code
void setup() {
Serial.begin(9600);
pinMode(A0, INPUT);
void loop() {
float sensorValue = analogRead(A0);
float voltage = sensorValue * (5000.0 / 1024.0);
float tempCelsius = (voltage - 500.0) / 10.0;
delay(1000);
4
In the loop() function:
5
Figure 2: Output
6
6 Conclusion
6.1 Summary of Key Points
This Experiment demonstrated the successful interfacing of a TMP36 temper-
ature sensor with an Arduino microcontroller. By applying the appropriate
formula, the sensor’s analog voltage output was accurately converted into tem-
perature values in both Celsius and Fahrenheit. The results were displayed on
the Serial Monitor, providing a straightforward method for monitoring temper-
ature.
7 Future Enhancements
To further enhance this Experiment, the following improvements could be con-
sidered:
8 References
• TMP36 Datasheet (Manufacturer’s Documentation)
• Arduino Official Website (https://www.arduino.cc/https://www.arduino.cc/)