Amangill
Amangill
2. Apparatus
Hardware Requirements
• Arduino Uno Board
• Wires
• Resisters
• LCD
• TMP
• Bread Board
• Power Supply
Software requirements
• Arduino 2.2.1 IDE
#include <LiquidCrystal.h>
// Defining pin
#define temp A5
void setup()
lcd.begin(16, 2);
pinMode(temp, INPUT);
lcd.clear();
lcd.print("Temperature: ");
//Global Variable
float pre_temp = 0;
void loop()
{
float temperature = 0;
if(pre_temp != temperature)
lcd.setCursor(0,1);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print(temperature);
lcd.print(" C");
pre_temp = temperature;
Precautions:
• Stable Power Supply: Ensure your Arduino gets a stable 5V power supply to avoid erroneous
readings from the sensor.
• Correct Pin Connections: Double-check all connections according to the pin assignments in your
code.
• Sensor Placement: Place the sensor in a position where it has a clear line of sight to the object you're
measuring. Avoid surfaces that can absorb sound waves (like soft materials) directly in front of it.
• Avoid Water or Dust: Protect the sensor from water or dust, which can interfere with its operation.
• LCD Contrast: Adjust the potentiometer to ensure the LCD display is clear and readable under your
lighting conditions.
• Use Delays Wisely: In the loop, ensure there's a sufficient delay to allow the LCD to refresh without
flickering but not so long that it causes noticeable lag in distance updates.
1. Understanding Sensor Operation: Learn how temperature sensors like the LM35 and DHT11 function
and how they output data.
2. Circuit Design: Gain hands-on experience in designing and building circuits on a breadboard.
3. Programming Skills: Improve programming skills with Arduino, including reading sensor data,
performing calculations, and outputting results.
4. Serial Communication: Learn how to use serial communication to send data from Arduino to a computer
for debugging and monitoring.
5. Data Conversion: Understand how to convert raw sensor data into meaningful temperature (and
humidity for DHT11) readings.
6. Use of Libraries: Learn how to use external libraries in Arduino projects (specifically for the DHT11
sensor).
7. Problem-Solving: Develop troubleshooting and problem-solving skills through debugging hardware and
software issues.
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):
DATE : SIGNATURE :